#!/usr/bin/make -f
# -*- makefile -*-

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- -DBUILD_DOCS=ON

override_dh_auto_test:
	sh tests/xvfb.sh dh_auto_test || exit $?

execute_before_dh_install:
	# move doc files
	mkdir -p debian/tmp/usr/share/doc/libu1db-qt5-dev/
	mv debian/tmp/usr/share/doc/u1db-qt/html debian/tmp/usr/share/doc/libu1db-qt5-dev/
	rmdir debian/tmp/usr/share/doc/u1db-qt/
	# remove empty images/ dir
	rmdir debian/tmp/usr/share/doc/libu1db-qt5-dev/html/images/

get-orig-source:
	uscan --noconf --force-download --rename --download-current-version --destdir=..
