#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all qa=+all
export LC_ALL = C.UTF-8

# CXX is used by test/testit
export DPKG_EXPORT_BUILDTOOLS = 1
include /usr/share/dpkg/buildtools.mk

%:
	dh $@

# COMPILE_WITH_C_LOCALE needed because of
# https://github.com/HowardHinnant/date/issues/388
override_dh_auto_configure:
	dh_auto_configure -- \
		  -DUSE_SYSTEM_TZ_DB=ON \
		  -DBUILD_SHARED_LIBS=ON \
		  -DBUILD_TZ_LIB=ON \
		  -DCOMPILE_WITH_C_LOCALE=ON

override_dh_auto_test:
	cd test && OPTIONS='-DONLY_C_LOCALE=1 -DUSE_OS_TZDB=1' ./testit
