#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --with autoreconf

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

override_dh_auto_configure:
	dh_auto_configure -- --enable-static

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 -rf debian/tmp/usr/share/aclocal
	# Remove dvdnav-config. It breaks multi-arch. Use the pkg-config file instead!
	rm debian/tmp/usr/bin/dvdnav-config

override_dh_install:
	dh_install --fail-missing

override_dh_strip:
	dh_strip --dbg-package=libdvdnav-dbg

override_dh_builddeb:
	dh_builddeb -- -Zxz
