[Pkg-javascript-commits] [node-module-deps] 440/444: Finalize debianization
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 15 09:48:21 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-module-deps.
commit bca6dc9f9c7b7d53e58fe2370f0eb503c7b0ee65
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date: Mon Sep 25 15:25:07 2017 +0200
Finalize debianization
---
debian/control | 32 +++++++++++++++++---------------
debian/copyright | 3 +--
debian/rules | 18 ++++++++++++++++++
debian/tests/control | 8 +++++++-
debian/tests/require | 2 +-
debian/tests/runtestsuite | 15 +++++++++++++++
6 files changed, 59 insertions(+), 19 deletions(-)
diff --git a/debian/control b/debian/control
index 52c965a..0e44bf2 100644
--- a/debian/control
+++ b/debian/control
@@ -7,22 +7,24 @@ Build-Depends:
debhelper (>= 10)
, dh-buildinfo
, dpkg-dev (>= 1.17.14)
- , nodejs (>= 6) <!nocheck>
- , node-detective (>= 4.0.0) <!nocheck>
- , node-concat-stream (>= 1.5.0) <!nocheck>
- , node-browser-resolve (>= 1.7.0) <!nocheck>
- , node-subarg (>= 1.0.0) <!nocheck>
- , node-parents (>= 1.0.0) <!nocheck>
- , node-resolve (>= 1.1.3) <!nocheck>
- , node-inherits (>= 2.0.1) <!nocheck>
- , node-stream-combiner2 (>= 1.1.1) <!nocheck>
- , node-defined (>= 1.0.0) <!nocheck>
- , node-duplexer2 (>= 0.1.2) <!nocheck>
- , node-jsonstream (>= 1.0.3) <!nocheck>
- , node-cached-path-relative (>= 1.0.0) <!nocheck>
- , node-through2 (>= 2.0.0) <!nocheck>
- , node-xtend (>=4.0.0) <!nocheck>
+ , nodejs (>= 6) <!nocheck> <!nodoc>
+ , node-detective (>= 4.0.0) <!nocheck> <!nodoc>
+ , node-concat-stream (>= 1.5.0) <!nocheck> <!nodoc>
+ , node-browser-resolve (>= 1.7.0) <!nocheck> <!nodoc>
+ , node-subarg (>= 1.0.0) <!nocheck> <!nodoc>
+ , node-parents (>= 1.0.0) <!nocheck> <!nodoc>
+ , node-resolve (>= 1.1.3) <!nocheck> <!nodoc>
+ , node-inherits (>= 2.0.1) <!nocheck> <!nodoc>
+ , node-stream-combiner2 (>= 1.1.1) <!nocheck> <!nodoc>
+ , node-defined (>= 1.0.0) <!nocheck> <!nodoc>
+ , node-duplexer2 (>= 0.1.2) <!nocheck> <!nodoc>
+ , node-jsonstream (>= 1.0.3) <!nocheck> <!nodoc>
+ , node-cached-path-relative (>= 1.0.0) <!nocheck> <!nodoc>
+ , node-through2 (>= 2.0.0) <!nocheck> <!nodoc>
+ , node-xtend (>=4.0.0) <!nocheck> <!nodoc>
+ , node-tap (>= 1.0) <!nocheck>
, node-browser-pack (>= 5.0.0) <!nocheck>
+ , node-jsonstream <!nodoc>
Standards-Version: 4.1.0
Homepage: https://github.com/substack/module-deps
Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-module-deps.git
diff --git a/debian/copyright b/debian/copyright
index 50bd665..d3965cc 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,4 +1,4 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: module-deps
Upstream-Contact: https://github.com/substack/module-deps/issues
Source: https://github.com/substack/module-deps
@@ -45,4 +45,3 @@ License: Expat
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-
diff --git a/debian/rules b/debian/rules
index 7e8d81f..0c677d0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -21,3 +21,21 @@ endif
override_dh_fixperms:
dh_fixperms
chmod a+x debian/node-module-deps/usr/lib/nodejs/module-deps/bin/cmd.js
+
+
+example/output.json: example/deps.js
+ node example/deps.js > example/output.json
+
+ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
+override_dh_installexamples: example/output.json
+ dh_installexamples
+ # patch example
+ find $(CURDIR)/debian/node-module-deps/usr/share/doc/node-module-deps/examples/ -name '*.js' -exec \
+ sed -i "s,require\s*[(]\s*'[.][.][^']*'\s*[)],require('module-deps'),g" {} \;
+else
+override_dh_installexamples:
+endif
+
+override_dh_auto_clean:
+ dh_auto_clean
+ rm -f example/output.json
diff --git a/debian/tests/control b/debian/tests/control
index f5762cb..5d9fbaa 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,8 @@
Tests: require
-Depends: node-module-deps
+Depends: node-module-deps, node (>= 6)
+
+Tests: runtestsuite
+Depends: node-module-deps, node-tap (>= 1.0), node-browser-pack (>= 5.0), node (>=6)
+
+Tests: runexamples
+Depends: node-module-deps, node (>= 6), node-json-stream
diff --git a/debian/tests/require b/debian/tests/require
index 23c6fff..8a17970 100644
--- a/debian/tests/require
+++ b/debian/tests/require
@@ -1,3 +1,3 @@
#!/bin/sh
set -e
-nodejs -e "require('module-deps');"
+node -e "require('module-deps');"
diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
new file mode 100755
index 0000000..182a9bb
--- /dev/null
+++ b/debian/tests/runtestsuite
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -e
+# notice the / at end in order to load this module
+PACKAGE='module-deps'
+SEDCMD="s,(require|resolve)\s*[(]\s*'[.][.]/,\\1('$PACKAGE,g"
+
+tmpdir=$(mktemp -d)
+trap 'rm -rf "$tmpdir"' EXIT INT TERM HUP
+
+cp -r test $tmpdir/test
+find test/ -maxdepth 1 -name '*.js' -print0 | \
+ xargs -0 -n1 \
+ sh -c 'set -e; echo "TESTING: $3"; sed -E "$1" < "$3" > "$2/$3"' sedtape "$SEDCMD" "$tmpdir"
+cd $tmpdir
+tap test/*.js
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-module-deps.git
More information about the Pkg-javascript-commits
mailing list