File: rules

package info (click to toggle)
iproute2 4.9.0-1%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,848 kB
  • sloc: ansic: 69,819; sh: 2,168; cpp: 633; makefile: 629; yacc: 390; lex: 145; perl: 101
file content (37 lines) | stat: -rwxr-xr-x 982 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
#!/usr/bin/make -f

DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')

DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE  := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)

ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
	CROSS :=
else
	CROSS := CC=$(DEB_HOST_GNU_TYPE)-gcc
endif

%:
	dh $@

override_dh_clean:
	dh_clean
	make distclean
	-rm -f doc/*.txt

override_dh_shlibdeps:
	dh_shlibdeps -a -Xq_atm.so -Xm_xt.so -Xm_ipt.so
	dh_shlibdeps -a -- -pipmods -dRecommends -e debian/iproute2/usr/lib/tc/m_xt.so -e debian/iproute2/usr/lib/tc/q_atm.so -xlibc6

override_dh_auto_configure:
	$(CROSS) dh_auto_configure

override_dh_auto_build:
	$(MAKE) -C doc all txt
	$(MAKE) KERNEL_INCLUDE=./include $(CROSS)

# bump version of the transitional packages...
override_dh_gencontrol:
	dh_gencontrol -piproute -- -v1:$(DEB_VERSION)
	dh_gencontrol -piproute-doc -- -v1:$(DEB_VERSION)
	dh_gencontrol --remaining-packages