#!/usr/bin/make -f
LDFLAGS:=
CFLAGS:=

UPSTREAM_VERSION=$(shell dpkg-parsechangelog | grep 'Version:' | sed 's/^Version:\s\(.*\)-.*/\1/')

%:
	dh $@ --parallel --with=autotools_dev,python2

override_dh_auto_install:
	dh_auto_install
	find debian/tmp -type f -name "*.la" -ls -delete
	cd debian/tmp/usr/share/doc/lives-$(UPSTREAM_VERSION) && \
		rm \
			ChangeLog \
			FEATURES \
			BUGS \
			AUTHORS
	rm -rf \
	 debian/tmp/usr/lib/lives/plugins/effects/realtime/weed/data/.svn/ \
	 debian/tmp/usr/lib/lives/plugins/effects/realtime/weed/icons/.svn/
	find debian/tmp/usr/lib/lives -type d -empty -delete

override_dh_strip:
	dh_strip -plibweed0 --dbg-package=libweed-dbg
	dh_strip -plives --dbg-package=lives-dbg
	dh_strip --remaining-packages
