rules 1.19 KB
Newer Older
1 2 3
#!/usr/bin/make -f
SHELL+= -e

4
DPKG_EXPORT_BUILDFLAGS = 1
5
DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow,+pie
6
-include /usr/share/dpkg/buildflags.mk
7 8 9 10
-include /usr/share/dpkg/architecture.mk

ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
  export CC := $(DEB_HOST_GNU_TYPE)-gcc
11
  export PKG_CONFIG := $(DEB_HOST_GNU_TYPE)-pkg-config
12
endif
13

14
D := $(CURDIR)/debian/openbsd-inetd
15

16
clean:
17
	dh_testdir
18
	rm -f debian/.stamp-*
19
	rm -f inetd *.o
20
	dh_clean
21

22 23 24 25
build: build-arch build-indep
build-arch: debian/.stamp-build
build-indep: debian/.stamp-build
debian/.stamp-build:
26 27 28 29
	dh_testdir
	$(MAKE) -f Makefile.debian
	touch $@

Marco d'Itri's avatar
Marco d'Itri committed
30 31
binary-arch: build
	dh_testroot
32
	dh_testdir
33
	dh_prep
34

Marco d'Itri's avatar
Marco d'Itri committed
35
	dh_installdirs usr/sbin/ usr/share/man/man5/ lib/systemd/system/
36 37 38
	dh_installdocs
	dh_installman inetd.8
	dh_installchangelogs ChangeLog
Marco d'Itri's avatar
Marco d'Itri committed
39
	dh_link
40
	install --mode=755 inetd $D/usr/sbin/
Marco d'Itri's avatar
Marco d'Itri committed
41 42
	cp debian/inetd.service $D/lib/systemd/system/
	dh_systemd_enable
43
	dh_installinit --restart-after-upgrade
Marco d'Itri's avatar
Marco d'Itri committed
44
	dh_systemd_start --restart-after-upgrade
45 46 47 48 49
	dh_strip
	dh_compress
	dh_fixperms
	dh_shlibdeps
	dh_installdeb
50
	dh_gencontrol
51
	dh_md5sums
52
	dh_builddeb
53

54 55
binary:	binary-arch

56 57
binary-indep:

Marco d'Itri's avatar
Marco d'Itri committed
58
.PHONY: binary binary-arch binary-indep build build-arch build-indep clean