[dh-r] 42/43: Add a dh_vignette sequence item

Gordon Ball chronitis-guest at moszumanska.debian.org
Thu Sep 15 13:45:40 UTC 2016


This is an automated email from the git hooks/post-receive script.

chronitis-guest pushed a commit to branch master
in repository dh-r.

commit ec47a95508fe45820f707ac4e2035a1b6a0de236
Author: Gordon Ball <gordon at chronitis.net>
Date:   Thu Sep 15 14:34:44 2016 +0200

    Add a dh_vignette sequence item
---
 debian/dh-r.install |  3 +++
 dh/vignette.pm      | 10 ++++++++++
 scripts/dh_vignette | 11 +++++++++++
 3 files changed, 24 insertions(+)

diff --git a/debian/dh-r.install b/debian/dh-r.install
index 9d00d36..43d11b8 100644
--- a/debian/dh-r.install
+++ b/debian/dh-r.install
@@ -1,3 +1,6 @@
 dh/R.pm usr/share/perl5/Debian/Debhelper/Buildsystem
+dh/vignette.pm usr/share/perl5/Debian/Debhelper/Sequence
+
 scripts/convert-to-dh-r usr/share/dh-r
 scripts/dh-make-R usr/bin
+scripts/dh_vignette usr/bin
diff --git a/dh/vignette.pm b/dh/vignette.pm
new file mode 100644
index 0000000..e573d92
--- /dev/null
+++ b/dh/vignette.pm
@@ -0,0 +1,10 @@
+#!/usr/bin/perl
+# debhelper sequence for R package vignette building
+
+use warnings;
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+insert_before("dh_auto_install", "dh_vignette");
+
+1;
diff --git a/scripts/dh_vignette b/scripts/dh_vignette
new file mode 100755
index 0000000..cca2658
--- /dev/null
+++ b/scripts/dh_vignette
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+# Build and install R vignettes, for use with dh --buildsystem R
+
+mkdir -p inst/doc
+
+LC_ALL=C R --no-save <<EOR
+    tools::buildVignettes(dir=".", tangle=TRUE, quiet=TRUE)
+    v <- tools::pkgVignettes(dir=".", output=TRUE, source=TRUE)
+    f <- c(v[["outputs"]], v[["docs"]], unlist(v[["sources"]], use.names=FALSE))
+    invisible(file.copy(f, "inst/doc"))
+EOR

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/dh-r.git



More information about the debian-science-commits mailing list