#!/usr/bin/make -f
# -*- makefile -*-

# hardening options at build time
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	MAKEFLAGS += -j$(NUMJOBS)
endif

override_dh_auto_build:
	dh_auto_build --parallel -- USELIBWRAP=1 USELIBCAP=1

override_dh_auto_install:
	# auto install fork version, see debian/install for select version
	dh_auto_install -- DESTDIR=$(CURDIR)/debian/sslh/usr PREFIX=/ install

# do not start daemon by default: force user to configure
override_dh_installinit:
	dh_installinit --no-start

%:
	dh $@ --with systemd
