net-misc/miniupnpd: Bump to 2.3.8

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2025-04-05 11:28:51 +02:00
parent 43b2b23aed
commit ddf1b193c8
2 changed files with 110 additions and 0 deletions

View File

@@ -1,2 +1,4 @@
DIST miniupnpd-2.3.7.tar.gz 265329 BLAKE2B 9d7cbe04644c6811950328f402e4666fc8d51cf022a3ec40e4cc76c0f8a1c89b6703fe4ebe8d5eca7f6cef20acad7efbc47503dad4391d1519a6774ae6b26afd SHA512 7409bd6777c2a572ea501d47be604d9b09c09b1451c0f4150acd2313e3a5b4f7f3567559324a6c634c11a2b7c0ff56886a85217d1b056d5402916d0a8a3408e8
DIST miniupnpd-2.3.7.tar.gz.sig 543 BLAKE2B 957b5dad44b020004a38b6f4748ca251deaadfc8ade28332eb12484e4bac408f5afdb38fe9974f18bc17a28dd33aae91a287838c7c15984bc5df7f69a82f9c6f SHA512 b8edd3f69b61e63560fb902f43e0a1730c80908637978782a1141fe8ac910b24f578ee3980127f4726c44e44222491a83670adea36a19984b3ffd726b12fe0dc
DIST miniupnpd-2.3.8.tar.gz 301264 BLAKE2B 3194460cf91b7a9f290b52a461a133ce139d355c5470e4ed0fc6c4e8d4ac8f1e12fb54771be1cfae6c9507a1858e5097af2a8b3e987d97ec75241a20c1a738d6 SHA512 18cbaaf804dfcf42edbd9be0719e6137fbe6876a6a967a20b6f64ed8bf25a8977fe71c5ad9c8b8427badf9753e6f8d5f970b27e3d23dddfe9ba34cc183ec1917
DIST miniupnpd-2.3.8.tar.gz.sig 543 BLAKE2B dffe65f44b2aa4085414c6ccbc7bf96ba2c7bfa32e9aae7c03b59db377ad667cff2b6c176d2836a1141cfdabd198a2529fc891434518c2635cb7206eb7397d08 SHA512 7cbc9ad00bfa119be0cdeca6276745e8db8197e1f29b896d6e8423181ccf49bd1a9d5f16cd8e938cc46c68b706627eb69be30ec4bb179ba3595727a001e331ef

View File

@@ -0,0 +1,108 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit toolchain-funcs verify-sig
DESCRIPTION="MiniUPnP IGD Daemon"
HOMEPAGE="
http://miniupnp.free.fr/
https://miniupnp.tuxfamily.org/
https://github.com/miniupnp/miniupnp/
"
SRC_URI="
https://miniupnp.tuxfamily.org/files/${P}.tar.gz
verify-sig? (
https://miniupnp.tuxfamily.org/files/${P}.tar.gz.sig
)
"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
IUSE="+leasefile igd2 ipv6 nftables pcp-peer portinuse strict"
RDEPEND="
dev-libs/gmp:0=
sys-apps/util-linux:=
dev-libs/openssl:0=
!nftables? (
>=net-firewall/iptables-1.4.6:0=[ipv6(+)?]
net-libs/libnfnetlink:=
net-libs/libmnl:=
)
nftables? (
net-firewall/nftables
net-libs/libnftnl:=
net-libs/libmnl:=
)
"
DEPEND="
${RDEPEND}
elibc_musl? ( sys-libs/queue-standalone )
"
BDEPEND="
sys-apps/lsb-release
verify-sig? ( sec-keys/openpgp-keys-miniupnp )
"
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/miniupnp.asc
src_prepare() {
default
# fails without a default route
sed -i -e 's:EXTIF=.*:EXTIF=lo:' testgetifaddr.sh || die
}
src_configure() {
local opts=(
--vendorcfg
$(usex igd2 '--igd2' '')
$(usex ipv6 '--ipv6' '')
$(usex leasefile '--leasefile' '')
$(usex portinuse '--portinuse' '')
$(usex pcp-peer '--pcp-peer' '')
$(usex strict '--strict' '')
--firewall=$(usex nftables nftables iptables)
)
# custom script
./configure "${opts[@]}" || die
# prevent gzipping manpage
sed -i -e '/gzip/d' Makefile || die
}
src_compile() {
# By default, it builds a bunch of unittests that are missing wrapper
# scripts in the tarball
emake CC="$(tc-getCC)" STRIP=true miniupnpd
}
src_test() {
emake CC="$(tc-getCC)" check
}
src_install() {
emake PREFIX="${ED}" STRIP=true install
local confd_seds=()
if use nftables; then
confd_seds+=( -e 's/^iptables_scripts=/#&/' )
else
confd_seds+=( -e 's/^nftables_scripts=/#&/' )
fi
if ! use ipv6 || use nftables; then
confd_seds+=( -e 's/^ip6tables_scripts=/#&/' )
fi
newinitd "${FILESDIR}"/${PN}-init.d-r2 ${PN}
newconfd - ${PN} < <(sed "${confd_seds[@]}" \
"${FILESDIR}"/${PN}-conf.d-r2 || die)
}
pkg_postinst() {
elog "Please correct the external interface in the top of the two"
elog "scripts in /etc/miniupnpd and edit the config file in there too"
}