jobextra/nftables/PKGBUILD

74 lines
2.1 KiB
Bash
Raw Normal View History

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=nftables
epoch=1
2023-07-27 02:14:59 +02:00
pkgver=1.0.8
pkgrel=01
pkgdesc='Netfilter tables userspace tools w/o systemd'
url='https://netfilter.org/projects/nftables/'
depends=('libmnl' 'libnftnl' 'gmp' 'readline' 'ncurses' 'jansson')
optdepends=('python: Python bindings')
2023-07-27 02:14:59 +02:00
makedepends=('asciidoc' 'python' 'python-setuptools')
backup=('etc/nftables.conf')
validpgpkeys=('37D964ACC04981C75500FB9BD55D978A8A1420E4') # Netfilter Core Team
source=("https://netfilter.org/projects/nftables/files/nftables-$pkgver.tar.xz"{,.sig}
'nftables.conf')
# 'nftables.service')
install=nftables.install
prepare() {
cd $pkgname-$pkgver
# apply patch from the source array (should be a pacman feature)
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
msg2 "Applying patch $src..."
patch -Np1 < "../$src"
done
:
}
build() {
cd $pkgname-$pkgver
autoreconf -fi #FIXME: To remove with 01.patch
./configure \
--prefix=/usr \
--sbindir=/usr/bin \
--sysconfdir=/usr/share \
--with-json \
--with-cli=readline \
--disable-debug
make
}
package() {
pushd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
popd
# basic safe firewall config
install -Dm644 nftables.conf "$pkgdir/etc/nftables.conf"
# # systemd
# install -Dm644 nftables.service "$pkgdir/usr/lib/systemd/system/nftables.service"
}
2023-03-15 11:54:53 +01:00
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=('GPL2')
2023-07-27 02:14:59 +02:00
sha256sums=(9373740de41a82dbc98818e0a46a073faeb8a8d0689fa4fa1a74399c32bf3d50 # nftables-1.0.8.tar.xz
eadbbad3eb70bc08a7a8c5598807f81b81860b571243f2e308dae01a97c656ae # nftables-1.0.8.tar.xz.sig
2aff88019097d21dbfa4713f5b54c184751c86376e458b683f8d90f3abd232a8) # nftables.conf
2023-07-27 02:14:59 +02:00
## 751183c89602c67916e54c1452a133e9bdca65e730618f4e8a893f833033c7ff nftables-1:1.0.8-01-x86_64.pkg.tar.lz