1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^+]+).*,\1,p')
%:
dh $@ --with python2
override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
cp unipath/test.py .
set -e; for python in $(shell pyversions -r); do \
$$python $(shell which nosetests) ./test.py; \
done
rm -f ./test.py ./test.pyc
endif
get-orig-source:
uscan --noconf --force-download --rename --download-current-version --destdir=.
gunzip python-unipath_$(DEB_UPSTREAM_VERSION).orig.tar.gz
# Create a tarball with the same md5sum by not extracting and
# deleting files with mv/rm as it should change atime and thus
# lead to a different md5sum for the resulting tarball
tar --delete --wildcards \
--file=python-unipath_$(DEB_UPSTREAM_VERSION).orig.tar \
Unipath-$(DEB_UPSTREAM_VERSION)/doc \
Unipath-$(DEB_UPSTREAM_VERSION)/.hg*
GZIP='-n --best' gzip python-unipath_$(DEB_UPSTREAM_VERSION).orig.tar
mv python-unipath_$(DEB_UPSTREAM_VERSION).orig.tar.gz \
python-unipath_$(DEB_UPSTREAM_VERSION)+dfsg.orig.tar.gz
|