[Pkg-phototools-devel] [PATCH 2/4] Drop Visual C++ files from tarball

Andreas Metzler ametzler at downhill.at.eu.org
Mon Sep 13 13:07:04 UTC 2010


Reintroduce support for dropping files to debian/rules' get-orig-source
target. Use it to drop Visual C++ files from tarball. Use +dfsg
versioning.
---
 debian/changelog |    3 +++
 debian/rules     |   12 +++++++++++-
 debian/watch     |    2 +-
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index ce7f2d8..90d1c2b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,9 @@
 libpano13 (2.9.17+dfsg-1) experimental; urgency=low
 
   * New upstream version.
+  * Reintroduce support for dropping files to debian/rules' get-orig-source
+    target.
+  * Drop Visual C++ files from tarball, use +dfsg versioning.
 
  -- Andreas Metzler <ametzler at debian.org>  Mon, 13 Sep 2010 13:59:41 +0200
 
diff --git a/debian/rules b/debian/rules
index d01d675..1a47a72 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,7 +9,7 @@ include /usr/share/cdbs/1/class/autotools.mk
 
 # For the repack: package name, mangled upstream version, non-free files
 PACKAGE=libpano13
-VERSION=$(shell dpkg-parsechangelog | perl -ne 'print "$$1\n" if (/^Version: (.*?)(?:\.dfsg)?\-.*?$$/)')
+VERSION=$(shell dpkg-parsechangelog | perl -ne 'print "$$1\n" if (/^Version: (.*?)(?:\+dfsg)?\-.*?$$/)')
 
 
 # --{list,fail}-missing don't make sense when dh_install is called for each
@@ -54,3 +54,13 @@ get-orig-source:
 	# Download
 	uscan --force-download --rename
 
+	# Extract and prune non-free files
+	tar xfz ../$(PACKAGE)_$(VERSION).orig.tar.gz
+	find $(PACKAGE)-$(VERSION) \( -name '*.rc' -or -name '*.vcproj' \
+		-or -name '*.sln' -or -name '*.vsprops' \) -type f -delete
+
+	# Rename, repack and clean
+	mv $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION).orig
+	tar cfz ../$(PACKAGE)_$(VERSION)+dfsg.orig.tar.gz $(PACKAGE)-$(VERSION).orig
+	rm -rf $(PACKAGE)-$(VERSION).orig
+
diff --git a/debian/watch b/debian/watch
index 638b325..cb7cf51 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,5 +1,5 @@
 version=3
 
-opts=dversionmangle=s/\.dfsg$//,\
+opts=dversionmangle=s/\+dfsg$//,\
 uversionmangle=s/_rc/~rc/;s/_beta/~beta/ \
 http://sf.net/panotools/libpano13-(.*)\.tar\.gz
-- 
1.7.1




More information about the Pkg-phototools-devel mailing list