[Python-modules-commits] r20305 - in packages/python-gd/trunk/debian (README.source rules)
jump-guest at users.alioth.debian.org
jump-guest at users.alioth.debian.org
Sat Feb 4 18:44:56 UTC 2012
Date: Saturday, February 4, 2012 @ 18:44:55
Author: jump-guest
Revision: 20305
Add get-packaged-orig-source target
Added:
packages/python-gd/trunk/debian/README.source
Modified:
packages/python-gd/trunk/debian/rules
Added: packages/python-gd/trunk/debian/README.source
===================================================================
--- packages/python-gd/trunk/debian/README.source (rev 0)
+++ packages/python-gd/trunk/debian/README.source 2012-02-04 18:44:55 UTC (rev 20305)
@@ -0,0 +1,7 @@
+python-gd for Debian
+---------------------
+
+To get upstream tarball in each unar release, please run in
+the upstream directory:
+
+# debian/rules get-packaged-orig-source
Modified: packages/python-gd/trunk/debian/rules
===================================================================
--- packages/python-gd/trunk/debian/rules 2012-02-04 18:43:09 UTC (rev 20304)
+++ packages/python-gd/trunk/debian/rules 2012-02-04 18:44:55 UTC (rev 20305)
@@ -4,7 +4,26 @@
PYVERS := $(shell pyversions -r)
CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
+PKG_VERSION := $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^+]+).*,\1,p')
+get-packaged-orig-source:
+ # Uscan can grab upstream source
+ uscan --noconf --force-download --no-symlink --download-current-version --destdir=.
+ # Just to be safe
+ rm -rf python-gd-$(PKG_VERSION)
+ # Unpack
+ tar -xf gdmodule-$(PKG_VERSION).tar.gz
+ rm gdmodule-$(PKG_VERSION).tar.gz
+ # Delete unredistributable file
+ rm gdmodule-$(PKG_VERSION)/adventure.ttf
+ # Repacked source should have a top-level directory ending in .orig
+ # as a reminder to other developers
+ mv gdmodule-$(PKG_VERSION) python-gd-$(PKG_VERSION).orig
+ tar -c --owner root --group root --mode a+rX \
+ python-gd-$(PKG_VERSION).orig | \
+ bzip2 -9 > ../python-gd_$(PKG_VERSION)+dfsg.orig.tar.bz2
+ rm -r python-gd-$(PKG_VERSION).orig
+
%:
dh $@ --with python2
More information about the Python-modules-commits
mailing list