72 lines
2.0 KiB
Bash
72 lines
2.0 KiB
Bash
|
#!/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
|
||
|
pkgver=1.0.6
|
||
|
pkgrel=01
|
||
|
pkgdesc='Netfilter tables userspace tools w/o systemd'
|
||
|
arch=('x86_64')
|
||
|
url='https://netfilter.org/projects/nftables/'
|
||
|
depends=('libmnl' 'libnftnl' 'gmp' 'readline' 'ncurses' 'jansson')
|
||
|
optdepends=('python: Python bindings')
|
||
|
makedepends=('asciidoc' 'python')
|
||
|
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"
|
||
|
}
|
||
|
|
||
|
#---- license gpg-key sha256sums ----
|
||
|
|
||
|
license=('GPL2')
|
||
|
|
||
|
sha256sums=(2407430ddd82987670e48dc2fda9e280baa8307abec04ab18d609df3db005e4c # nftables-1.0.6.tar.xz
|
||
|
8bfb46d049eed2b7c52ad180dcb4649afea60fd3b24ead331a5abf4b84eaf197 # nftables-1.0.6.tar.xz.sig
|
||
|
2aff88019097d21dbfa4713f5b54c184751c86376e458b683f8d90f3abd232a8) # nftables.conf
|
||
|
|
||
|
|