depends <- lapply(depends,unique)
# append the Debian dependencies
- depends$build=c(depends$build,'debhelper (>> 4.1.0)','cdbs')
+ depends$build=c(depends$build,'debhelper (>> 4.1.0)','cdbs','dpatch')
if (pkg$archdep) {
depends$bin=c(depends$bin,'${shlibs:Depends}')
}
pkg$license <- accept_license(pkg)
pkg$depends <- get_dependencies(pkg,extra_deps)
+ apply_patches(pkg)
generate_changelog(pkg)
generate_rules(pkg)
generate_copyright(pkg)
--- /dev/null
+apply_patches <- function(pkg) {
+ patch_path = file.path(patch_dir, pkg$name)
+ if (!file.exists(patch_path)) {
+ notice('no patches in',patch_path)
+ return()
+ }
+
+ # make debian/patches for simple-patchsys
+ deb_patch = pkg$debfile('patches')
+ if (!dir.create(deb_patch)) {
+ fail('could not create patches directory', deb_patch)
+ }
+
+ # now just copy the contents of patch_path into debian/patches
+ for (patch in list.files(patch_path)) {
+ notice('including patch', patch)
+ file.copy(file.path(patch_path, patch), deb_patch)
+ }
+}
+
global("dinstall_archive", '/etc/cran2deb/archive')
global("r_depend_fields", c('Depends','Imports')) # Suggests, Enhances
global("scm_revision", 'svn:$Id$')
+ global("patch_dir", '/etc/cran2deb/patches')
global("changesfile", function(srcname,version='*') {
return(file.path(pbuilder_results
,paste(srcname,'_',version,'_'