#!/usr/bin/make -f

export PYTHON=/usr/bin/python3

%:
	dh $@ --with python3

autoreconf:
	ls po/*.po | sed -e 's/.po//' | sed -e 's/po\///' > po/LINGUAS
	intltoolize -f -c
	autoreconf -f -i

override_dh_autoreconf:
	dh_autoreconf debian/rules -- autoreconf

override_dh_auto_configure:
	dh_auto_configure -- \
		--with-systemd-unitdir=/lib/systemd/system \
		--with-iptables=/sbin/iptables \
		--with-iptables-restore=/sbin/iptables-restore \
		--with-ip6tables=/sbin/ip6tables \
		--with-ip6tables-restore=/sbin/ip6tables-restore \
		--with-ebtables=/sbin/ebtables \
		--with-ebtables-restore=/sbin/ebtables-restore \
		--with-ipset=/sbin/ipset

override_dh_install:
	dh_install --list-missing

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