#!/usr/bin/make -f

%:
	dh $@ --parallel --with autoreconf --builddirectory=build

override_dh_auto_configure:
	dh_auto_configure -- \
		--libdir /usr/lib \
		--docdir=/usr/share/doc/bind9-dyndb-ldap

override_dh_install:
	# purge .la files
	find $(CURDIR)/debian/bind9-dyndb-ldap -name "*.la" -type f -delete
	dh_install --fail-missing

	mkdir -m 770 -p $(CURDIR)/debian/bind9-dyndb-ldap/var/cache/bind/dyndb-ldap

override_dh_fixperms:
	dh_fixperms -X var/cache/bind/dyndb-ldap
