[Pkg-javascript-commits] [node-argparse] 01/05: Add patches

Jonathan Horn jonathanh-guest at moszumanska.debian.org
Fri Jan 8 15:42:52 UTC 2016


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

jonathanh-guest pushed a commit to branch master
in repository node-argparse.

commit ce722df545707cb31fea5065b87f1eea1d7523c8
Author: Jonathan Ulrich Horn <debian at autoit4you.de>
Date:   Fri Jan 8 16:15:56 2016 +0100

    Add patches
---
 debian/patches/01_nodejs_debian.diff | 31 +++++++++++++++++++
 debian/patches/02_make_sane.diff     | 58 ++++++++++++++++++++++++++++++++++++
 debian/patches/10_no_linting.diff    | 19 ++++++++++++
 debian/patches/series                |  3 ++
 debian/rules                         |  2 +-
 5 files changed, 112 insertions(+), 1 deletion(-)

diff --git a/debian/patches/01_nodejs_debian.diff b/debian/patches/01_nodejs_debian.diff
new file mode 100644
index 0000000..5daea1e
--- /dev/null
+++ b/debian/patches/01_nodejs_debian.diff
@@ -0,0 +1,31 @@
+Description: Change node commands to nodejs
+ While the nodejs upstream is shipping the software as node-binary
+ Debian ships it as nodejs. Due to that all node commands have to be
+ changed from 'node' to 'nodejs'.
+Author: Jonathan Ulrich Horn <debian at autoit4you.de>
+Origin: vendor
+Forwarded: not-needed
+Last-Update: 2016-01-08
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,7 @@
+ PATH        := ./node_modules/.bin:${PATH}
+ 
+-NPM_PACKAGE := $(shell node -e 'process.stdout.write(require("./package.json").name)')
+-NPM_VERSION := $(shell node -e 'process.stdout.write(require("./package.json").version)')
++NPM_PACKAGE := $(shell nodejs -e 'process.stdout.write(require("./package.json").name)')
++NPM_VERSION := $(shell nodejs -e 'process.stdout.write(require("./package.json").version)')
+ 
+ TMP_PATH    := /tmp/${NPM_PACKAGE}-$(shell date +%s)
+ 
+@@ -75,7 +75,7 @@
+ 		git commit -q -m 'Recreated docs'
+ 	cd ${TMP_PATH} && \
+ 		git remote add remote ${REMOTE_REPO} && \
+-		git push --force remote +master:gh-pages 
++		git push --force remote +master:gh-pages
+ 	rm -rf ${TMP_PATH}
+ 
+ 
diff --git a/debian/patches/02_make_sane.diff b/debian/patches/02_make_sane.diff
new file mode 100644
index 0000000..28d9e29
--- /dev/null
+++ b/debian/patches/02_make_sane.diff
@@ -0,0 +1,58 @@
+Description: Keep the variables as local as possible
+ To keep the namespace sane and only execute shell commands that
+ have to be executed, variables, that are only needed in one make section,
+ have been shifted to where they are needed and thus are not global anymore.
+Author: Jonathan Ulrich Horn <debian at autoit4you.de>
+Origin: vendor
+Bug: <URL to the upstream bug report if any, implies patch has been forwarded, optional>
+Last-Update: 2016-01-08
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/Makefile
++++ b/Makefile
+@@ -1,17 +1,3 @@
+-PATH        := ./node_modules/.bin:${PATH}
+-
+-NPM_PACKAGE := $(shell nodejs -e 'process.stdout.write(require("./package.json").name)')
+-NPM_VERSION := $(shell nodejs -e 'process.stdout.write(require("./package.json").version)')
+-
+-TMP_PATH    := /tmp/${NPM_PACKAGE}-$(shell date +%s)
+-
+-REMOTE_NAME ?= origin
+-REMOTE_REPO ?= $(shell git config --get remote.${REMOTE_NAME}.url)
+-
+-CURR_HEAD   := $(firstword $(shell git show-ref --hash HEAD | cut --bytes=-6) master)
+-GITHUB_PROJ := nodeca/${NPM_PACKAGE}
+-
+-
+ help:
+ 	echo "make help       - Print this help"
+ 	echo "make lint       - Lint sources with JSHint"
+@@ -42,6 +28,7 @@
+ 
+ 
+ doc:
++	CURR_HEAD   := $(firstword $(shell git show-ref --hash HEAD | cut --bytes=-6) master)
+ 	@if test ! `which ndoc` ; then \
+ 		echo "You need 'ndoc' installed in order to generate docs." >&2 ; \
+ 		echo "  $ npm install -g ndoc" >&2 ; \
+@@ -62,6 +49,9 @@
+ 
+ 
+ gh-pages:
++	REMOTE_NAME ?= origin
++	REMOTE_REPO ?= $(shell git config --get remote.${REMOTE_NAME}.url)
++	TMP_PATH    := /tmp/${NPM_PACKAGE}-$(shell date +%s)
+ 	@if test -z ${REMOTE_REPO} ; then \
+ 		echo 'Remote repo URL not found' >&2 ; \
+ 		exit 128 ; \
+@@ -80,6 +70,9 @@
+ 
+ 
+ publish:
++	NPM_PACKAGE := $(shell nodejs -e 'process.stdout.write(require("./package.json").name)')
++	NPM_VERSION := $(shell nodejs -e 'process.stdout.write(require("./package.json").version)')
++	GITHUB_PROJ := nodeca/${NPM_PACKAGE}
+ 	@if test 0 -ne `git status --porcelain | wc -l` ; then \
+ 		echo "Unclean working tree. Commit or stash changes first." >&2 ; \
+ 		exit 128 ; \
diff --git a/debian/patches/10_no_linting.diff b/debian/patches/10_no_linting.diff
new file mode 100644
index 0000000..20166ee
--- /dev/null
+++ b/debian/patches/10_no_linting.diff
@@ -0,0 +1,19 @@
+Description: Don't automatically execute linting, when doing tests
+Author: Jonathan Ulrich Horn <debian at autoit4you.de>
+Origin: vendor
+Bug: <URL to the upstream bug report if any, implies patch has been forwarded, optional>
+Forwarded: <URL|no|not-needed, useless if you have a Bug field, optional>
+Last-Update: 2016-01-08
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/Makefile
++++ b/Makefile
+@@ -18,7 +18,7 @@
+ 	jshint . --show-non-errors
+ 
+ 
+-test: lint
++test:
+ 	@if test ! `which mocha` ; then \
+ 		echo "You need 'mocha' installed in order to run tests." >&2 ; \
+ 		echo "  $ make dev-deps" >&2 ; \
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..f844837
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+01_nodejs_debian.diff
+02_make_sane.diff
+10_no_linting.diff
diff --git a/debian/rules b/debian/rules
index ef7a64c..917eedc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,7 +5,7 @@
 #export DH_VERBOSE=1
 
 %:
-	dh $@
+	dh $@ --with quilt
 
 #override_dh_auto_build:
 

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



More information about the Pkg-javascript-commits mailing list