File: rules

package info (click to toggle)
gap-io 4.9.3%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 776 kB
  • sloc: xml: 2,885; ansic: 2,709; makefile: 48; sh: 8
file content (56 lines) | stat: -rwxr-xr-x 1,650 bytes parent folder | download | duplicates (2)
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

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

CGAP = /usr/bin/gap

DEB_BUILD_MULTIARCH  ?= $(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)
DEB_BUILD_GAP_INFO_ARCH ?= $(shell echo 'Print(GAPInfo.Architecture);' | $(CGAP) -A -q -T)

BUILDIR = _build

default:
	@uscan --no-conf --dehs --report || true

%:
	dh $@

override_dh_autoreconf:
	mkdir -p gen
	dh_autoreconf

override_dh_auto_configure:
	dh_auto_configure -- --with-gaproot=/usr/lib/$(DEB_BUILD_MULTIARCH)/gap

override_dh_auto_build:
	dh_auto_build
	echo "Read(\"makedoc.g\"); quit;" | $(CGAP) -A -q -T
	rm -vf doc/chap*_mj.html

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	mkdir -p $(BUILDIR)
	cp -vpr -t $(BUILDIR) tst
	rm -vf $(BUILDIR)/tst/http.g
	sed -i -e 's|"tst"|"$(BUILDIR)/tst"|' $(BUILDIR)/tst/testall.g
	sed -i -e 's|"http.g",||' $(BUILDIR)/tst/testgap.tst
	echo "SetPackagePath(\"IO\",\".\"); Read(\"$(BUILDIR)/tst/testall.g\"); quit;" | $(CGAP) -A -q -T
endif

DEB_DH_INSTALL_MODDIR := $(CURDIR)/debian/tmp/usr/lib/$(DEB_BUILD_MULTIARCH)/gap/pkg/io/bin
override_dh_auto_install:
	install -d $(DEB_DH_INSTALL_MODDIR)
	install -t $(DEB_DH_INSTALL_MODDIR) bin/$(DEB_BUILD_GAP_INFO_ARCH)/io.so

override_dh_link:
	dh_link -p gap-io \
		/usr/lib/$(DEB_BUILD_MULTIARCH)/gap/pkg/io/bin /usr/lib/gap/pkg/io/bin/$(DEB_BUILD_GAP_INFO_ARCH) \
		/usr/lib/gap/pkg/io/bin /usr/share/gap/pkg/io/bin \
		/usr/share/gap/pkg/io/doc /usr/share/doc/gap-io/doc \
		/usr/share/gap/pkg/io/example /usr/share/doc/gap-io/example

override_dh_installchangelogs:
	dh_installchangelogs --keep CHANGES

override_dh_gencontrol:
	dh_gencontrol -- $(SUBSTVARS)