#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/dpkg/default.mk

# reduce needless linking
LDFLAGS+= -Wl,--as-needed

%:
	dh $@ --parallel --with autoreconf

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_auto_configure:
	dh_auto_configure -- \
			--sysconfdir=/etc/synfig \
			--enable-debug=half \
			--with-imagemagick \
			--without-included-ltdl \
			--with-boost-libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
#			--with-libavcodec
#			--mandir=\$${prefix}/share/man \

override_dh_auto_install:
	chmod a-x examples/*.sifz
	dh_auto_install --destdir=$(CURDIR)/debian/tmp

override_dh_makeshlibs:
	dh_makeshlibs -V

override_dh_compress:
	dh_compress --exclude=.sifz

override_dh_strip:
	dh_strip --dbg-package=synfig-dbg

override_dh_builddeb:
	dh_builddeb -- -Zxz
