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
|
#!/usr/bin/make -f
export CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
export CPPFLAGS=$(shell dpkg-buildflags --get CPPFLAGS)
export LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
# Get the supported Python versions
PYVERS = $(shell pyversions -r -v)
# Callable functions to determine the correct PYTHONPATH
pythonpath = $$(ls -d $(CURDIR)/build/lib.*-$(1))
pythonpath_dbg = $$(ls -d $(CURDIR)/build/lib.*-$(1)-pydebug 2>/dev/null || ls -d $(CURDIR)/lib.*$(1)-pydebug)
%:
dh $@ --with python2
override_dh_auto_build: delete_generated
# icons for menus
gm convert icons/veusz_32.png debian/veusz.xpm
# regenerate docs
(cd Documents; ./generate_manual.sh)
dh_auto_build
override_dh_auto_install:
# do not install examples and put data files in /usr/share/veusz
dh_auto_install -- --veusz-resource-dir=debian/veusz/usr/share/veusz --disable-install-examples
# veusz follows symlink to find its resource directory
for py in $(PYVERS); do \
dh_link -pveusz usr/share/veusz usr/lib/python$${py}/dist-packages/veusz/resources; \
done
dh_numpy
dh_sip
override_dh_auto_test:
# Run self tests. The current directory is used as the resource
# directory as veusz hasn't been installed when this is run.
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
set -e -x;\
for py in $(PYVERS); do \
LC_ALL=C \
PYTHONPATH=$(call pythonpath,$$py) \
VEUSZ_RESOURCE_DIR=. \
xvfb-run -a \
--server-args "-screen 0 640x480x24" \
python$$py tests/runselftest.py ;\
LC_ALL=C \
PYTHONPATH=$(call pythonpath_dbg,$$py) \
VEUSZ_RESOURCE_DIR=. \
xvfb-run -a \
--server-args "-screen 0 640x480x24" \
python$$py-dbg tests/runselftest.py ;\
done
endif
override_dh_strip:
dh_strip --dbg-package=veusz-helpers-dbg
override_dh_compress:
# don't compress Veusz example files
dh_compress -X.vsz
override_dh_clean: delete_generated
dh_clean
delete_generated:
# delete files generated by rules
rm -f debian/veusz.xpm
rm -f Documents/manual.html Documents/manual.pdf \
Documents/manual.txt Documents/manual.fo \
Documents/veusz.1 Documents/veusz_listen.1
# delete any self test failures
rm -f tests/*.temp.selftest
|