File: rules

package info (click to toggle)
norm 1.5.8%2Bdfsg2-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 11,256 kB
  • sloc: cpp: 114,141; python: 27,185; xml: 7,165; tcl: 5,460; makefile: 3,463; java: 1,749; ansic: 607; sh: 181; csh: 8
file content (43 lines) | stat: -rwxr-xr-x 1,180 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
#!/usr/bin/make -f
#export DH_VERBOSE=1

# For DEB_HOST_MULTIARCH and DEB_VERSION_UPSTREAM
include /usr/share/dpkg/default.mk

# On older distros +pie will add -fPIE -pie to the library linkage, which breaks
# it, -fPIC is enough
export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie

ifeq (,$(findstring terse,$(DEB_BUILD_OPTIONS)))
	WAF = ./waf -v
else
	WAF = ./waf
endif

ifneq (,$(filter hurd,$(DEB_HOST_ARCH_OS)))
        STATIC_LIBS="-lpcap"
else
        STATIC_LIBS=""
endif

%:
	dh $@ --parallel

override_dh_auto_configure:
	$(WAF) configure --prefix=/usr --libdir=/usr/lib/$(DEB_HOST_MULTIARCH)

override_dh_auto_build:
	$(WAF) build --enable-static-library

override_dh_auto_install:
	$(WAF) install --destdir=$(CURDIR)/debian/tmp --enable-static-library
	install -d debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
	sed -e "s/@VERSION@/$(DEB_VERSION_UPSTREAM)/" \
                -e "s|@DEB_HOST_MULTIARCH@|$(DEB_HOST_MULTIARCH)|g" \
                -e "s|@STATIC_LIBS@|$(STATIC_LIBS)|g" \
                debian/norm.pc.in > \
		debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/norm.pc

override_dh_auto_clean:
	$(WAF) distclean
	find waflib -name "*.pyc" -delete