archrelease: copy trunk to extra-x86_64
[arch-packages.git] / nftables / trunk / PKGBUILD
blob735baf2634fbbe240154e487b01882edbb0725a5
1 # Maintainer: Sébastien "Seblu" Luttringer <seblu@archlinux.org>
3 pkgname=nftables
4 epoch=1
5 pkgver=1.0.1
6 pkgrel=3
7 pkgdesc='Netfilter tables userspace tools'
8 arch=('x86_64')
9 url='https://netfilter.org/projects/nftables/'
10 license=('GPL2')
11 depends=('libmnl' 'libnftnl' 'gmp' 'readline' 'ncurses' 'jansson')
12 optdepends=('python: Python bindings')
13 makedepends=('asciidoc' 'python')
14 backup=('etc/nftables.conf')
15 validpgpkeys=('37D964ACC04981C75500FB9BD55D978A8A1420E4') # Netfilter Core Team
16 source=("https://netfilter.org/projects/nftables/files/nftables-$pkgver.tar.bz2"{,.sig}
17         'nftables.conf'
18         'nftables.service')
19 install=nftables.install
20 sha256sums=('3ceeba625818e81a0be293e9dd486c3ef799ebd92165270f1e57e9a201efa423'
21             'SKIP'
22             '2aff88019097d21dbfa4713f5b54c184751c86376e458b683f8d90f3abd232a8'
23             'deffeef36fe658867dd9203ec13dec85047a6d224ea63334dcf60db97e1809ea')
25 prepare() {
26   cd $pkgname-$pkgver
27   # apply patch from the source array (should be a pacman feature)
28   local filename
29   for filename in "${source[@]}"; do
30     if [[ "$filename" =~ \.patch$ ]]; then
31       msg2 "Applying patch ${filename##*/}"
32       patch -p1 -N -i "$srcdir/${filename##*/}"
33     fi
34   done
35   :
38 build() {
39   cd $pkgname-$pkgver
40   ./configure \
41     --prefix=/usr \
42     --sbindir=/usr/bin \
43     --sysconfdir=/usr/share \
44     --with-json \
45     --with-cli=readline \
46     --disable-debug
47   make
50 package() {
51   pushd $pkgname-$pkgver
52   make DESTDIR="$pkgdir" install
53   popd
54   # basic safe firewall config
55   install -Dm644 nftables.conf "$pkgdir/etc/nftables.conf"
56   # systemd
57   install -Dm644 nftables.service "$pkgdir/usr/lib/systemd/system/nftables.service"
60 # vim:set ts=2 sw=2 et: