#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

%:
	dh $@ --with autotools_dev
	# --with python2

override_dh_auto_configure:
	#cp INSTALL INSTALL.upstream
	./bootstrap
	dh_auto_configure -- --enable-randr --enable-vidmode --enable-gui --enable-ubuntu

override_dh_installchangelogs:
	dh_installchangelogs NEWS

override_dh_clean:
	# Clean up files created by upstream bootstrap script.
	rm -f ABOUT-NLS config.* configure compile depcomp install-sh missing \
		py-compile
	rm -f Makefile.in aclocal.m4
	rm -f po/*.gmo po/Makefile.in.in po/Makevars.template \
		po/Rules-quot po/*.sed po/*.header po/*.sin po/stamp-po
	rm -f src/Makefile.in src/redshift-gtk/Makefile.in
	rm -rf m4
	# Workaround bootstrap script importing in a new INSTALL file.
	#-mv INSTALL.upstream INSTALL
	dh_clean
