#!/usr/bin/make -f

export DEB_CFLAGS_MAINT_APPEND = -Wno-error=deprecated-declarations \
		-Wno-error=maybe-uninitialized

# In contrary to Debian, we use by default -Wformat-overflow=2 -Wformat-truncation=2
# in Apertis, but due to the use of -Werror this package FTBFS with:
# "cc1: all warnings being treated as errors". In order to avoid this error, we
# don't treat these warnings as errors.
export DEB_CFLAGS_MAINT_APPEND += -Wno-error=format-overflow -Wno-error=format-truncation
export DEB_CXXFLAGS_MAINT_APPEND += -Wno-error=format-overflow -Wno-error=format-truncation

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		--enable-pcsc \
		--enable-doc \
		--enable-dnie-ui \
		--enable-notify \
		--enable-readline \
		--enable-sm \
		--enable-zlib \
		--htmldir=/usr/share/doc/opensc/html

override_dh_auto_install:
	dh_auto_install --destdir=debian/tmp

override_dh_installdocs:
	dh_installdocs -A README README.md NEWS
