summaryrefslogtreecommitdiff
path: root/net-misc/miniupnpd
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-04 05:48:38 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-04 05:48:38 -0500
commitbfd9c39e4712ebdb442d4ca0673061faed1e70e1 (patch)
tree0d7a74b4463ee387f9cf9368ceb1b757f694f72a /net-misc/miniupnpd
parentf716a9fe6455d39eef01e718aae68dae61c19704 (diff)
downloadbaldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.gz
baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.xz
baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.zip
Revert "Adding metadata"
This reverts commit f716a9fe6455d39eef01e718aae68dae61c19704.
Diffstat (limited to 'net-misc/miniupnpd')
-rw-r--r--net-misc/miniupnpd/Manifest2
-rw-r--r--net-misc/miniupnpd/files/miniupnpd-conf.d-r216
-rw-r--r--net-misc/miniupnpd/files/miniupnpd-init.d-r245
-rw-r--r--net-misc/miniupnpd/metadata.xml23
-rw-r--r--net-misc/miniupnpd/miniupnpd-2.3.10.ebuild108
5 files changed, 194 insertions, 0 deletions
diff --git a/net-misc/miniupnpd/Manifest b/net-misc/miniupnpd/Manifest
new file mode 100644
index 000000000000..1b1210a54372
--- /dev/null
+++ b/net-misc/miniupnpd/Manifest
@@ -0,0 +1,2 @@
+DIST miniupnpd-2.3.10.tar.gz 305458 BLAKE2B 2356e87e419fefdb62e86185bb3f1d1e21a2dbbf6e11f0d186174dce3a3c314849a6dd014f458c44a4f64aa989bfc7642ce4f25ebcd029fdb283bc22bdf02e1b SHA512 0e027730ea4c615eefc391c8f6b9160708abe7c3ee7a31677174880170c06fcb03cb3381750d9047a67a55c500d6e6b8c6692a88b0a192387dd82de602288390
+DIST miniupnpd-2.3.10.tar.gz.sig 584 BLAKE2B 192de3d2f59eafdb7f61a5a30c8523abaf919897fcf05bc471bcb3c613fcd50dc6cd1393894a813d9b78be9bbfc330da01063957c5883a89ddaa16c33fa8c3e5 SHA512 b4cc2d7eb65a3d87a3a6fb7cc6641344e5e2b466c44500cac14795c842cf538301c4ab429e7a6d0ec43317b83c4b0b851c5c6714a0e2f54f8b9fe3761c8ccdc7
diff --git a/net-misc/miniupnpd/files/miniupnpd-conf.d-r2 b/net-misc/miniupnpd/files/miniupnpd-conf.d-r2
new file mode 100644
index 000000000000..656ab8ec00a9
--- /dev/null
+++ b/net-misc/miniupnpd/files/miniupnpd-conf.d-r2
@@ -0,0 +1,16 @@
+# /etc/conf.d/miniupnpd: Configuration for miniupnpd init script
+
+# extra arguments to be passed to the command
+#extra_args=""
+
+# the location of the configuration file
+#config_file="/etc/miniupnpd/miniupnpd.conf"
+
+# enable manipulating iptables on start/stop
+iptables_scripts=1
+
+# enable manipulating ip6tables on start/stop
+ip6tables_scripts=1
+
+# enable manipulating nftables on start/stop (for USE=nftables)
+nftables_scripts=1
diff --git a/net-misc/miniupnpd/files/miniupnpd-init.d-r2 b/net-misc/miniupnpd/files/miniupnpd-init.d-r2
new file mode 100644
index 000000000000..e23c7a819951
--- /dev/null
+++ b/net-misc/miniupnpd/files/miniupnpd-init.d-r2
@@ -0,0 +1,45 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/sbin/miniupnpd"
+: "${config_file:=/etc/miniupnpd/miniupnpd.conf}"
+command_args="-f ${config_file:-/etc/miniupnpd/miniupnpd.conf} ${extra_args}"
+: "${pidfile:=/var/run/miniupnpd.pid}"
+
+depend() {
+ need net
+ use iptables ip6tables minissdpd
+}
+
+start_pre() {
+ local retval=0
+
+ if [ -n "${iptables_scripts}" ]; then
+ /etc/miniupnpd/iptables_init.sh || retval=${?}
+ fi
+ if [ -n "${ip6tables_scripts}" ]; then
+ /etc/miniupnpd/ip6tables_init.sh || retval=${?}
+ fi
+ if [ -n "${nftables_scripts}" ]; then
+ /etc/miniupnpd/nft_init.sh || retval=${?}
+ fi
+
+ return ${retval}
+}
+
+stop_post() {
+ local retval=0
+
+ if [ -n "${iptables_scripts}" ]; then
+ /etc/miniupnpd/iptables_removeall.sh
+ fi
+ if [ -n "${ip6tables_scripts}" ]; then
+ /etc/miniupnpd/ip6tables_removeall.sh
+ fi
+ if [ -n "${nftables_scripts}" ]; then
+ /etc/miniupnpd/nft_removeall.sh
+ fi
+
+ return ${retval}
+}
diff --git a/net-misc/miniupnpd/metadata.xml b/net-misc/miniupnpd/metadata.xml
new file mode 100644
index 000000000000..e1c5b875f102
--- /dev/null
+++ b/net-misc/miniupnpd/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>chutzpah@gentoo.org</email>
+ <name>Patrick McLean</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <use>
+ <flag name="leasefile">Enable lease file.</flag>
+ <flag name="igd2">Build for IGDv2 instead of an IGDv1</flag>
+ <flag name="nftables">Use <pkg>net-firewall/nftables</pkg> rather than <pkg>net-firewall/iptables</pkg>.</flag>
+ <flag name="pcp-peer">Enable support for PCP-PEER to allow NAT-PMP clients to mangle their packets.</flag>
+ <flag name="portinuse">Check if a port is in use before allowing a NAT-PMP client to map it.</flag>
+ <flag name="strict">Be more strict regarding compliance with UPnP specifications.</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">miniupnp/miniupnp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/miniupnpd/miniupnpd-2.3.10.ebuild b/net-misc/miniupnpd/miniupnpd-2.3.10.ebuild
new file mode 100644
index 000000000000..7ee6825db55a
--- /dev/null
+++ b/net-misc/miniupnpd/miniupnpd-2.3.10.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=9
+
+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"
+}