File: rules

package info (click to toggle)
supermin 5.2.2-7.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,324 kB
  • sloc: ansic: 15,089; sh: 4,913; ml: 2,599; makefile: 251; perl: 26
file content (45 lines) | stat: -rwxr-xr-x 1,441 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/dpkg/architecture.mk

cfgflags =
cfgflags += CPIO=/bin/cpio
cfgflags += MKE2FS=/sbin/mke2fs
cfgflags += ZCAT=/bin/zcat

override_dh_auto_configure:
	dh_auto_configure -- --disable-network-tests $(cfgflags)

override_dh_auto_build:
	# Use musl-gcc where available. Otherwise work around #843714: GCC
	# cannot build static binaries using the pie-specific spec files added
	# by dpkg on (at least) powerpc, ppc64, sh4, sparc64.
	if which musl-gcc >/dev/null; then \
		dh_auto_build -- -C init CC=musl-gcc ; \
	else \
		eval $$(DEB_BUILD_MAINT_OPTIONS=hardening=-pie dpkg-buildflags --export=sh | grep '^export LDFLAGS') ; \
		dh_auto_build -- -C init LDFLAGS=$$(LDFLAGS) ; \
	fi
	dh_auto_build

override_dh_auto_test:
	$(info $(DEB_BUILD_ARCH))
	dh_auto_test -- SKIP_TEST_EXECSTACK=1 \
		$(if $(filter i386,$(DEB_BUILD_ARCH)),SKIP_TEST_BUILD_BASH=1 SKIP_TEST_IF_NEWER_EXT2=1)

override_dh_gencontrol:
	dh_gencontrol -- -Vmisc:Built-Using="$(shell dpkg-query -f '$${source:Package} (= $${source:Version}), ' -W $(if $(shell which musl-gcc),musl-tools,libc-dev-bin))"

override_dh_dwz:
	dh_dwz -X/usr/bin/supermin

# Don't destroy supermin binary if it has been produced by the OCaml
# bytecode compiler
override_dh_strip override_dh_strip_nondeterminism:
	-which ocamlc.opt > /dev/null && $(patsubst override_%,%,$@)

%:
	dh $@ --with=ocaml