rules 1.18 KB
Newer Older
Gerrit Pape's avatar
Gerrit Pape committed
1 2
#!/usr/bin/make -f

3 4 5 6 7 8 9 10
DPKG_EXPORT_BUILDFLAGS = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
include /usr/share/dpkg/default.mk

CONF_CC = src/conf-cc
CONF_LD = src/conf-ld

%:
11
	dh $@ --with runit,sysuser
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

override_dh_auto_clean:
	rm -rf compile command
	! [ -e "$(CONF_CC).dist" ] || mv -f "$(CONF_CC).dist" "$(CONF_CC)"
	! [ -e "$(CONF_LD).dist" ] || mv -f "$(CONF_LD).dist" "$(CONF_LD)"

override_dh_auto_configure:
	[ -e "$(CONF_CC).dist" ] || mv -f "$(CONF_CC)" "$(CONF_CC).dist"
	[ -e "$(CONF_LD).dist" ] || mv -f "$(CONF_LD)" "$(CONF_LD).dist"
	echo "$(CC) $(CPPFLAGS) $(CFLAGS)" > "$(CONF_CC)"
	echo "$(CC) $(LDFLAGS)" > "$(CONF_LD)"

override_dh_auto_build:
	./package/compile	\
		$(subst terse,>/dev/null,$(filter terse,$(DEB_BUILD_OPTIONS)))

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	./package/check
Gerrit Pape's avatar
Gerrit Pape committed
31
endif
Gerrit Pape's avatar
Gerrit Pape committed
32

Mathieu Mirmont's avatar
Mathieu Mirmont committed
33 34 35 36 37 38 39 40
override_dh_auto_install:
	dh_install
	dh_installinit --name socklog-unix
	dh_installinit --name socklog-klog
	dh_installinit --name socklog-inet      --no-enable
	dh_installinit --name socklog-ucspi-tcp --no-enable
	dh_installinit --name socklog-notify    --no-enable

41 42
override_dh_installchangelogs:
	dh_installchangelogs package/CHANGES
Gerrit Pape's avatar
Gerrit Pape committed
43

44
override_dh_dwz: