summaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: c0aafb0c722ccd45f09e90730c1fac0e778b377b (plain)
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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# for DEB_* variables
include /usr/share/dpkg/default.mk
include /usr/share/debhelper/dh_package_notes/package-notes.mk

ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
	export CC=$(DEB_HOST_GNU_TYPE)-gcc
	export HOSTCC=gcc
	export PKG_CONFIG=$(DEB_HOST_GNU_TYPE)-pkg-config
else
	# some tools are to be built with the host compiler and intentionally
	# ignore the *FLAGS, use them anyway in a non-cross build to make
	# dpkg-buildflags-missing happy
	export CBUILD_CFLAGS=$(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
endif

ifneq (,$(findstring terse,$(DEB_BUILD_OPTIONS)))
export VERBOSE=0
else
export VERBOSE=1
endif

export KERNEL_INCLUDE=./include
export NETNS_RUN_DIR=/run/netns

%:
	dh $@

execute_after_dh_clean:
	make distclean

override_dh_auto_configure:
	dh_auto_configure -- --color=auto

override_dh_auto_test:
	# upstream test suite needs root and leaves machine unclean, skip it

# We are not shipping the ifstat binary as it conflicts with another Debian
# package, so avoid shipping the manpage as well. See #873818
override_dh_install:
	dh_install -Xifstat.8

override_dh_auto_install:
	dh_auto_install --destdir $(CURDIR)/debian/tmp/