[Pkg-javascript-commits] [sockjs-client] 03/03: Provide a dfsg-free orig package by means of filtering files out in debian/rules.

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Sat Mar 1 18:16:55 UTC 2014


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

tonnerre-guest pushed a commit to branch master
in repository sockjs-client.

commit 7d8985898f62d2a241d1a1d0c72e4d3fa382fc35
Author: Tonnerre LOMBARD <tonnerre at ancient-solutions.com>
Date:   Fri Feb 28 09:13:44 2014 +0000

    Provide a dfsg-free orig package by means of filtering files out in
    debian/rules.
---
 debian/changelog |  2 +-
 debian/rules     | 29 +++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 3b3d06e..973ffd0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-sockjs-client (0.3.4-1) unstable; urgency=low
+sockjs-client (0.3.4+dfsg-1) unstable; urgency=low
 
   * Initial release. Closes: #733821
 
diff --git a/debian/rules b/debian/rules
index 1ce9efc..255db85 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,10 +1,39 @@
 #!/usr/bin/make -f
 
+PKD   = $(abspath $(dir $(MAKEFILE_LIST)))
+PKG   = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
+UVER  = $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};')
+DTYPE = +dfsg
+VER  ?= $(subst $(DTYPE),,$(UVER))
+
 export NODE_PATH=/usr/lib/nodejs/optparse
 
+.PHONY: get-orig-source
+
+get-orig-source: $(PKG)_$(VER)$(DTYPE).orig.tar.xz $(info I: $(PKG)_$(VER)$(DTYPE))
+	@
+
+$(PKG)_$(VER)$(DTYPE).orig.tar.xz:
+	@echo "# Downloading..."
+	uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(PKD)
+	$(if $(wildcard $(PKG)-$(VER)),$(error $(PKG)-$(VER) exist, aborting..))
+	@echo "# Extracting..."
+	mkdir $(PKG)-$(VER) \
+	&& tar -xf $(PKG)_$(VER).orig.tar.* --directory $(PKG)-$(VER) --strip-components 1 \
+	|| $(RM) -r $(PKG)-$(VER)
+	@echo "# Cleaning-up..."
+	cd $(PKG)-$(VER) \
+	&& find . -depth -type f -name '*.min.js' -exec $(RM) -f {} \; -printf 'removed %p\n'
+	@echo "# Packing..."
+	find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \
+	| XZ_OPT="-9v" tar -caf "$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
+	&& $(RM) -r "$(PKG)-$(VER)"
+
 # We cannot run the tests, we'd need sockjs-node for that.
 override_dh_auto_test:
 
+
+
 # Delete copyright-problematic files from the tests.
 override_dh_auto_clean:
 	rm -f lib/json2.min.js tests/html/qunit.min.js

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



More information about the Pkg-javascript-commits mailing list