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 82 83 84 85 86 87
|
#!/usr/bin/make -f
# GNU copyright 1997 to 1999 by Joey Hess.
#export DH_VERBOSE=1
package=python-quixote
DEBIAN_DIR = $(shell pwd)/debian
DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog \
| grep ^Version: | cut -d ' ' -f 2 | cut -d '-' -f 1)
PYVER=$(shell pyversions -vd)
PYVERS=$(shell pyversions -vr)
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
build: patch-stamp build-stamp
patch-stamp:
dpatch apply-all
touch patch-stamp
build-stamp: $(PYVERS:%=build-ext-%)
touch $@
build-ext-%:
dh_testdir
python$* setup.py build -g
touch $@
unpatch:
dpatch deapply-all
rm -rf patch-stamp debian/patched
clean: unpatch
dh_testdir
dh_testroot
rm -f build-stamp
rm -rf build build-ext-*
-rm -rf Quixote.egg-info
find . -name '*.pyc' -exec rm {} \;
dh_clean
install-prereq:
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
install-stamp: $(PYVERS:%=install-ext-%)
touch $@
install-ext-%:
python$* setup.py install \
--no-compile \
--single-version-externally-managed \
--root $(DEBIAN_DIR)/$(package)
install: build install-prereq install-stamp
binary-indep: build install
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs CHANGES.txt
dh_installdocs
dh_installexamples
install -m 644 debian/python-quixote.lintian \
$(DEBIAN_DIR)/$(package)/usr/share/lintian/overrides/python-quixote
install -m 644 debian/python-quixote-doc.lintian \
$(DEBIAN_DIR)/$(package)-doc/usr/share/lintian/overrides/python-quixote-doc
dh_link
dh_strip
dh_compress -X.cgi -X.py -X.conf
dh_fixperms
rm -f $(DEBIAN_DIR)/python-quixote-doc/usr/share/doc/python-quixote-doc/INSTALL.*
dh_pysupport
dh_python
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|