#!/usr/bin/make -f

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

DEB_MAKE_CHECK_TARGET = check
DEB_COMPRESS_EXCLUDE = \
	qpdf-manual.html \
	qpdf-manual.pdf \
	stylesheets.css
DEB_CONFIGURE_USER_FLAGS = --libdir="\$${prefix}/lib/$(DEB_HOST_MULTIARCH)" \
	--enable-show-failed-test-output

# Include cdbs rules files.
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/autoreconf.mk

clean::
	$(RM) *.cdbs-config_list

install/libqpdf-dev::
	mkdir -p debian/tmp/usr/share/doc/libqpdf-dev/examples
	cp -p $(DEB_SRCDIR)/examples/*.cc $(DEB_SRCDIR)/examples/*.c \
		debian/tmp/usr/share/doc/libqpdf-dev/examples
