#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		--enable-werror \
		--with-state-file-path=/var/lib/logrotate/status \
		--with-default-mail-command=/usr/bin/mail

# The testsuite is not yet portable.
# Not because of logrotate itself, but due to unportable usage
# of date(1), stat(1) etc.
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
  ifeq ($(DEB_HOST_ARCH_OS),linux)
	dh_auto_test
  endif
endif
