New package: miniupnpd-nftables

Builds miniupnpd with nftables support rather than iptables
This commit is contained in:
Echo Nar 2024-10-24 22:49:54 -05:00 committed by Duncaen
parent 961286d98e
commit 2c9f97e064
No known key found for this signature in database
GPG key ID: 335C1D17EC3D6E35
5 changed files with 72 additions and 0 deletions

View file

@ -0,0 +1,3 @@
Before running miniupnpd edit the scripts and configuration files in /etc/miniupnpd/.
Load the nftable rules by executing /etc/miniupnpd/nft_init.sh manually or by adding
the script to /etc/sv/minidlnad/run.

View file

@ -0,0 +1,4 @@
#!/bin/sh
[ -r conf ] && . ./conf
exec 2>&1
exec miniupnpd ${OPTS:=-f /etc/miniupnpd/miniupnpd.conf}

View file

@ -0,0 +1,11 @@
--- a/configure
+++ b/configure
@@ -49,7 +49,7 @@
--iptablespath=*)
IPTABLESPATH=$(echo $argv | cut -d= -f2) ;;
--getifaddrs) GETIFADDRS=1 ;;
- --v6sockets-v6only) V6SOCKETS_ARE_V6ONLY="0"
+ --v6sockets-v6only) V6SOCKETS_ARE_V6ONLY="0" ;;
--host-os=*)
OS_NAME=$(echo $argv | cut -d= -f2) ;;
--host-os-version=*)

View file

@ -0,0 +1,53 @@
# Template file for 'miniupnpd-nftables'
pkgname=miniupnpd-nftables
version=2.3.7
revision=1
build_style=configure
configure_args="
--disable-fork
--ipv6
--igd2
--leasefile
--firewall=nftables"
make_install_args="
INSTALLPREFIX=/usr
SBININSTALLDIR=/usr/bin"
conf_files="
/etc/miniupnpd/*.conf
/etc/miniupnpd/*.sh"
hostmakedepends="pkg-config"
makedepends="libnfnetlink-devel libnftnl-devel openssl-devel"
checkdepends="iproute2 nftables which"
short_desc="Lightweight UPnP IGD daemon with nftables support"
maintainer="Echo Nar <echo@lethedata.com>"
license="BSD-3-Clause"
homepage="http://miniupnp.free.fr"
changelog="http://miniupnp.free.fr/files/changelog.php?file=miniupnpd-${version}.tar.gz"
distfiles="http://miniupnp.free.fr/files/miniupnpd-${version}.tar.gz"
checksum=fbdd5501039730f04a8420ea2f8f54b7df63f9f04cde2dc67fa7371e80477bbe
conflicts="miniupnpd"
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
makedepends+=" musl-legacy-compat"
fi
post_extract() {
vsed -i "${wrksrc}/configure" \
-e 's|LSB_RELEASE=.*|LSB_RELEASE=$(false)|' \
-e 's|V6SOCKETS_ARE_V6ONLY=.*|V6SOCKETS_ARE_V6ONLY="0"|'
}
post_configure() {
vsed -i "${wrksrc}/config.h" \
-e 's|^#define OS_URL.*$|#define OS_URL "https://voidlinux.org/"|g' \
-e 's|^#define OS_NAME.*$|#define OS_NAME "Void"|g' \
-e 's|^#define OS_VERSION.*$|#define OS_VERSION "Void"|g'
}
post_install() {
rm -rf "${DESTDIR}/etc/init.d"
vsv miniupnpd
vlicense LICENSE
vdoc "${FILESDIR}/README.voidlinux"
}

View file

@ -0,0 +1 @@
ignore="*.???????? 20[0123456789][0123456789]????"