File: rules

package info (click to toggle)
crun 1.24-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 9,736 kB
  • sloc: ansic: 66,212; python: 7,047; sh: 5,122; makefile: 768
file content (50 lines) | stat: -rwxr-xr-x 1,377 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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

ifneq (,$(findstring $(DEB_HOST_ARCH),amd64 arm64))
  ENABLE_WASMEDGE := 1
endif

ifeq ($(ENABLE_WASMEDGE),1)
  DEB_CONFIGOPTS += --with-wasmedge
endif

%:
	dh $@

override_dh_auto_clean:
	-dh_auto_clean

# The test suite tries to perform all kinds of privileged operations, like
# spawn containers, that are not necessarily allowed in the build environment,
# as is the case in the Debian buildd network.
#
# Thus run the suite, but ignore all errors; proper testing can happen in the
# autopkgtest testing environment
override_dh_auto_test:
	-dh_auto_test

execute_before_dh_auto_build:
	# These are generated with gperf, but regenerated for DFSG reasons here
	make generate-signals.c
	make generate-mount_flags.c
	# upstream ships prebuilt manpages, regenerate them
	rm -f *.1
	make generate-man
	# we don't ship this, but autopkgtest needs it through build-needed
	make tests/init

override_dh_auto_install:
	dh_auto_install --destdir=debian/tmp
ifeq ($(ENABLE_WASMEDGE),1)
	dh_link usr/bin/crun usr/bin/crun-wasm
	dh_link usr/share/man/man1/crun.1 usr/share/man/man1/crun-wasm.1
endif
	-$(RM) debian/tmp/usr/lib/*/*.la

execute_after_dh_gencontrol:
	# ensure we are linking against libyajl, and not building the embedded copy
	grep -q yajl debian/crun.substvars