36 lines
1008 B
Plaintext
36 lines
1008 B
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.2
|
|
release=2
|
|
source=(https://www.netfilter.org/pub/nftables/nftables-$version.tar.bz2
|
|
nftables.nft nftables.init)
|
|
|
|
build() {
|
|
cd $name-$version
|
|
|
|
PYTHON_VERSION=$(python3 -c 'import sys; print("%s.%s" % sys.version_info[:2])')
|
|
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
|
|
}
|