# Contributor: Sören Tempel # Maintainer: Francesco Colista pkgname=nftables pkgver=0.6 pkgrel=1 pkgdesc="Netfilter tables userspace tools" url="http://netfilter.org/projects/nftables/" arch="all" license="GPL2" depends="" depends_dev="" makedepends="libmnl-dev libnftnl-dev gmp-dev readline-dev ncurses-dev bison flex docbook2x" install="" subpackages="$pkgname-doc" source="http://netfilter.org/projects/$pkgname/files/$pkgname-$pkgver.tar.bz2 nftables.confd nftables.initd" _builddir="$srcdir"/$pkgname-$pkgver prepare() { cd "$_builddir" sed -i '1i#include "config.h"' \ src/proto.c || return 1 local i= for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" CONFIG_MAN=y DB2MAN=docbook2x-man ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ || return 1 make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 install -Dm755 "$srcdir"/$pkgname.initd \ "$pkgdir"/etc/init.d/$pkgname || return 1 install -Dm644 "$srcdir"/$pkgname.confd \ "$pkgdir"/etc/conf.d/$pkgname || return 1 } md5sums="fd320e35fdf14b7be795492189b13dae nftables-0.6.tar.bz2 52273a548f7cbfe17ba9ba97b10cf685 nftables.confd 15a168de8e5aa18cb1d2a84c90850ad7 nftables.initd" sha256sums="dede62655f1c56f2bc9f9be12d103d930dcef6d5f9e0855854ad9c6f93cd6c2d nftables-0.6.tar.bz2 8f09ab3f86f326d3b78dca50db0bfdde2d8bf5e5d45e3495a836edebe99ec2ff nftables.confd 3b51a516d419f0d003c7a0131525ce1cec33793eb13d3afafb9b61060fbaf62e nftables.initd" sha512sums="3919d353a4614a23e79eb5038c839d462f873d10c17be2c67fa57d283b47360ef8567ebfe2720cf5c3ae2de2b33e56b6da8207d6dea5d330ceceb5ae8c9cc96b nftables-0.6.tar.bz2 f709e203d949380dce8ffdaed616c047280d3fe7448bb024a6f6c01a17c11bf7caaa5f67b412bc90c9bff4ce91a6fd5e5270d259dc30fdcda81dd2f6221ad0d8 nftables.confd 40a91ef2cff9a8fd5b88888fc601cfbdf30ab0d16bb37997ebee53b7b528de7adc26eca1adfd885fa5b17cc7abf7d4fd30a40385002042d6796aea9c820c3bc6 nftables.initd"