X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=trunk%2FR%2Fdebcontrol.R;h=743aa0085b7707c39dda92f6139572b571cd0dd7;hb=c27541f543201c6909077bf80b0034df80bc64f2;hp=aa8ba8abd00800286f8021d337a57d8d750894c5;hpb=49b44dc25b2664f0b2cbbed14a444d77c4d0ca07;p=cran2deb.git diff --git a/trunk/R/debcontrol.R b/trunk/R/debcontrol.R index aa8ba8a..743aa00 100644 --- a/trunk/R/debcontrol.R +++ b/trunk/R/debcontrol.R @@ -44,7 +44,10 @@ get_dependencies <- function(pkg,extra_deps) { depends <- lapply(depends,unique) # append the Debian dependencies - depends$build=c(depends$build,'debhelper (>> 4.1.0)','cdbs','dpatch') + depends$build=c(depends$build,'debhelper (>> 4.1.0)','cdbs') + if (file.exists(file.path(patch_dir, pkg$name))) { + depends$build <- c(depends$build,'dpatch') + } if (pkg$archdep) { depends$bin=c(depends$bin,'${shlibs:Depends}') } @@ -77,6 +80,10 @@ sysreqs_as_debian <- function(sysreq_text) { sysreq = gsub('(ht|f)tps?://[[:alnum:]!?*"\'(),%$_@.&+/=-]*','',sysreq) # squish out space sysreq = chomp(gsub('[[:space:]]+',' ',sysreq)) + if (nchar(sysreq) == 0) { + notice('part of the SystemRequirement became nothing') + next + } alias <- db_sysreq_override(sysreq) if (is.null(alias)) { error('do not know what to do with SystemRequirement:',sysreq) @@ -110,11 +117,11 @@ generate_control <- function(pkg) { # construct control file control = data.frame() control[1,'Source'] = pkg$srcname - control[1,'Section'] = 'math' + control[1,'Section'] = 'gnu-r' control[1,'Priority'] = 'optional' control[1,'Maintainer'] = maintainer control[1,'Build-Depends'] = paste(pkg$depends$build,collapse=', ') - control[1,'Standards-Version'] = '3.8.0' + control[1,'Standards-Version'] = '3.8.1' control[2,'Package'] = pkg$debname control[2,'Architecture'] = 'all' @@ -146,7 +153,7 @@ generate_control <- function(pkg) { long_descr <- pkg$description[1,'Description'] } - if (length(long_descr) < 1) { + if (length(long_descr) < 1 || long_descr == "") { # bypass lintian extended-description-is-empty for which we care not. long_descr <- paste('The author/maintainer of this package' ,'did not care to enter a longer description.') @@ -163,5 +170,6 @@ generate_control <- function(pkg) { # Debian policy says 72 char width; indent minimally write.dcf(control,file=pkg$debfile('control.in'),indent=1,width=72) + write.dcf(control,indent=1,width=72) }