#!/usr/bin/make -f

%:
	dh $@

# build simple version first #
override_dh_auto_configure:
	dh_auto_configure  -- \
		--with-htmldir=/usr/share/doc/geeqie/html \
		--with-readmedir=/usr/share/doc/geeqie-common/ \
		--enable-lirc \
		--enable-gtk3

override_dh_auto_install:
	mkdir -p $(CURDIR)/debian/tmp/usr/share/doc/geeqie/html
	dh_auto_install
	rm -f \
		$(CURDIR)/debian/tmp/usr/share/geeqie/template.desktop \
		$(CURDIR)/debian/tmp/usr/share/doc/geeqie-common/README.lirc \
		$(CURDIR)/debian/tmp/usr/share/doc/geeqie-common/TODO \
		$(CURDIR)/debian/tmp/usr/share/doc/geeqie-common/README.md \
		$(CURDIR)/debian/tmp/usr/share/doc/geeqie-common/COPYING \
		$(CURDIR)/debian/tmp/usr/share/doc/geeqie-common/AUTHORS

override_dh_compress:
	# Readme is shown from program, do not compress it
	dh_compress -pgeeqie -XREADME -XAUTHORS -XCOPYING usr/share/doc/geeqie/changelog.Debian
	dh_compress -pgeeqie-common -XREADME -XAUTHORS -XCOPYING usr/share/doc/geeqie-common/changelog.Debian

override_dh_autoreconf:
	dh_autoreconf
	intltoolize --copy --force --automake

override_dh_installchangelogs:
	dh_installchangelogs -k ChangeLog