File: rules

package info (click to toggle)
gap-float 1.0.3%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 576 kB
  • sloc: ansic: 2,162; cpp: 2,025; xml: 194; makefile: 113; sh: 1
file content (48 lines) | stat: -rwxr-xr-x 1,367 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
#!/usr/bin/make -f

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)
DEB_BUILD_GAP_KERNEL_MAJOR_VERSION ?= $(shell sed -n -e 's/^GAP_KERNEL_MAJOR_VERSION=//p' /usr/lib/gap/sysinfo.gap )

SUBSTVARS = -Vgapkernel:Depends="gap-kernel-$(DEB_BUILD_GAP_KERNEL_MAJOR_VERSION)"

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

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		--with-gaproot=/usr/lib/gap \
		--with-mpfr=yes \
		--with-mpc=yes \
		--with-mpfi=yes \
		--with-fplll=yes \
		--with-cxsc=no

override_dh_prep:
	cat makedoc.g | $(CGAP) -A -q -T > gapdoc.log
	dh_prep

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	ln -sf src/.libs bin
	echo "SetPackagePath(\"float\",\".\"); QUIT_GAP(TestPackage(\"float\"));" | $(CGAP) -A -q -T 2> gaptest.err
	cat gaptest.err
	test ! -s gaptest.err
endif

override_dh_auto_install:
	dh_auto_install --destdir debian/tmp/

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

override_dh_gencontrol:
	dh_gencontrol -- $(SUBSTVARS)