#!/usr/bin/make -f
#export DH_VERBOSE=1
# abi=+lfs adds -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 on the 32-bit
# architectures whose ABI lacks large file support.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all abi=+lfs
export DH_ALWAYS_EXCLUDE = *.orig

# Get the hardening build flags and enable all compiler warnings:
CFLAGS   := $(shell dpkg-buildflags --get CFLAGS) -Wall
CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) -Wall

CONFIG := -DENABLE_EXTERNAL_MSPACK=ON -DENABLE_UNRAR=ON -DENABLE_EXTERNAL_TOMFASTMATH=ON \
	  -DENABLE_APP=OFF -DENABLE_CLAMONACC=OFF -DENABLE_MAN_PAGES=OFF -DENABLE_SYSTEMD=OFF \
	  -DENABLE_DOXYGEN=OFF -DDO_NOT_SET_RPATH=ON -DENABLE_MILTER=OFF

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIG)
