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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export PYBUILD_NAME=stetl
export PYBUILD_BEFORE_TEST=cp -r {dir}/tests {build_dir}
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/tests
export PYBUILD_TEST_ARGS=--verbose
include /usr/share/dpkg/pkg-info.mk
BUILD_DATE=$(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)")
MANPAGES := $(wildcard debian/man/*.*.xml)
%:
dh $@ --buildsystem=pybuild
execute_after_dh_auto_clean:
(cd docs && make clean)
execute_before_dh_auto_build:
# Create man page from DocBook XML
for x in $(MANPAGES) ; do \
docbook2x-man --string-param header-3="$(BUILD_DATE)" $$x ; \
mv `basename $$x | sed 's/.xml$$//'` `dirname $$x` ; \
done
execute_after_dh_auto_build:
(cd docs && make html)
execute_after_dh_auto_install:
# Move usr/bin/stetl to stetl package
mkdir -p debian/stetl/usr
mv debian/python3-stetl/usr/bin debian/stetl/usr
execute_after_dh_installexamples:
# Remove executable bit
find debian/*/usr/share/doc/*/examples/ -type f -exec chmod 644 {} \;
|