#!/usr/bin/make -f

DEB_BUILD_MAINT_OPTIONS = hardening=+all
DEB_CFLAGS_MAINT_APPEND = -D_FORTIFY_SOURCE=2
DEB_CXXFLAGS_MAINT_APPEND = -D_FORTIFY_SOURCE=2
export DEB_BUILD_MAINT_OPTIONS DEB_CFLAGS_MAINT_APPEND DEB_CXXFLAGS_MAINT_APPEND

BOCA_CONFIG = systemlibexpat
BOCA_CONFIG += systemliburiparser
BOCA_CONFIG += systemzlib

# Replace space with comma in BoCA config list because some of the Makefile rule
# will strip the double quote and the configs will be recognize as targets.
empty :=
comma := ,
space := $(empty) $(empty)
BOCA_MAKE_CONFIG := $(subst $(space),$(comma),$(strip $(BOCA_CONFIG)))

%:
	dh $@

override_dh_auto_build:
	dh_auto_build -- prefix=/usr config="$(BOCA_MAKE_CONFIG)"

override_dh_auto_install:
	dh_auto_install -- prefix=/usr config="$(BOCA_MAKE_CONFIG)"
