#!/usr/bin/make -f

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

archconfflags := \
	--prefix=/usr \
	--without-ALL \
	--with-ImageMagick \
	--with-lqt \
	--with-libquicktime \
	--with-libmpeg3 \
	--with-avifile \
	--with-v4l \
	--with-libv4l1 \
	--with-libv4l2 \
	--with-ftgl \
	--with-default-font=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf

%:
	dh --with quilt $@

override_dh_auto_configure:
	cd src && CFLAGS="$(CFLAGS)" ./configure $(archconfflags)

override_dh_auto_build:
	dh build --before dh_auto_build
	cd src && make
	dh build --after dh_auto_build

override_dh_auto_clean:
	dh clean --before dh_auto_clean
	cd src && [ ! -f Makefile ] || make distclean
	-$(RM) -rf src/Base/configLinux.h
	dh clean --after dh_auto_clean

override_dh_fixperms:
	dh_fixperms -Xpd-gem

override_dh_auto_test:
	# no actual 'make test' target
