#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export DEB_CPPFLAGS_MAINT_APPEND = \
	-DDEB_BUILD_DATE="\"$(shell date -d @$(SOURCE_DATE_EPOCH) +%F)\"" \
	-DDEB_BUILD_TIME="\"$(shell date -d @$(SOURCE_DATE_EPOCH) +%T)\""

%:
	dh $@ --with autoreconf

override_dh_auto_configure:
	dh_auto_configure -- --enable-static --enable-shared                 \
		--with-build=production --enable-gpl --with-portfolio        \
		--enable-unit-testing --with-readline --without-compat

override_dh_install:
	chrpath -d debian/tmp/usr/bin/pcvc4
	rm -f $(shell find debian/tmp/usr/lib/ -name libcvc4.la)
	rm -f $(shell find debian/tmp/usr/lib/ -name libcvc4parser.la)
	dh_install

override_dh_missing:
	dh_missing --list-missing
