File: rules

package info (click to toggle)
wide-dhcpv6 20080615-23
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 4,700 kB
  • sloc: ansic: 14,885; yacc: 1,114; sh: 615; lex: 469; makefile: 119
file content (43 lines) | stat: -rwxr-xr-x 1,290 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
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

include /usr/share/dpkg/architecture.mk

# Security Hardening
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_configure:
	# sed command below is to build against the static flex library
	# to avoid picking an extra dependency on libfl2 (#893988)
	for dir in build build-udeb; do \
		rsync -a --exclude debian/ --exclude .pc/ --exclude .git/ . $$dir; \
		[ $$dir = "build-udeb" ] && \
		sed "s,^CLIENTLIBS=.*,CLIENTLIBS=$$(find /usr/lib/$(DEB_HOST_MULTIARCH) -name libfl.a)," \
			-i $$dir/Makefile.in; \
		dh_auto_configure --sourcedirectory $$dir -- \
			--with-localdbdir=/var/lib/dhcpv6 --sysconfdir=/etc/wide-dhcpv6; \
	done

override_dh_auto_build:
	$(MAKE) -C build
	$(MAKE) -C build-udeb

override_dh_auto_install:
	$(MAKE) -C build prefix=$(CURDIR)/debian/tmp/usr install
	$(MAKE) -C build-udeb prefix=$(CURDIR)/debian/tmp-udeb/usr install

override_dh_installinit:
	dh_installinit --error-handler=true --restart-after-upgrade

override_dh_fixperms:
	dh_fixperms
	chmod +x debian/wide-dhcpv6-client/etc/wide-dhcpv6/dhcp6c-*

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build build-udeb debian/tmp-udeb