| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export PYBUILD_NAME=ppft |
| 4 |
|
| 5 |
export PYBUILD_TEST_CUSTOM=1 |
| 6 |
export PYBUILD_TEST_ARGS={interpreter} -m ppft.tests |
| 7 |
|
| 8 |
%: |
| 9 |
dh $@ --with sphinxdoc --buildsystem=pybuild |
| 10 |
|
| 11 |
execute_after_dh_auto_install: |
| 12 |
rm -rf debian/python3-ppft/usr/lib/python3/dist-packages/ppft/tests |
| 13 |
|
| 14 |
execute_before_dh_installman: |
| 15 |
pybuilddir=.pybuild/$$(/bin/ls -1 .pybuild | head -n 1); PYTHONPATH=$$pybuilddir/build help2man -N -n 'PPFT (Parallel Python) Network Server' $$pybuilddir/scripts/ppserver > debian/ppserver.1.tmp |
| 16 |
perl -i -pe 's/^\.TH PARALLEL/.TH PPSERVER/; s/^Parallel \\-/ppserver \\-/' debian/ppserver.1.tmp |
| 17 |
perl -i -pe 's/^\\fB\\-/\n\\fB\\-/;' debian/ppserver.1.tmp |
| 18 |
# for some reason, the content is duplicated |
| 19 |
sed -ne '1,/support forums/p' debian/ppserver.1.tmp > debian/ppserver.1 |
| 20 |
rm -f debian/ppserver.1.tmp |
| 21 |
|
| 22 |
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS))) |
| 23 |
execute_after_dh_auto_build: |
| 24 |
PYTHONPATH=$(CURDIR) $(MAKE) -C docs SPHINXBUILD=sphinx-build html |
| 25 |
|
| 26 |
execute_after_dh_auto_clean: |
| 27 |
$(MAKE) -C docs SPHINXBUILD=sphinx-build clean |
| 28 |
|
| 29 |
override_dh_installdocs: |
| 30 |
dh_installdocs -ppython-ppft-doc --doc-main-package=python3-ppft |
| 31 |
dh_installdocs --remaining-packages |
| 32 |
mv debian/python-ppft-doc/usr/share/doc/python3-ppft/build debian/python-ppft-doc/usr/share/doc/python3-ppft/html |
| 33 |
endif |