<?xml version="1.0"?>
<package name="iptables">
	<description>linux packet firewall tools</description>
	<releases>
		<release version="1.8.13" revision="1">
			<deps>
				<dep name="bison"/>
				<dep name="flex"/>
				<dep name="libmnl"/>
				<dep name="libnetfilter_conntrack"/>
				<dep name="libnfnetlink"/>
				<dep name="libnftnl"/>
			</deps>
			<build>
				<script>
					<archive name="iptables-$VERSION">
						<!-- delete outdated local copy to fix build -->
						<cmd>rm -vf include/linux/types.h</cmd>

						<cmd>./configure</cmd>
						<cmd>make</cmd>
						<cmd>make install</cmd>

						<install name="systemd-iptables-20110411" dest="/lib/systemd/systemd-iptables" mode="0755"/>
						<install name="systemd-ip6tables-20110411" dest="/lib/systemd/systemd-ip6tables" mode="0755"/>

						<install name="iptables.service-20110411" dest="/lib/systemd/system/iptables.service"/>
						<install name="ip6tables.service-20110411" dest="/lib/systemd/system/ip6tables.service"/>

						<cmd>install -dv /lib/systemd/system/network.target.wants</cmd>
						<cmd>install -dv /lib/systemd/system/multi-user.target.wants</cmd>
						<cmd>ln -svf ../iptables.service /lib/systemd/system/network.target.wants/</cmd>
						<cmd>ln -svf ../ip6tables.service /lib/systemd/system/network.target.wants/</cmd>
						<cmd>ln -svf ../iptables.service /lib/systemd/system/multi-user.target.wants/</cmd>
						<cmd>ln -svf ../ip6tables.service /lib/systemd/system/multi-user.target.wants/</cmd>
					</archive>
				</script>
			</build>
		</release>
	</releases>
</package>
