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

#export DH_VERBOSE=1

%:
	dh $@ 

override_dh_auto_configure:
	dh_auto_configure -- \
		-DCMAKE_BUILD_TYPE=RELWITHDEBINFO \
		-DENABLE_OPENSSL=ON \
		-DENABLE_SYSTEMD=ON \
		-DENABLE_LIBSODIUM=ON \
		-DENABLE_LTO=OFF \
		-DCMAKE_AR=/usr/bin/ar \
		-DCMAKE_RANLIB=/usr/bin/ranlib \
		-DCMAKE_NM=/usr/bin/nm

override_dh_strip:
	dh_strip --dbg-package=fastd-dbg

override_dh_install:
	dh_install
	install -dm755 $$(pwd)/debian/fastd/etc/fastd
	install -Dm644 doc/examples/fastd@.service $$(pwd)/debian/fastd/lib/systemd/system/fastd@.service

override_dh_installinit:
	dh_installinit --no-start -- defaults 16 80
