[Pkg-javascript-commits] [node-safe-buffer] 01/01: Modernize

Bastien Roucariès rouca at moszumanska.debian.org
Mon May 29 15:30:02 UTC 2017


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

rouca pushed a commit to branch master
in repository node-safe-buffer.

commit 1bd25032ddbcc28e3fa4989d699acb5aff235e9a
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Sun May 28 16:14:08 2017 +0200

    Modernize
    
      * Team upload.
      * Use compat 10.
      * Ship browser.js
      * Run test suite.
---
 debian/changelog          | 10 ++++++++++
 debian/compat             |  2 +-
 debian/control            | 10 ++++++----
 debian/install            |  1 +
 debian/rules              | 10 +++++++++-
 debian/tests/control      |  3 +++
 debian/tests/runtestsuite | 14 ++++++++++++++
 debian/watch              |  2 +-
 8 files changed, 45 insertions(+), 7 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 54410d8..49017fb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+node-safe-buffer (5.0.1-2) unstable; urgency=medium
+
+  * Team upload.
+  * Use compat 10.
+  * Ship browser.js
+  * Run test suite.
+  * Upload to unstable.
+
+ -- Bastien Roucariès <rouca at debian.org>  Sun, 28 May 2017 16:14:02 +0200
+
 node-safe-buffer (5.0.1-1) experimental; urgency=low
 
   * Initial release (Closes: #854185)
diff --git a/debian/compat b/debian/compat
index ec63514..f599e28 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-9
+10
diff --git a/debian/control b/debian/control
index 9a5a884..023a4a5 100644
--- a/debian/control
+++ b/debian/control
@@ -1,12 +1,14 @@
 Source: node-safe-buffer
-Section: web
+Section: javascript
 Priority: optional
 Maintainer: Debian Javascript Maintainers <pkg-javascript-devel at lists.alioth.debian.org>
 Uploaders: Shirish Togarla <shirishtogarla533 at gmail.com>
 Build-Depends:
- debhelper (>= 9)
+ debhelper (>= 10)
  , dh-buildinfo
- , nodejs
+ , nodejs (>= 4.7)
+ , dpkg-dev (>= 1.17.14)
+ , node-tape (>= 4.0) <!nocheck>
 Standards-Version: 3.9.8
 Homepage: https://github.com/feross/safe-buffer
 Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-safe-buffer.git
@@ -16,7 +18,7 @@ Package: node-safe-buffer
 Architecture: all
 Depends:
  ${misc:Depends}
- , nodejs
+ , nodejs (>= 4.7)
 Description: Safer Node.js Buffer API
  The goal of this package is to provide a safe replacement for the node.js
  `Buffer`. It's a drop-in replacement for `Buffer`. You can use it by adding
diff --git a/debian/install b/debian/install
index a05ccc9..5ce1e6d 100644
--- a/debian/install
+++ b/debian/install
@@ -1,2 +1,3 @@
 index.js usr/lib/nodejs/safe-buffer/
+browser.js usr/lib/nodejs/safe-buffer/
 package.json usr/lib/nodejs/safe-buffer/
diff --git a/debian/rules b/debian/rules
index de57af0..0dd09e4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,7 +9,15 @@
 
 #override_dh_auto_build:
 
-#override_dh_auto_test:
+override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+	nodejs test.js
+else
+	@echo '**********************************************************'
+	@echo 'Skip test suite                                           '
+	@echo '**********************************************************'
+endif
+
 
 
 
diff --git a/debian/tests/control b/debian/tests/control
index 9beab66..b8d3cef 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,5 @@
 Tests: require
 Depends: node-safe-buffer
+
+Tests: runtestsuite
+Depends: node-safe-buffer, node-tape (>= 4.0)
diff --git a/debian/tests/runtestsuite b/debian/tests/runtestsuite
new file mode 100755
index 0000000..d115c91
--- /dev/null
+++ b/debian/tests/runtestsuite
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+# notice the / at end in order to load this module
+PACKAGE='safe-buffer'
+SEDCMD="s,require\s*[(]\s*'[.]/,require('$PACKAGE/,g"
+
+tmpdir=$(mktemp -d)
+trap 'rm -rf "$tmpdir"' EXIT INT TERM HUP
+
+cp test.js $tmpdir/test.js
+echo 'test.js' | \
+    xargs -n1  \
+	  sh -c 'set -e; echo "TESTING: $3"; sed "$1" < "$3" > "$2/$3"' sedtape "$SEDCMD" "$tmpdir"
+nodejs $tmpdir/test.js
diff --git a/debian/watch b/debian/watch
index e057a11..96ea1c1 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,4 +1,4 @@
-version=3
+version=4
 opts=\
 dversionmangle=s/\+(debian|dfsg|ds|deb)(\.\d+)?$//,\
 filenamemangle=s/.*\/v?([\d\.-]+)\.tar\.gz/node-safe-buffer-$1.tar.gz/ \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-safe-buffer.git



More information about the Pkg-javascript-commits mailing list