39 lines
1.0 KiB
Plaintext
39 lines
1.0 KiB
Plaintext
# Description: firewalling, NAT, and packet mangling for linux
|
|
# URL: https://netfilter.org/projects/nftables/
|
|
# Maintainer: CRUX System Team, core-ports at crux dot nu
|
|
# Depends on: jansson libedit libgmp libnftnl python3
|
|
|
|
name=nftables
|
|
version=1.0.8
|
|
release=1
|
|
source=(https://www.netfilter.org/pub/nftables/nftables-$version.tar.xz
|
|
nftables.nft nftables.init)
|
|
|
|
build() {
|
|
cd $name-$version
|
|
|
|
PYTHON_VERSION=$(python3 -c 'import sys; print("%s.%s" % sys.version_info[:2])')
|
|
|
|
autoreconf -vfi
|
|
|
|
PYTHON_PATH=/usr/lib/python${PYTHON_VERSION}/site-packages/ \
|
|
./configure \
|
|
--prefix=/usr \
|
|
--sbindir=/usr/bin \
|
|
--sysconfdir=/usr/share \
|
|
--with-cli=readline \
|
|
--with-json \
|
|
--with-python-bin=/usr/bin/python3 \
|
|
--disable-debug
|
|
make
|
|
make DESTDIR=$PKG install
|
|
|
|
/usr/bin/python3 -m compileall -d / $PKG/usr/lib
|
|
/usr/bin/python3 -O -m compileall -d / $PKG/usr/lib
|
|
|
|
install -D -m 755 $SRC/nftables.init $PKG/etc/rc.d/nftables
|
|
install -D -m 600 $SRC/nftables.nft $PKG/etc/nftables.nft
|
|
|
|
rm -r $PKG/usr/share/doc
|
|
}
|