[mate-applet-lockkeys] 03/05: debian/rules (et al.): use repack logic to remove build cruft from upstream source tarball.

Mike Gabriel sunweaver at debian.org
Thu Feb 19 16:02:45 UTC 2015


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

sunweaver pushed a commit to branch master
in repository mate-applet-lockkeys.

commit 75b01c53e9020d93e684d6f678618778e3891350
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Feb 19 17:01:52 2015 +0100

    debian/rules (et al.): use repack logic to remove build cruft from upstream source tarball.
---
 debian/changelog |  2 +-
 debian/rules     | 53 +++++++++++++++++++++++++++++++++++++++++++++++++----
 debian/watch     |  1 +
 3 files changed, 51 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index a71b58d..d604dfd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-mate-applet-lockkeys (0.2.4-1) UNRELEASED; urgency=low
+mate-applet-lockkeys (0.2.4+repack1-1) UNRELEASED; urgency=low
 
   * Initial release (Closes: #776381).
 
diff --git a/debian/rules b/debian/rules
index cbc8c10..c5aa134 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,13 @@
 
 DHFLAGS=--parallel
 
+NULL  =
+PKD   = $(word 1,$(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 = +repack1
+VER  ?= $(subst $(DTYPE),,$(UVER))
+
 %:
 	dh $@ $(DHFLAGS)
 
@@ -10,13 +17,51 @@ override_dh_install:
 	rm -fv debian/tmp/usr/share/glib-2.0/schemas/gschemas.compiled
 
 override_dh_auto_configure:
+	cp debian/autogen.sh autogen.sh
 	NOCONFIGURE=1 ./autogen.sh
 	dh_auto_configure $(DHFLAGS) -- \
-		--prefix=/usr
-		--libexecdir=/usr/lib/mate-applet-lockkeys
+	        --prefix=/usr
+	        --libexecdir=/usr/lib/mate-applet-lockkeys
+	rm -f autogen.sh
 
 override_dh_strip:
 	dh_strip -pmate-applet-lockkeys --dbg-package=mate-applet-lockkeys
 
-get-orig-source:
-	uscan --noconf --force-download --rename --download-current-version --destdir=..
+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) \
+	    && $(RM) -r -v \
+	    images/Makefile.in \
+	    src/Makefile.in \
+	    m4 \
+	    po/Makefile.in.in \
+	    po/boldquot.sed \
+	    po/en at boldquot.header \
+	    po/en at quot.header \
+	    po/insert-header.sin \
+	    po/quot.sed \
+	    po/remove-potcdate.sin \
+	    po/Rules-quot \
+	    Makefile.in \
+	    aclocal.m4 \
+	    config.* \
+	    configure \
+	    depcomp \
+	    install-sh \
+	    missing \
+	    $(NULL)
+	$(RM) -v $(PKG)_$(VER).orig.tar.*
+	@echo "# Packing..."
+	find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \
+	    | XZ_OPT="-6v" tar -caf "$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
+	    && $(RM) -r "$(PKG)-$(VER)"
diff --git a/debian/watch b/debian/watch
index 3ee6a63..8dcbb6b 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,4 @@
 version=3
+opts=dversionmangle=s/\+repack1// \
 http://www.zavedil.com/mate-lock-keys-applet/ \
     /wp-content/uploads/[\d]{4}/[\d]{2}/mate-applet-lockkeys-([\d\.]+).tar.gz

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/mate-applet-lockkeys.git



More information about the pkg-mate-commits mailing list