]> git.donarmstrong.com Git - cran2deb.git/commitdiff
trying to a lintian layer similar to patches as we cannot patch inside debian/
authoredd <edd@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Sun, 6 Dec 2009 04:57:51 +0000 (04:57 +0000)
committeredd <edd@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Sun, 6 Dec 2009 04:57:51 +0000 (04:57 +0000)
git-svn-id: svn://svn.r-forge.r-project.org/svnroot/cran2deb@292 edb9625f-4e0d-4859-8d74-9fd3b1da38cb

trunk/R/debianpkg.R
trunk/R/lintian.R [new file with mode: 0644]
trunk/R/zzz.R

index 0012c2bd63464a7b6f938b0b1842fd969fa915d5..63aaaddd7237786e9d8d31d2907d8bf71005ad01 100644 (file)
@@ -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 (file)
index 0000000..7a3efe2
--- /dev/null
@@ -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)
+}
+
index 8861328a76f54977bca4bda0a6ea9cdcc8763517..050ed0481372028bf7fee2f4977d96460ac8ac24 100644 (file)
@@ -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,'_'