#!/usr/bin/make -f

TYPELIBDIR=$(shell pkg-config gobject-introspection-1.0 --variable libdir | sed -e 's/.//')

%:
	dh $@

override_dh_install:
	sed 's@TYPELIBDIR@${TYPELIBDIR}@' debian/gir1.2-xreader.install.in > debian/gir1.2-xreader.install
	dh_install

override_dh_auto_configure:
	dh_auto_configure -- \
		--prefix=/usr \
		--libexecdir=/usr/libexec \
		--buildtype=debugoptimized \
		-D deprecated_warnings=false \
		-D djvu=true \
		-D dvi=true \
		-D t1lib=true \
		-D pixbuf=false \
		-D comics=true \
		-D introspection=true \
		-D help_files=true \
	# 	--disable-static \

override_dh_strip:
	dh_strip -pxreader --dbg-package=xreader-dbg
	dh_strip -plibxreaderdocument3 --dbg-package=libxreaderdocument3-dbg
	dh_strip -plibxreaderview3 --dbg-package=libxreaderview3-dbg

override_dh_auto_test:

override_dh_missing:
	dh_missing --fail-missing