db-move: moved seahorse from [testing] to [extra] (x86_64)
[arch-packages.git] / nftables / trunk / PKGBUILD
blobe8f994cace50984fe1e5deb2d375cebc61b3fd93
1 # Maintainer: Sébastien "Seblu" Luttringer <seblu@archlinux.org>
3 pkgname=nftables
4 epoch=1
5 pkgver=1.0.7
6 pkgrel=2
7 pkgdesc='Netfilter tables userspace tools'
8 arch=('x86_64')
9 url='https://netfilter.org/projects/nftables/'
10 license=('GPL2')
11 depends=('libmnl' 'libnftnl' 'gmp' 'readline' 'ncurses' 'jansson')
12 optdepends=('python: Python bindings')
13 makedepends=('asciidoc' 'python')
14 backup=('etc/nftables.conf')
15 validpgpkeys=('37D964ACC04981C75500FB9BD55D978A8A1420E4') # Netfilter Core Team
16 source=("https://netfilter.org/projects/nftables/files/nftables-$pkgver.tar.xz"{,.sig}
17         'nftables.conf'
18         'nftables.service')
19 install=nftables.install
20 sha256sums=('c12ac941fff9adaedf17367d5ce213789b98a0d314277bc22b3d71e10891f412'
21             'SKIP'
22             '2aff88019097d21dbfa4713f5b54c184751c86376e458b683f8d90f3abd232a8'
23             'deffeef36fe658867dd9203ec13dec85047a6d224ea63334dcf60db97e1809ea')
25 prepare() {
26   cd $pkgname-$pkgver
27   # apply patch from the source array (should be a pacman feature)
28   local src
29   for src in "${source[@]}"; do
30     src="${src%%::*}"
31     src="${src##*/}"
32     [[ $src = *.patch ]] || continue
33     msg2 "Applying patch $src..."
34     patch -Np1 < "../$src"
35   done
36   :
39 build() {
40   cd $pkgname-$pkgver
41   autoreconf -fi #FIXME: To remove with 01.patch
42   ./configure \
43     --prefix=/usr \
44     --sbindir=/usr/bin \
45     --sysconfdir=/usr/share \
46     --with-json \
47     --with-cli=readline \
48     --disable-debug
49   make
52 package() {
53   pushd $pkgname-$pkgver
54   make DESTDIR="$pkgdir" install
55   popd
56   # basic safe firewall config
57   install -Dm644 nftables.conf "$pkgdir/etc/nftables.conf"
58   # systemd
59   install -Dm644 nftables.service "$pkgdir/usr/lib/systemd/system/nftables.service"
62 # vim:set ts=2 sw=2 et: