#!/usr/bin/make -f

# Should be removed on updating to version > 0.25.1
export DEB_CFLAGS_MAINT_APPEND = -Wno-error=maybe-uninitialized

ifeq ($(DEB_TARGET_ARCH),ppc64el)
export DEB_CFLAGS_MAINT_STRIP = -O3
export DEB_CFLAGS_MAINT_APPEND = -O2
endif

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		--enable-autostart-items \
		--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
