File: rules

package info (click to toggle)
gap-nq 2.5.4-2
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 3,092 kB
  • sloc: ansic: 4,473; sh: 4,175; xml: 1,592; makefile: 267; javascript: 154
file content (50 lines) | stat: -rwxr-xr-x 1,250 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
#!/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/nq

doc: debian/gaproot/pkg
	make -C doc && touch doc

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
execute_after_dh_auto_test: debian/gaproot/pkg
	gap -q -l 'debian/gaproot;/usr/share/gap' < tst/testall.g | tee debian/gap.tst
	! grep "^########" debian/gap.tst
endif

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

execute_after_dh_auto_build: doc;

override_dh_install:
	dh_install *.g examples gap usr/share/gap/pkg/nq
	make -C doc install DESTDIR=../debian/gap-nq

override_dh_installdocs:
	dh_installdocs README

override_dh_installchangelogs:
	dh_installchangelogs  CHANGES

clean:
	dh_testdir
	dh_testroot
	dh_auto_clean
	make -C doc clean
	rm -rf debian/gaproot
	rm -f debian/gap.tst
	rm -f examples/Makefile
	dh_clean
	dh_autoreconf_clean

%:
	dh $@

.PHONY: execute_after_dh_auto_test override_dh_auto_configure override_dh_install override_dh_installdocs override_dh_installchangelogs clean