[Pkg-javascript-commits] [node-parents] 26/29: Improve rules
Bastien Roucariès
rouca at moszumanska.debian.org
Sun Aug 20 13:47:05 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-parents.
commit e0bc852bd63f58bff1b67c4ee1c07ac348318400
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date: Fri Aug 18 00:27:54 2017 +0200
Improve rules
---
debian/control | 1 +
debian/examples | 1 +
debian/rules | 15 +++++++++++++--
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/debian/control b/debian/control
index 4e39b6d..db36ebe 100644
--- a/debian/control
+++ b/debian/control
@@ -7,6 +7,7 @@ Build-Depends:
debhelper (>= 10)
, dh-buildinfo
, nodejs (>= 4)
+ , node-tap (>= 0.2.5) <!nocheck>
Standards-Version: 4.0.1
Homepage: https://github.com/substack/node-parents
Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-parents.git
diff --git a/debian/examples b/debian/examples
new file mode 100644
index 0000000..700b101
--- /dev/null
+++ b/debian/examples
@@ -0,0 +1 @@
+example/*.js
diff --git a/debian/rules b/debian/rules
index de57af0..add5285 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,9 +7,20 @@
%:
dh $@
-#override_dh_auto_build:
-#override_dh_auto_test:
+override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
+ tap test/*.js
+else
+ @echo '**********************************************************'
+ @echo 'Skip test suite '
+ @echo '**********************************************************'
+endif
+override_dh_installexamples:
+ dh_installexamples
+ # patch example
+ find $(CURDIR)/debian/node-parents/usr/share/doc/node-parents/examples/ -name '*.js' -exec \
+ sed -i "s,require\s*[(]\s*'[.][.][^']*'\s*[)],require('node-parents'),g" {} \;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-parents.git
More information about the Pkg-javascript-commits
mailing list