[debian-edu-commits] debian-edu/ 09/32: debian/rules: Provide get-orig-source rule, repack upstream sources: Remove minified ejs.min.js file from upstream tarball.

Mike Gabriel sunweaver at debian.org
Mon Aug 18 15:09:44 UTC 2014


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

sunweaver pushed a commit to annotated tag debian/1_2.0.2+dfsg1-1
in repository italc.

commit 229231d9f27040c421858c9f42d5b1e6b58545a6
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Aug 14 13:41:18 2014 +0200

    debian/rules: Provide get-orig-source rule, repack upstream sources: Remove minified ejs.min.js file from upstream tarball.
---
 debian/rules | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/debian/rules b/debian/rules
index f754070..d1473b7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,6 +4,14 @@ include /usr/share/dpkg/buildflags.mk
 include /usr/share/cdbs/1/class/cmake.mk
 include /usr/share/cdbs/1/rules/debhelper.mk
 
+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 = +dfsg1
+VER  ?= $(subst $(DTYPE),,$(UVER))
+
 DEB_DH_INSTALL_SOURCEDIR = debian/tmp
 CPPFLAGS += -I/usr/include/X11
 CFLAGS += -fPIC
@@ -41,3 +49,26 @@ clean::
 	rm -f lupus/config.status
 	rm -f config.log
 	rm -f config.status
+
+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.bz2 --directory $(PKG)-$(VER) --strip-components 1 \
+	    || $(RM) -r $(PKG)-$(VER)
+	@echo "# Cleaning-up..."
+	cd $(PKG)-$(VER) \
+	    && find . -depth -type d -name 'windows' -exec $(RM) -r {} \; -printf 'removed %p\n' \
+	    && $(RM) -r -v \
+	        ica/x11/common/sha1.* \
+	        $(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)"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/italc.git



More information about the debian-edu-commits mailing list