File: rules

package info (click to toggle)
gap-anupq 3.3.3-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 8,328 kB
  • sloc: ansic: 15,243; xml: 5,186; sh: 1,259; makefile: 281; perl: 260; javascript: 155
file content (52 lines) | stat: -rwxr-xr-x 1,504 bytes parent folder | download
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
#!/usr/bin/make -f
# Copyright 2024 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


override_dh_auto_configure:
	dh_auto_configure -- --program-prefix=anu- --with-gaproot=/usr/share/gap/

ifneq (,$(filter check,$(DEB_BUILD_OPTIONS)))
execute_after_dh_auto_test:
	echo 'SetPackagePath("ANUPQ","$(CURDIR)"); Read("tst/testinstall.g");' \
          | gap -q | tee debian/gap.tst 	
	grep -q "^#I  No errors detected while testing" debian/gap.tst
endif

execute_after_dh_auto_build:
	make -C doc

override_dh_install:
	dh_install *.g cnf examples tst lib standalone usr/share/gap/pkg/ANUPQ
	make -C doc install DESTDIR=../debian/gap-anupq

override_dh_installdocs:
	dh_installdocs README.md standalone-doc/README

override_dh_installchangelogs:
	dh_installchangelogs  CHANGES

execute_before_dh_clean:
	make -C doc clean
	rm -rf debian/gaproot
	rm -f debian/gap.tst
	rm -f config.log
	chmod a-x standalone/TEST/*TEST

execute_before_dh_auto_clean: examples/Makefile

execute_after_dh_auto_clean: 
	rm examples/Makefile
	rm -rf bin

# Workaround for distclean failing on a newly unpacked tarball
examples/Makefile:
	echo "distclean: ;" > examples/Makefile

%:
	dh $@

.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