[Pkg-javascript-commits] [node-async] 20/26: Tighten rules file: Generalize resolving JavaScript source files.

Jonas Smedegaard dr at jones.dk
Sun Jan 7 17:19:56 UTC 2018


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

js pushed a commit to annotated tag debian/0.8.0-2
in repository node-async.

commit 2195780be6c7e0d79f33907362a9945f00b68dbd
Author: Jonas Smedegaard <dr at jones.dk>
Date:   Sun Jan 7 17:30:52 2018 +0100

    Tighten rules file: Generalize resolving JavaScript source files.
---
 debian/rules | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/debian/rules b/debian/rules
index 62db5f5..2a7eb40 100755
--- a/debian/rules
+++ b/debian/rules
@@ -23,23 +23,22 @@ lib = $(patsubst node-%,%,$(DEB_SOURCE_PACKAGE))
 pkg-js = libjs-$(lib)
 pkg-node = node-$(lib)
 js-basedir = lib/
-#js-stems = $(basename $(wildcard $(js-basedir)*.js))
-js-stems = $(lib)
-js-min = $(js-stems:%=debian/%.min.js)
+js-plain = $(wildcard $(js-basedir)*.js)
+js-minified = $(patsubst $(js-basedir)%.js,debian/%.min.js,$(js-plain))
 js-destdir = /usr/share/javascript/$(lib)
 node-destdir = /usr/lib/nodejs/$(lib)
 
 DEB_INSTALL_DOCS_ALL += README.md
 
-DEB_DH_INSTALL_ARGS_$(pkg-js) = $(js-stems:%=$(js-basedir)%.js) debian/*.min.js $(js-destdir)
+DEB_DH_INSTALL_ARGS_$(pkg-js) = $(js-plain) $(js-minified) $(js-destdir)
 DEB_DH_INSTALL_ARGS_$(pkg-node) = package.json $(node-destdir)
 DEB_DH_LINK_$(pkg-node) = $(js-destdir)/$(lib).js $(node-destdir)/index.js
 
-build/$(pkg-js):: $(js-min)
-$(js-min): debian/%.min.js: $(js-basedir)%.js
+build/$(pkg-js):: $(js-minified)
+debian/%.min.js: $(js-basedir)%.js
 	uglifyjs -o $@ $<
 clean::
-	rm -f debian/*.js
+	rm -f $(js-minified)
 
 # Unset executable bit on library files
 binary-post-install/$(pkg-js)::

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



More information about the Pkg-javascript-commits mailing list