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
|
#!/usr/bin/make -f
export PYBUILD_NAME=fltk
%:
dh $@ --with python3 --buildsystem=pybuild
override_dh_auto_build:
python3 setup.py swig
dh_auto_build
override_dh_auto_install:
dh_auto_install
ifneq (,$(filter python3-fltk-doc,$(shell dh_listpackages)))
# I'm building the docs, so presumably we're not cross-building, and I
# can run pydoc3 on the just-built binaries. This is declared in the
# Build-Profiles field in debian/control
#
# Pick the first requested python version: I could have more than one if
# multiple Python versions are currently installed. I don't care which I
# use, but I must pick one
#
# I also remove links to absolute build-time paths
set -e; \
V=`py3versions -r | awk '{sub("python","",$$1); print $$1; exit}'`; \
Din=python3-fltk/usr/lib/python$$V/dist-packages/fltk; \
Dout=python3-fltk-doc/usr/share/doc/python3-fltk; \
mkdir -p debian/$$Dout; \
( cd debian/$$Din && \
pydoc$$V -w ./ && \
mv fltk.html _fltk.html \
../../../../../../$$Dout; ); \
perl -p -i -e 's{(<a href="file:).*?(/usr/.*?">).*?(/usr/)}{$$1$$2$$3}' \
debian/$$Dout/fltk.html \
debian/$$Dout/_fltk.html
endif
# There aren't any tests defined in this package, and the autodetection in
# pybuild fails with errors
override_dh_auto_test:
true
|