#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

export DH_VERBOSE=1

# This has to be exported to make some magic below work.
export DH_OPTIONS

%:
	dh $@ --no-parallel

# Add --with-old-names and --without-old-links, so that
# the dateutils get installed with the "date" prefix
# instead of the new short "d" prefix.
# The tool "dgrep" is already provided by debian-goodies.
# See bug #846074
override_dh_auto_configure:
	dh_auto_configure -- --program-prefix='dateutils.' --with-old-names --without-old-links

override_dh_auto_install:
	dh_auto_install
	rm $(CURDIR)/debian/dateutils/usr/share/doc/dateutils/LICENSE

override_dh_auto_test:
	LC_ALL=C dh_auto_test

override_dh_auto_clean:
	[ -f Makefile ] && dh_auto_clean || true
