[Pkg-javascript-commits] [node-leveldown] 01/05: add rules for repacking source tarball
Andrew Kelley
andrewrk-guest at moszumanska.debian.org
Fri Jul 11 20:14:15 UTC 2014
This is an automated email from the git hooks/post-receive script.
andrewrk-guest pushed a commit to branch master
in repository node-leveldown.
commit b49037b40a1abaf36be74237865cfb9308c86c0e
Author: Andrew Kelley <superjoe30 at gmail.com>
Date: Fri Jul 11 20:03:35 2014 +0000
add rules for repacking source tarball
---
debian/changelog | 2 +-
debian/rules | 27 +++++++++++++++++++++++++++
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 6a67aa1..de1749e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-node-leveldown (0.10.2-1) UNRELEASED; urgency=low
+node-leveldown (0.10.2+dfsg-1) UNRELEASED; urgency=low
* Initial release. (Closes: #753278)
diff --git a/debian/rules b/debian/rules
index 037750f..2a1ed8a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,6 +7,13 @@
SHLIBSDIR = debian/node-leveldown/usr/lib/nodejs/leveldown/build
SHLIBS = leveldown.node
+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))
+
+
%:
dh $@
@@ -35,3 +42,23 @@ override_dh_shlibdeps:
override_dh_installchangelogs:
dh_installchangelogs CHANGELOG.md
+.PHONY: get-orig-source
+get-orig-source: $(PKG)_$(VER)$(DTYPE).orig.tar.gz $(info I: $(PKG)_$(VER)$(DTYPE))
+ @
+
+$(PKG)_$(VER)$(DTYPE).orig.tar.gz:
+ @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) \
+ && $(RM) -rfv deps
+ $(RM) -v $(PKG)_$(VER).orig.tar.*
+ @echo "# Packing..."
+ find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \
+ | tar -caf "$(PKG)_$(VER)$(DTYPE).orig.tar.gz" -T- --owner=root --group=root --mode=a+rX \
+ && $(RM) -r "$(PKG)-$(VER)"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-leveldown.git
More information about the Pkg-javascript-commits
mailing list