#!/usr/bin/make -f

# Enable full hardening
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Tell debhelper to use the CMake build system
%:
	dh $@ --buildsystem=cmake

# Disable autoreconf since we are using CMake exclusively
override_dh_autoreconf:
	@echo "Skipping autoreconf (using CMake instead)"

override_dh_auto_configure:
	dh_auto_configure -- \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DWITH_LUA=ON \
		-DWITH_REDIS=ON \
		-DINSTALL_SYSTEMD_UNIT=OFF

# Test results on kfreebsd-* are inconsistent, but not due to package bugs.
override_dh_auto_test:
	dh_auto_test

override_dh_installsystemd:
	dh_installsystemd --name=opendkim

override_dh_installchangelogs:
	dh_installchangelogs RELEASE_NOTES
