#!/usr/bin/bash # JOBoRun : Jwm OpenBox Obarun RUNit # Maintainer : Joe Bo Run # PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname" # Website : https://pozol.eu #-----------------------------------------| DESCRIPTION |--------------------------------------- pkgname=nftables epoch=1 pkgver=1.0.8 pkgrel=02 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') makedepends=('asciidoc' 'python' 'python-setuptools' 'python-build' 'python-installer' 'python-wheel') backup=('etc/nftables.conf') validpgpkeys=('37D964ACC04981C75500FB9BD55D978A8A1420E4') # Netfilter Core Team source=("https://netfilter.org/projects/nftables/files/nftables-$pkgver.tar.xz"{,.sig} 'meta-stash-context-statement-length.patch' '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 \ --disable-python \ --with-cli=readline \ --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() { pushd $pkgname-$pkgver make DESTDIR="$pkgdir" install python -m installer --destdir="$pkgdir" py/dist/*.whl 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" } #---- arch license gpg-key & sha256sums ---- arch=(x86_64) license=('GPL2') sha256sums=(9373740de41a82dbc98818e0a46a073faeb8a8d0689fa4fa1a74399c32bf3d50 # nftables-1.0.8.tar.xz eadbbad3eb70bc08a7a8c5598807f81b81860b571243f2e308dae01a97c656ae # nftables-1.0.8.tar.xz.sig 3c428a2e5037ff5ea54be060c46a48bf659cd783c8ce5f5ee943fec6ddc61da6 # meta-stash-context-statement-length.patch 2aff88019097d21dbfa4713f5b54c184751c86376e458b683f8d90f3abd232a8) # nftables.conf ## ad2c0fbfa0ff9956a6a898cead950b8a3b3205dc3d350fbc06f01eae18c6adec nftables-1:1.0.8-02-x86_64.pkg.tar.lz