From 28df82cfbd284d7ac8f61b7a8ad34ce5fc691ee3 Mon Sep 17 00:00:00 2001 From: edd Date: Sun, 6 Dec 2009 04:57:51 +0000 Subject: [PATCH] trying to a lintian layer similar to patches as we cannot patch inside debian/ git-svn-id: svn://svn.r-forge.r-project.org/svnroot/cran2deb@292 edb9625f-4e0d-4859-8d74-9fd3b1da38cb --- trunk/R/debianpkg.R | 1 + trunk/R/lintian.R | 14 ++++++++++++++ trunk/R/zzz.R | 1 + 3 files changed, 16 insertions(+) create mode 100644 trunk/R/lintian.R diff --git a/trunk/R/debianpkg.R b/trunk/R/debianpkg.R index 0012c2b..63aaadd 100644 --- a/trunk/R/debianpkg.R +++ b/trunk/R/debianpkg.R @@ -129,6 +129,7 @@ prepare_new_debian <- function(pkg,extra_deps) { pkg$license <- accept_license(pkg) pkg$depends <- get_dependencies(pkg,extra_deps) apply_patches(pkg) + generate_lintian(pkg) generate_changelog(pkg) generate_rules(pkg) generate_copyright(pkg) diff --git a/trunk/R/lintian.R b/trunk/R/lintian.R new file mode 100644 index 0000000..7a3efe2 --- /dev/null +++ b/trunk/R/lintian.R @@ -0,0 +1,14 @@ +apply_lintian <- function(pkg) { + lintian_src = file.path(lintian_dir, pkg$name) + if (!file.exists(lintian_src)) { + notice('no lintian overrides ', lintian_src) + return() + } + + # copy the lintian file + notice('including lintian file', lintian_src) + lintian_tgt <- pkg$debfile(paste(pkg$debname, "lintian-overrides", sep=".")) + file.copy(lintian_src, lintian_tgt) + invisible(NULL) +} + diff --git a/trunk/R/zzz.R b/trunk/R/zzz.R index 8861328..050ed04 100644 --- a/trunk/R/zzz.R +++ b/trunk/R/zzz.R @@ -16,6 +16,7 @@ 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,'_' -- 2.39.2