blob: e228cae33cdda2326c6b74620ddba5b803706224 (
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
|
# Maintainer: a821 mail de
# Contributor: Máté Eckl <ecklm94@gmail.com>
# Contributor: Anatol Pomozov <anatol.pomozov@gmail.com>
# Contributor: Steven Allen <steven@stebalien.com>
pkgname=nftables-git
epoch=1
pkgver=1.0.9.r255.gaa44b61a
pkgrel=1
pkgdesc='Netfilter tables userspace tools'
arch=('x86_64')
url='https://netfilter.org/projects/nftables/'
license=('GPL-2.0-only')
depends=('libmnl' 'libnftnl' 'gmp' 'readline' 'ncurses' 'jansson')
optdepends=('python: Python bindings')
makedepends=('asciidoc' 'git' 'python-setuptools' 'python-build' 'python-installer' 'python-wheel')
backup=('etc/nftables.conf')
provides=(nftables)
conflicts=(nftables)
source=(git://git.netfilter.org/nftables
nftables.conf
nftables.service)
install=nftables.install
sha256sums=('SKIP'
'f83d6f2f99f306866850c60ff0e343bbd9bc0c989d333ebe288563f7be4afe20'
'deffeef36fe658867dd9203ec13dec85047a6d224ea63334dcf60db97e1809ea')
pkgver() {
cd nftables
git describe | sed 's/^v//; s/-/.r/; s/-/./'
}
build() {
cd nftables
sh autogen.sh
./configure \
--prefix=/usr \
--sbindir=/usr/bin \
--sysconfdir=/usr/share \
--with-json \
--with-cli=readline \
--disable-python \
--disable-debug
make
# Building the Python module separately due to the automatic build resulting
# in an incorrect directory structure and unimportable module (see FS#79229)
cd py
python -m build --wheel --no-isolation
}
package() {
cd nftables
make DESTDIR="$pkgdir" install
python -m installer --destdir="$pkgdir" py/dist/*.whl
# basic safe firewall config
install -Dm644 "$srcdir/nftables.conf" "$pkgdir/etc/nftables.conf"
# systemd
install -Dm644 "$srcdir/nftables.service" "$pkgdir/usr/lib/systemd/system/nftables.service"
}
# vim: set ts=2 sw=2 et:
|