aboutsummaryrefslogtreecommitdiffstats
path: root/main/nftables/APKBUILD
blob: 6250b674af58df029e10332589a04802e96744fe (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
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=nftables
pkgver=0.5
pkgrel=2
pkgdesc="Netfilter tables userspace tools"
url="http://netfilter.org/projects/nftables/"
arch="all"
license="GPL2"
depends=""
depends_dev="libmnl-dev libnftnl-dev gmp-dev readline-dev ncurses-dev"
makedepends="$depends_dev bison flex"
install=""
subpackages="" # -doc would require docbook2x which isn't packaged yet
source="http://netfilter.org/projects/$pkgname/files/$pkgname-$pkgver.tar.bz2
	nftables.confd
	nftables.initd"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"

	update_config_sub || return 1
	sed -i '1i#include "config.h"' src/proto.c

	local i=
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1

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

md5sums="94bfe1c54bcb9f6ed974835f2fca8069  nftables-0.5.tar.bz2
52273a548f7cbfe17ba9ba97b10cf685  nftables.confd
15a168de8e5aa18cb1d2a84c90850ad7  nftables.initd"
sha256sums="1fb6dff333d8a4fc347cbbe273bf905a2634b27a8c39df0d3a45d5a3fde10ad6  nftables-0.5.tar.bz2
8f09ab3f86f326d3b78dca50db0bfdde2d8bf5e5d45e3495a836edebe99ec2ff  nftables.confd
3b51a516d419f0d003c7a0131525ce1cec33793eb13d3afafb9b61060fbaf62e  nftables.initd"
sha512sums="d5ac46bada26522e59461e36d793a2f4dbf42e070d71ac33259d86b343c0d7436975988b7e7878c340f9d81479a11a66518f1307384635ae0229b2f969f8f342  nftables-0.5.tar.bz2
f709e203d949380dce8ffdaed616c047280d3fe7448bb024a6f6c01a17c11bf7caaa5f67b412bc90c9bff4ce91a6fd5e5270d259dc30fdcda81dd2f6221ad0d8  nftables.confd
40a91ef2cff9a8fd5b88888fc601cfbdf30ab0d16bb37997ebee53b7b528de7adc26eca1adfd885fa5b17cc7abf7d4fd30a40385002042d6796aea9c820c3bc6  nftables.initd"