#!/usr/bin/make -f

%:
	dh $@ --with systemd

override_dh_auto_build:
	$(MAKE) programs \
		INC_USRLOCAL=/usr \
		FINALLIBEXECDIR=/usr/lib/ipsec \
		PUBDIR=/usr/sbin \
		INC_MANDIR=share/man \
		FINALNSSDIR=/var/lib/ipsec/nss \
		USE_LDAP=true \
		USE_LIBCURL=true \
		USE_XAUTHPAM=true \
		USE_FIPSCHECK=false \
		USE_LIBCAP_NG=true \
		USE_LABELED_IPSEC=false \
		USE_KLIPS=false \
		USE_DNSSEC=true

override_dh_auto_install-arch:
	# Add here commands to install the package into debian/libreswan
	$(MAKE) install \
		INC_USRLOCAL=/usr \
		FINALLIBEXECDIR=/usr/lib/ipsec \
		INC_MANDIR=share/man \
		FINALNSSDIR=/var/lib/ipsec/nss \
		PUBDIR=$(CURDIR)/debian/libreswan/usr/sbin \
		USE_KLIPS=false \
		DESTDIR=$(CURDIR)/debian/libreswan
	echo "removing files debian packaging does not need:"
	find \
	     $(CURDIR)/debian/libreswan/var/run \
	  -print -delete

override_dh_auto_test:
	 echo "Skip dh_auto_test"

override_dh_systemd_enable:
	dh_systemd_enable --no-enable
