X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=trunk%2FR%2Fdebianpkg.R;h=a4568bd39e21f3007ef34a79bee24e7a9d919e41;hb=204d1744ce9b2032eb26823889375646829cb384;hp=31bdb9609a900f16283bdac5d499ef99e482d364;hpb=49b44dc25b2664f0b2cbbed14a444d77c4d0ca07;p=cran2deb.git diff --git a/trunk/R/debianpkg.R b/trunk/R/debianpkg.R index 31bdb96..a4568bd 100644 --- a/trunk/R/debianpkg.R +++ b/trunk/R/debianpkg.R @@ -1,12 +1,13 @@ append_build_from_pkg <- function(pkg, builds) { pkg_build <- data.frame(id = -1 # never used ,package = pkg$name + ,system = which_system ,r_version = version_upstream(pkg$debversion) ,deb_epoch = version_epoch(pkg$debversion) ,deb_revision = version_revision(pkg$debversion) ,db_version = db_get_version() ,date_stamp = pkg$date_stamp - ,git_revision = scm_revision + ,scm_revision = scm_revision ,success = 1 # never used ,log = '' # never used ) @@ -22,11 +23,11 @@ generate_changelog <- function(pkg) { generate_changelog_entry <- function(build, changelog) { # TODO: should say 'New upstream release' when necessary - debversion <- version_new(build$r_version, build$deb_revision, build$deb_epoch) + debversion <- version_new(build$r_version, pkgname=build$package, build$deb_revision, build$deb_epoch) cat(paste(paste(build$srcname,' (',debversion,') unstable; urgency=low',sep='') - ,'' ,paste(' * cran2deb ',build$git_revision + ,'' ,paste(' * cran2deb ',build$scm_revision ,' with DB version ',as.integer(build$db_version),'.',sep='') - ,'',paste(' --',maintainer,'',build$date_stamp) + ,'',paste(' --',maintainer,'',format(build$date_stamp,'%a, %d %b %Y %H:%M:%S %z')) ,'','','',sep='\n'),file=changelog, append=TRUE) } @@ -36,6 +37,9 @@ generate_rules <- function(pkg) { ,'include /usr/share/R/debian/r-cran.mk' ,'',sep='\n') ,file=pkg$debfile('rules')) + if (pkg$name %in% c("Rmpi", "npRmpi", "doMPI")) { + cat("extraInstallFlags=\"--no-test-load\"\n", file=pkg$debfile('rules'), append=TRUE) + } Sys.chmod(pkg$debfile('rules'),'0700') } @@ -108,30 +112,26 @@ prepare_new_debian <- function(pkg,extra_deps) { # says: ``The sources and headers for the compiled code are in src, plus # optionally file Makevars or Makefile.'' It seems unlikely that # architecture independent code would end up here. - if (pkg$is_bundle) { - # if it's a bundle, check each of the packages - pkg$archdep = F - for (pkgname in r_bundle_contains(pkg$name)) { - pkg$archdep = file.exists(file.path(pkg$path,pkgname,'src')) - if (pkg$archdep) { - break - } - } - } else { - pkg$archdep = file.exists(file.path(pkg$path,'src')) - } + pkg$archdep = file.exists(file.path(pkg$path,'src')) pkg$arch <- 'all' if (pkg$archdep) { pkg$arch <- host_arch() } pkg$license <- accept_license(pkg) + notice('getting dependencies') pkg$depends <- get_dependencies(pkg,extra_deps) + notice('applying patches') apply_patches(pkg) + notice('applying lintian fixes') + generate_lintian(pkg) + notice('generating changelog, rules, copyright, and control') generate_changelog(pkg) generate_rules(pkg) generate_copyright(pkg) generate_control(pkg) + ## debdir <- file.path(pkg$path,'debian') + ## system(paste("ls ", debdir, "; ls -l ", debdir, "/patches/*", sep="")) # convert text to utf8 (who knows what the original character set is -- # let's hope iconv DTRT).