X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tags%2Fpre-dual%2FR%2Fzzz.R;fp=tags%2Fpre-dual%2FR%2Fzzz.R;h=050ed0481372028bf7fee2f4977d96460ac8ac24;hb=ab9547f1dd3779e34528a7a638ed085d5b9c5e26;hp=0000000000000000000000000000000000000000;hpb=4baac28764128067cb2fd6343321e7e0f522bdfd;p=cran2deb.git diff --git a/tags/pre-dual/R/zzz.R b/tags/pre-dual/R/zzz.R new file mode 100644 index 0000000..050ed04 --- /dev/null +++ b/tags/pre-dual/R/zzz.R @@ -0,0 +1,34 @@ +.First.lib <- function(libname, pkgname) { + global <- function(name,value) assign(name,value,envir=.GlobalEnv) + global("which_system", Sys.getenv('CRAN2DEB_SYS','debian-amd64')) + if (!length(grep('^[a-z]+-[a-z0-9]+$',which_system))) { + stop('Invalid system specification: must be of the form name-arch') + } + global("host_arch", gsub('^[a-z]+-','',which_system)) + global("maintainer", 'cran2deb autobuild ') + global("root", system.file(package='cran2deb')) + global("cache_root", '/var/cache/cran2deb') + global("pbuilder_results", file.path('/var/cache/cran2deb/results',which_system)) + global("pbuilder_config", file.path('/etc/cran2deb/sys',which_system,'pbuilderrc')) + global("dput_config", file.path('/etc/cran2deb/sys',which_system,'dput.cf')) + global("dinstall_config", file.path('/etc/cran2deb/sys',which_system,'mini-dinstall.conf')) + global("dinstall_archive", file.path('/etc/cran2deb/archive',which_system)) + global("r_depend_fields", c('Depends','Imports')) # Suggests, Enhances + global("scm_revision", paste("svn:", svnversion())) + global("patch_dir", '/etc/cran2deb/patches') + global("lintian_dir", '/etc/cran2deb/lintian') + global("changesfile", function(srcname,version='*') { + return(file.path(pbuilder_results + ,paste(srcname,'_',version,'_' + ,host_arch,'.changes',sep=''))) + }) + global("version_suffix","cran") + # perhaps db_cur_version() should be used instead? + global("version_suffix_step",1) + + cache <- file.path(cache_root,'cache.rda') + if (file.exists(cache)) { + load(cache,envir=.GlobalEnv) + } + message(paste('I: cran2deb',scm_revision,'building for',which_system,'at',Sys.time())) +}