| 1 |
#!/usr/bin/make -f |
| 2 |
# Copyright 2024 Joachim Zobel <[email protected]> |
| 3 |
|
| 4 |
export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog -SDate)" +%s) |
| 5 |
export FORCE_SOURCE_DATE = 1 |
| 6 |
export LC_ALL = C |
| 7 |
|
| 8 |
|
| 9 |
override_dh_auto_configure: |
| 10 |
dh_auto_configure -- --program-prefix=anu- --with-gaproot=/usr/share/gap/ |
| 11 |
|
| 12 |
ifneq (,$(filter check,$(DEB_BUILD_OPTIONS))) |
| 13 |
execute_after_dh_auto_test: |
| 14 |
echo 'SetPackagePath("ANUPQ","$(CURDIR)"); Read("tst/testinstall.g");' \ |
| 15 |
| gap -q | tee debian/gap.tst |
| 16 |
grep -q "^#I No errors detected while testing" debian/gap.tst |
| 17 |
endif |
| 18 |
|
| 19 |
execute_after_dh_auto_build: |
| 20 |
make -C doc |
| 21 |
|
| 22 |
override_dh_install: |
| 23 |
dh_install *.g cnf examples tst lib standalone usr/share/gap/pkg/ANUPQ |
| 24 |
make -C doc install DESTDIR=../debian/gap-anupq |
| 25 |
|
| 26 |
override_dh_installdocs: |
| 27 |
dh_installdocs README.md standalone-doc/README |
| 28 |
|
| 29 |
override_dh_installchangelogs: |
| 30 |
dh_installchangelogs CHANGES |
| 31 |
|
| 32 |
execute_before_dh_clean: |
| 33 |
make -C doc clean |
| 34 |
rm -rf debian/gaproot |
| 35 |
rm -f debian/gap.tst |
| 36 |
rm -f config.log |
| 37 |
chmod a-x standalone/TEST/*TEST |
| 38 |
|
| 39 |
execute_before_dh_auto_clean: examples/Makefile |
| 40 |
|
| 41 |
execute_after_dh_auto_clean: |
| 42 |
rm examples/Makefile |
| 43 |
rm -rf bin |
| 44 |
|
| 45 |
# Workaround for distclean failing on a newly unpacked tarball |
| 46 |
examples/Makefile: |
| 47 |
echo "distclean: ;" > examples/Makefile |
| 48 |
|
| 49 |
%: |
| 50 |
dh $@ |
| 51 |
|
| 52 |
.PHONY: execute_after_dh_auto_test execute_after_dh_auto_build execute_before_dh_clean override_dh_install override_dh_installdocs override_dh_installchangelogs execute_before_dh_auto_clean execute_after_dh_auto_clean |