#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_clean:
	[ ! -f configure ] || dh_auto_clean
	rm -rf doc/html doc/latex

override_dh_auto_configure:
	dh_auto_configure -- --docdir=/usr/share/doc/libdvdnav-doc --enable-static --disable-silent-rules

override_dh_auto_build:
	dh_auto_build
	cd doc && doxygen doxy.conf

override_dh_auto_install:
	dh_auto_install
	# Removing unused files
	rm -f debian/tmp/usr/lib/*/*.la
	rm -f debian/tmp/usr/share/doc/libdvdnav-doc/COPYING
	rm -f debian/tmp/usr/share/doc/libdvdnav-doc/ChangeLog

override_dh_missing:
	dh_missing --fail-missing
