#!/usr/bin/make -f

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

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

%:
	dh $@ --with autoreconf --sourcedirectory=synfig-core

override_dh_autoreconf:
#	dh_autoreconf --as-needed
	dh_autoreconf
	cd synfig-core && intltoolize --force --copy

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

override_dh_auto_install:
	chmod -c a-x synfig-core/examples/*.sifz
	dh_auto_install --destdir=$(CURDIR)/debian/tmp
	## W:unknown-locale-code zh-Hant:
	$(RM) -rv $(CURDIR)/debian/tmp/usr/share/locale/zh-Hant

override_dh_makeshlibs:
	dh_makeshlibs -V

override_dh_compress:
	dh_compress --exclude=.sifz
