summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c9d1a2fd3c2d111f08a1692c028f6c49aa7559cd (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
# Maintainer: 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.0
pkgrel=1
pkgdesc='Netfilter tables userspace tools'
arch=(x86_64)
url='https://netfilter.org/projects/nftables/'
license=('GPL2')
optdepends=('python: Python bindings')
depends=(libmnl libnftnl-git gmp readline ncurses jansson)
makedepends=(asciidoc git bison flex)
optdepends=('python: Python bindings')
backup=('etc/nftables.conf')
provides=(nftables)
conflicts=(nftables)
source=(git://git.netfilter.org/nftables
        nftables.conf
        nftables.service)
install=nftables.install
sha256sums=('SKIP'
            '2aff88019097d21dbfa4713f5b54c184751c86376e458b683f8d90f3abd232a8'
            '3c6a34a400022450df0b6e97b3f16eea5cab7741a0e5f16858b46a3e6591b5af')

pkgver() {
  cd nftables
  git describe | sed 's/^v//; s/-/.r/; s/-/./'
}

build() {
  cd nftables
  ./configure \
    --prefix=/usr \
    --sbindir=/usr/bin \
    --sysconfdir=/usr/share \
    --with-json
  make
}

package() {
  cd nftables
  make DESTDIR="$pkgdir" install
  # 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"
}