]> git.donarmstrong.com Git - cran2deb.git/blobdiff - trunk/R/zzz.R
use CRAN2DEB_CACHE and CRAN2DEB_CONFDIR env variables
[cran2deb.git] / trunk / R / zzz.R
index 050ed0481372028bf7fee2f4977d96460ac8ac24..81aa0bf1cdabe3d6ddca45e18fa5fee60593ab79 100644 (file)
@@ -7,16 +7,17 @@
     global("host_arch", gsub('^[a-z]+-','',which_system))
     global("maintainer", 'cran2deb autobuild <cran2deb@gmail.com>')
     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("cache_root", Sys.getenv('CRAN2DEB_CACHE','/var/cache/cran2deb'))
+    global("config_dir", Sys.getenv('CRAN2DEB_CONFDIR','/etc/cran2deb'))
+    global("pbuilder_results",  file.path(cache_root,which_system))
+    global("pbuilder_config",   file.path(config_dir,'sys',which_system,'pbuilderrc'))
+    global("dput_config",       file.path(config_dir,'sys',which_system,'dput.cf'))
+    global("dinstall_config",   file.path(config_dir,'sys',which_system,'mini-dinstall.conf'))
+    global("dinstall_archive",  file.path(config_dir,'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("patch_dir", file.path(config_dir,'patches'))
+    global("lintian_dir", file.path(config_dir,'lintian'))
     global("changesfile", function(srcname,version='*') {
         return(file.path(pbuilder_results
                         ,paste(srcname,'_',version,'_'