aboutsummaryrefslogtreecommitdiffstats
path: root/main/nftables/APKBUILD
blob: 24379543bc010916dbc6640de3bb0b3b27b3d632 (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=nftables
pkgver=0.9.3
pkgrel=5
pkgdesc="Netfilter tables userspace tools"
url="https://netfilter.org/projects/nftables"
arch="all"
license="GPL-2.0-or-later"
makedepends="
	asciidoc
	bison
	docbook2x
	flex
	gmp-dev
	jansson-dev
	libmnl-dev
	libnftnl-dev
	ncurses-dev
	readline-dev
	"
install="$pkgname.post-upgrade"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
source="https://netfilter.org/projects/nftables/files/$pkgname-$pkgver.tar.bz2
	nftables.confd
	nftables.initd
	nftables.nft
	"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare
	sed -i '1i#include "config.h"' "$builddir"/src/proto.c
}

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 \
		--with-json
	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
}

sha512sums="d264f6fc75c95510e29fe7d5b82ae418d502f40437b098ba6117ffb1374d9989d70a7296e2e58c5fb25142145a987bb9c160902637899f892589809f9541db43  nftables-0.9.3.tar.bz2
cca875473bbd7b2326afcaeec84b1f9826afb70fc67381a64f3ad104a13a314bd2c352e0fac1f602b9980edb2818bf6242373aa1634ce17bcc1d82eeb8b05b39  nftables.confd
739e704b263b7afd124c5f497fef43c6f5de69f0a75e0a370c2b84f84619ca6a8a64fe704413c2d1cc1e4a0db062cce2c7fb807c202f9a1a1f60152bd45ad914  nftables.initd
059e0920517ff9f9c564bdfda6a06e8392a2755c01f8d0331a8577fd027713948d3f1e2cbe9da5077870181dc9e425d8c69e4c82ea6ee261fced4ab61aff3ad4  nftables.nft"