aboutsummaryrefslogtreecommitdiffstats
path: root/main/nftables/APKBUILD
blob: 9f14695c27b9c938bee41635cf7f2a6b547a9555 (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
# 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=2
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"
install="$pkgname.post-upgrade"
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
4eb1adf003dfcaad65c91af6ca88d91b7904c471aefae67e7d3c2f8e053e1ac196d3437a45d1fed5a855b876a0f1fc58a724e381d2acf1164d9120cadee73eef  nftables.confd
58daafb012b7cd0248a7db6e10f6a667e683347aaea7eaa78cb88780272f334e00913cea3fd39a22a4a72acc27fabd101944b40916f4b534ddeb509bd0232017  nftables.initd"