#!/usr/bin/make -f

%:
	dh $@ --with autotools_dev

override_dh_auto_configure:
	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-jasper --with-sasl2 --enable-nameservers=no CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs,--as-needed"

override_dh_installchangelogs:
	dh_installchangelogs ChangeLog

override_dh_fixperms:
	dh_fixperms --exclude http.passwd --exclude sasl/ziproxy.conf
	chmod 640 debian/ziproxy/etc/ziproxy/http.passwd
	chmod 640 debian/ziproxy/etc/ziproxy/sasl/ziproxy.conf
