#!/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.9 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') 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 \ --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 service file saved in docs for reference in making a runit or 66 service file install -Dm644 nftables.service "$pkgdir/usr/share/doc/$pkgname/nftables.service" } #---- arch license gpg-key & sha256sums ---- arch=(x86_64) license=('GPL2') validpgpkeys=('37D964ACC04981C75500FB9BD55D978A8A1420E4') # Netfilter Core Team sha256sums=(a3c304cd9ba061239ee0474f9afb938a9bb99d89b960246f66f0c3a0a85e14cd # nftables-1.0.9.tar.xz d07c88a9b5e8510c4af787caabb108b69dd53885939c135ef8cfe12bab79fe2f # nftables-1.0.9.tar.xz.sig 2aff88019097d21dbfa4713f5b54c184751c86376e458b683f8d90f3abd232a8 # nftables.conf deffeef36fe658867dd9203ec13dec85047a6d224ea63334dcf60db97e1809ea) # nftables.service ## a1eda89c1c333e522d2c4126a30a59656d2277ccbdc501b999747e433fe21301 nftables-1_1.0.9-02-x86_64.pkg.tar.lz # Note to packager: #ls -l *pkg.tar.lz #echo "you must rename this package to meet SF naming before you move to the repo" #mv $(ls -l $pkgname*pkg.tar.lz) $pkgname-$epoch_$pkgver-$pkgrel-$arch.pkg.tar.lz >pkg-mv.log a3c304cd9ba061239ee0474f9afb938a9bb99d89b960246f66f0c3a0a85e14cd nftables-1.0.9.tar.xz d07c88a9b5e8510c4af787caabb108b69dd53885939c135ef8cfe12bab79fe2f nftables-1.0.9.tar.xz.sig a1eda89c1c333e522d2c4126a30a59656d2277ccbdc501b999747e433fe21301 nftables-1:1.0.9-02-x86_64.pkg.tar.lz