aboutsummaryrefslogtreecommitdiffstats
path: root/main/nftables/APKBUILD
blob: f8166c3412495bbc36617b2aa9b65aa03a45be02 (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
# 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.8.3
pkgrel=1
pkgdesc="Netfilter tables userspace tools"
url="http://netfilter.org/projects/nftables"
arch="all"
license="GPL-2.0-or-later"
makedepends="libmnl-dev libnftnl-dev gmp-dev readline-dev
	ncurses-dev bison flex docbook2x"
subpackages="$pkgname-doc"
source="http://netfilter.org/projects/$pkgname/files/$pkgname-$pkgver.tar.bz2
	nftables.confd
	nftables.initd"
builddir="$srcdir/$pkgname-$pkgver"

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

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
	make
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir" install

	install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
}

sha512sums="d3d97be10c2dcd1f15b9998e01254ff11438a2d83922e8b5207b641375ea12bb86ecbe4f9cb21cdf5998ddeb7c42b9e424dcb40a359cf42e06b9437a5ce4f72c  nftables-0.8.3.tar.bz2
a13e8b55b2ef6df2255e0b190f8dd5b2deb0ab49f8f303b1f11a3df550de41cd71e76cbfd7184d031a24a1d3387262c5d01a8cb8e4a981c8a85d8eb7753be39a  nftables.confd
a4a9b07f7389f7c66d42af71e6d76b55e940a60f823323344ebe3c2939667c21834c5e52f3fc59b37ea7e234144d48262bd07c86db8aa4195f59f98111548330  nftables.initd"