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

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

export DEB_BUILD_HARDENING=1

# This has to be exported to make some magic below work.
export DH_OPTIONS


%:
	dh $@ 

override_dh_auto_clean:
	# override the default disclean target
	[ ! -f Makefile ] || make clean
	# remove files created by the configuration
	rm -f build-aux/config.guess build-aux/config.sub
	rm -f Makefile config.h config.log \
	  config.status docs/Makefile \
	  docs/reference/Makefile docs/tutorial/Makefile \
	  glade/Makefile glade/pixmaps/Makefile gtkextra-3.0.pc \
	  gtkextra/Makefile libtool stamp-h1
	# remove uncleaned files in docs/tutorial/html
	rm -f docs/tutorial/html/c*.html docs/tutorial/html/x*.html \
	  docs/tutorial/html/index.html

override_dh_install:
	dh_install
	# do not fail if the directory debian/libgtkextra-3.0-doc
	# does not exist (as in Debian compile farm)
	find debian/libgtkextra-3.0-doc -type f -executable \
	  -exec chmod 644 {} \; || true;
