#!/usr/bin/make -f

export PYTHON=/usr/bin/python3

%:
	dh $@ --with python3

override_dh_autoreconf:
	NOCONFIGURE=true dh_autoreconf ./autogen.sh

override_dh_auto_configure:
	dh_auto_configure -- \
		--with-systemd-unitdir=/lib/systemd/system \
		--with-bashcompletiondir=/usr/share/bash-completion/completions/ \
		--with-zshcompletiondir=/usr/share/zsh/vendor-completions/ \
		--with-iptables=/usr/sbin/iptables \
		--with-iptables-restore=/usr/sbin/iptables-restore \
		--with-ip6tables=/usr/sbin/ip6tables \
		--with-ip6tables-restore=/usr/sbin/ip6tables-restore \
		--with-ebtables=/usr/sbin/ebtables \
		--with-ebtables-restore=/usr/sbin/ebtables-restore \
		--with-ipset=/usr/sbin/ipset \
		MODPROBE=/sbin/modprobe \
		RMMOD=/sbin/rmmod \
		SYSCTL=/sbin/sysctl

override_dh_install:
	# Delete the symlink and let update-alternatives handle it
	rm -f debian/tmp/usr/share/polkit-1/actions/org.fedoraproject.FirewallD1.policy
	dh_install

override_dh_missing:
	dh_missing --list-missing

override_dh_fixperms:
	dh_fixperms
	chmod 0750 debian/firewalld/etc/firewalld/

override_dh_auto_test:
