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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
VERSION := $(shell dpkg-parsechangelog | grep '^Version: ' | awk '{print $$2}')
%.py: %.py.in
sed -e 's/__CHANGELOG_VERSION__/$(VERSION)/' < $< > $@
build: build-stamp
build-stamp: setup.py
dh_testdir
# Add here commands to compile the package.
python setup.py build
# run the tests
cd tests && ./test_deb822.py
cd tests && ./test_debfile.py
cd tests && ./test_debtags.py
cd tests && ./test_changelog.py
cd tests && ./test_debian_support.py
lib/debian/doc-debtags > README.debtags
touch $@
clean: setup.py
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
python setup.py clean
rm -rf lib/python_debian.egg-info
rm -rf build/
rm -f README.debtags
rm -f setup.py
find lib/debian -type f -name '*.pyc' -exec rm {} \;
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean
dh_installdirs
# Add here commands to install the package into debian/tmp
python setup.py install --root="$(CURDIR)/debian/python-debian" --no-compile
# Build architecture-independent files here.
binary-indep: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
# TODO: Enrico would like to keep wxssearch out of the package
# but so far, he has no better place for it
#rm "$(CURDIR)/debian/python-debian/usr/share/doc/python-debian/examples/wxssearch"
rm "$(CURDIR)/debian/python-debian/usr/share/doc/python-debian/examples/debtags/wxssearch"
# dh_install
dh_compress -Xexamples
dh_fixperms
dh_pysupport -d
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
# Build architecture-dependent files here.
binary-arch: build install
# We have nothing to do by default.
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|