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
|
#!/usr/bin/make -f
#export DH_VERBOSE=1
DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
PYVERS=$(shell pyversions -vr)
DOCS=$(shell find docs/ -name "*.txt" -not -path "*/include/*" -printf "%p "| sed "s/.txt//g")
include /usr/share/dpatch/dpatch.make
clean: unpatch
dh_testdir
dh_testroot
rm -rf dist build
find . -name *\.py[co] -exec rm {} \;
dh_clean docs/reference.txt build-docs* $(PYVERS:%=install-python%)
build: patch build-docs
build-docs:
dh_installdirs
for NAME in $(DOCS); do \
rst2html --cloak-email-addresses --no-toc-backlinks "$$NAME.txt" \
> "debian/python-paste/usr/share/doc/python-paste/$$NAME.html"; \
done
cp docs/include/reference_header.txt docs/reference.txt
echo ":extracted: `date`" >> docs/reference.txt
echo >> docs/reference.txt
rst2html docs/reference.txt > debian/python-paste/usr/share/doc/python-paste/docs/reference.html
touch $@
build-docs-pudge:
# this rule will replace build-docs once python-buildutils will enter unstable
# TODO: add python-buildutils and python-pudge to Depends-Indep, close #456554
dh_installdirs
python setup.py pudge --dest debian/python-paste/usr/share/doc/python-paste/
touch $@
install: $(PYVERS:%=install-python%)
install-python%:
python$* setup.py install \
--single-version-externally-managed \
--root $(CURDIR)/debian/python-paste
# pth file is not needed since all paste* packages are installed in same directory
rm -f debian/python-paste/usr/lib/python$*/site-packages/Paste-${DEB_UPSTREAM_VERSION}-py$*-nspkg.pth
# in paste-common package:
mkdir -p debian/paste-common/usr/lib/python$*/site-packages/paste/
cp paste/__init__.py debian/paste-common/usr/lib/python$*/site-packages/paste/
touch $@
binary-indep: build install
dh_testdir -i
dh_testroot -i
dh_installchangelogs -i docs/news.txt
dh_installdocs -i
dh_pysupport -i
dh_compress -i -X.py
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i -- -Z bzip2
binary-arch:
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install build
|