commit:     448d07d06a46e5eb6f2ef1cd79d324838c14d486
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 20 05:56:36 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Mar 20 06:28:24 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=448d07d0

net-misc/miniupnpd: Bump to 2.3.6

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 net-misc/miniupnpd/Manifest               |   2 +
 net-misc/miniupnpd/miniupnpd-2.3.6.ebuild | 108 ++++++++++++++++++++++++++++++
 2 files changed, 110 insertions(+)

diff --git a/net-misc/miniupnpd/Manifest b/net-misc/miniupnpd/Manifest
index 1c82e9ad5e1d..1c264826a1b0 100644
--- a/net-misc/miniupnpd/Manifest
+++ b/net-misc/miniupnpd/Manifest
@@ -1,2 +1,4 @@
 DIST miniupnpd-2.3.5.tar.gz 261952 BLAKE2B 
022ddbc495a2dbb500ab54a3c0569a16acf3726927eac42dc316b7251dd21e705be62e3d0bb2e159ff7a5a72078bae2c04bd279d0a97fe2bf378dc8c039089d8
 SHA512 
bbb82f1b94a68c1bbf65a2e188b39305ec265cb89d9c0f3ab2d3c72eee43ee33c7d6280161344a8d51828cba2e62e2e5f9a54b0c0089503dbed5cd3a154ff0ff
 DIST miniupnpd-2.3.5.tar.gz.sig 543 BLAKE2B 
17394e1da7d95c89771dd7578e4f1e2ce407c04b142f44fe4f110beff908797991553a7275c3ba28df03b09877963d16092cb718d4c75d96211db07226bcb176
 SHA512 
ef21f493da56b9f3fe99003ee299c08b13ddcf433d7136222817ff2e1c775bf7c28cbb47ef3ab60c662380e585c2be0ca4c38e261697de410f5a751c1f4fe2da
+DIST miniupnpd-2.3.6.tar.gz 263018 BLAKE2B 
9e3d6bfdbe71a09a15bf11c1a718b1388db991de52a2ec742aaec70128e4ac5147f441ccfa50e7077f09682ac724040343c4e351b4cc8c3d9e8efe04773651ec
 SHA512 
41ed8d0afcfdba70ab5ec44a33ad4643b226bea2da972fc432035fd3ff3a790227a71c32ca47574558e36eb491b0f6ab7710d3ef0af5ac6a359d899dcb36893c
+DIST miniupnpd-2.3.6.tar.gz.sig 543 BLAKE2B 
5c5c3566a9dfd16d95ca70fa006f7ce7097aebfe76940c03c22047064d5dae92aed73062f2455f08b61a99a747f9615e72c06e178628d948532b987b40fb262f
 SHA512 
312a9db9cbd74912294a7cc2d4ccc69634806fc58702083fda56e11ad1fd978e92ad71f217cadf5f4482e8e655df07e6d7cc52ae494b8167140ae4db74cd352d

diff --git a/net-misc/miniupnpd/miniupnpd-2.3.6.ebuild 
b/net-misc/miniupnpd/miniupnpd-2.3.6.ebuild
new file mode 100644
index 000000000000..ef90208e7b6d
--- /dev/null
+++ b/net-misc/miniupnpd/miniupnpd-2.3.6.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2024 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"
+}

Reply via email to