blob: b508063c3ca0136bc4eb5a51fe5ad2fc8ff98e3e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=nftables
pkgver=1.0.5
pkgrel=3
pkgdesc="Netfilter tables userspace tools"
url="https://netfilter.org/projects/nftables"
arch="all"
license="GPL-2.0-or-later"
makedepends="
asciidoc
autoconf
automake
bison
docbook2x
flex
gmp-dev
jansson-dev
libmnl-dev
libnftnl-dev
libtool
ncurses-dev
python3
readline-dev
"
install="$pkgname.post-upgrade"
subpackages="
$pkgname-static
$pkgname-dev
$pkgname-doc
$pkgname-openrc
py3-$pkgname:_py3:noarch
"
source="https://netfilter.org/projects/nftables/files/nftables-$pkgver.tar.bz2
nftables.confd
nftables.initd
nftables.nft
"
prepare() {
default_prepare
sed -i '1i#include "config.h"' "$builddir"/src/proto.c
autoreconf -fi
rm -Rf autom4te*.cache config.h.in~
}
build() {
CONFIG_MAN=y DB2MAN=docbook2x-man ./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/usr/share \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
--enable-python \
--enable-static=yes \
--with-json \
--with-cli=readline
make
}
package() {
make DESTDIR="$pkgdir" install
install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
install -Dm644 "$srcdir"/nftables.nft "$pkgdir"/etc/nftables.nft
install -dm755 "$pkgdir"/etc/nftables.d
install -dm750 "$pkgdir"/var/lib/nftables
}
_py3() {
pkgdesc="$pkgdesc (Python interface)"
depends="$pkgname=$pkgver-r$pkgrel"
amove usr/lib/python3*
}
sha512sums="
51cbf10579db7eed58f4358044840f2ce1bffe84533c5fb03e0ebcc702970856455576ac793169c94d38a9f8148e33631ad91444e54a8be189d93af7c27feb9a nftables-1.0.5.tar.bz2
5a298ea01df60b434791fea94306d5b14f7ce684329e4122cc78bb52d1c272fcc48b06eaae154fd082c05f7030792fe42e73814caf3c7be3c446bb265fe25642 nftables.confd
d425442b37693afb334123ff9dd1e1ddf91c299831f5508d3088a0938389d937b437e9886f69a91185c939693e6f0e9f0cac3e0ce988cc7cd7bf4090c7cdf908 nftables.initd
2dfc81a204af6e9516f78df97603e320453679bd9d34e7e8376b110438bb4d406d571df5efcbb76a446cd4a456c8a497092933219286e41a67bbd1483b38af39 nftables.nft
"
|