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
|
#!/usr/bin/make -f
# Copyright 2020 Joachim Zobel <jz-2017@heute-morgen.de>
export SOURCE_DATE_EPOCH = $(shell date -d "$$(dpkg-parsechangelog -SDate)" +%s)
export FORCE_SOURCE_DATE = 1
export LC_ALL = C
debian/gaproot/pkg:
mkdir -p debian/gaproot/pkg
ln -s ../../.. debian/gaproot/pkg/HAPcryst
# This is a HACK. GAPDoc2HTML identifies the MainRootPath by checking for
# init.g. Since AutoDoc and GAPDoc are unable to handle multiple books
# the HAPprog book is considered an external link. Therefore it is necessary
# to replace debian/gaproot with double dots. We fake it as a MainRootPath
# to achieve this.
ln -s /usr/share/gap/lib debian/gaproot/lib
# This prevents an absolute path to polymaking as a result of the above.
ln -s /usr/share/gap/pkg/polymaking debian/gaproot/pkg/polymaking
doc: debian/gaproot/pkg
make -C doc && touch doc
ifneq (,$(filter check,$(DEB_BUILD_OPTIONS)))
execute_after_dh_auto_test: debian/gaproot/pkg
gap -q -l "$(CURDIR)/debian/gaproot;/usr/share/gap" < tst/testall.g | tee debian/gap.tst
grep -q "^#I No errors detected while testing" debian/gap.tst
endif
override_dh_install: doc-clean
dh_install *.g examples lib tst usr/share/gap/pkg/HAPcryst
override_dh_fixperms:
dh_fixperms -X.tst
chmod g-w debian/gap-hapcryst/usr/share/gap/pkg/HAPcryst/tst/*.tst
override_dh_installdocs: doc
dh_installdocs README
make -C doc install DESTDIR=../debian/gap-hapcryst
override_dh_installchangelogs:
dh_installchangelogs CHANGES
doc-clean:
make -C doc clean
clean: doc-clean
dh_testdir
dh_testroot
rm -rf debian/gaproot
rm -f debian/gap.tst
dh_clean
%:
dh $@
.PHONY: execute_after_dh_auto_test execute_after_dh_auto_build clean override_dh_install override_dh_installdocs override_dh_installchangelogs
|