#!/usr/bin/make -f

export DH_VERBOSE=1

%:
	dh $@

override_dh_autoreconf:
	dh_autoreconf ./autogen.sh

override_dh_auto_configure:
	dh_auto_configure -- \
		--with-secret=yes \
		--with-macos-keychain=no \
		--with-gstreamer1=check \
		--with-pulseaudio=check \
		--with-portaudio=check

override_dh_install:

	# do not ship *.la and *.a files
	find debian/ -name \*.la -delete
	find debian/ -name \*.a -delete
	find debian/ -name install-fax.sh -delete

	dh_install --list-missing

override_dh_fixperms:
	dh_fixperms
	chmod 755 debian/roger-router-cli/usr/lib/cups/backend/roger-cups
	chown lp.fax debian/roger-router-cli/var/spool/roger
	chmod 2770 debian/roger-router-cli/var/spool/roger
