[SCM] libdvdcss-pkg/master: compare versions in GNU Make style; generate MD5 files + get-orig-source improvements

onlyjob at users.alioth.debian.org onlyjob at users.alioth.debian.org
Sun May 19 13:00:17 UTC 2013


The following commit has been merged in the master branch:
commit 06defbf5235c143d444affb800806833e31067cd
Author: Dmitry Smirnov <onlyjob at member.fsf.org>
Date:   Sun May 19 12:21:01 2013 +1000

    compare versions in GNU Make style; generate MD5 files + get-orig-source improvements

diff --git a/debian/rules b/debian/rules
index 86bd622..f78ab3b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,15 +7,15 @@
 PKD  = $(abspath $(dir $(MAKEFILE_LIST)))
 PKG  = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
 PKGG = $(patsubst %-pkg,%,$(PKG))css
+VER = $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{Version:\s*([0-9.]+)}')
+VERG = $(shell dpkg-parsechangelog -l$(PKGG)/debian/changelog | perl -ne 'print $$1 if m{Version:\s*([0-9.]+(?:\+svn\d+)*)}')
+ifneq ($(VER), $(VERG))
+    $(error Error: Packages' version mismatch: host/$(VER) != guest/$(VERG))
+endif
 
 %: debian/po/templates.pot
 	dh $@
 
-override_dh_auto_configure:
-	## check if "host" and "guest" packages version match
-	[ $$(dpkg-parsechangelog -l$(PKD)/changelog | sed -n 's/^Version: *//p') \
-        = $$(dpkg-parsechangelog -l$(PKGG)/debian/changelog | sed -n 's/^Version: *//p') ]
-
 debian/po/templates.pot:
 	debconf-updatepo --verbose
 
@@ -32,12 +32,17 @@ override_dh_gencontrol:
 override_dh_builddeb:
 	dh_builddeb -- -Zxz
 
-VER = $(shell dpkg-parsechangelog | perl -ne 'print $$1 if m{Version:\s*([0-9.]+)}')
+.PHONY: get-orig-source
+XZ_FILES=$(notdir $(wildcard $(PKGG)/*.xz))
+MD5_FILES=$(addprefix $(PKGG)/, $(XZ_FILES:.xz=.xz.md5))
 get-orig-source: $(PKG)_$(VER).orig.tar.xz
 	@
 
-$(PKG)_$(VER).orig.tar.xz:
+$(MD5_FILES):
+	md5sum $(@:.xz.md5=.xz) | sed 's!  .*/!  /usr/src/$(PKG)/!' > $@
+
+$(PKG)_$(VER).orig.tar.xz: $(MD5_FILES)
 	mkdir $(PKG)_$(VER)
 	cp -r $(PKGG) $(PKG)_$(VER)/
-	tar -caf $(PKG)_$(VER).orig.tar.xz $(PKG)_$(VER)
+	XZ_OPT="-6v" tar -caf $(PKG)_$(VER).orig.tar.xz $(PKG)_$(VER) --exclude=*.bz2 --owner=root --group=root --mode=a+rX
 	$(RM) -r $(PKG)_$(VER)

-- 
libdvdcss-pkg packaging



More information about the pkg-multimedia-commits mailing list