summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-10-18 08:53:09 +0200
committerMichał Górny <mgorny@gentoo.org>2022-10-18 09:26:15 +0200
commitae53c02ebe2714ed70221f0b0b0305406560ae20 (patch)
tree4b8b7cd66e1ecb288a82cdc1538626a0d6df5919 /net-misc
parentdev-python/sphinx: Bump to 5.3.0 (diff)
downloadgentoo-ae53c02ebe2714ed70221f0b0b0305406560ae20.tar.gz
gentoo-ae53c02ebe2714ed70221f0b0b0305406560ae20.tar.bz2
gentoo-ae53c02ebe2714ed70221f0b0b0305406560ae20.zip
net-misc/miniupnpd: Bump to 2.3.1
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/miniupnpd/Manifest2
-rw-r--r--net-misc/miniupnpd/miniupnpd-2.3.1.ebuild103
2 files changed, 105 insertions, 0 deletions
diff --git a/net-misc/miniupnpd/Manifest b/net-misc/miniupnpd/Manifest
index 2263c3ca93b7..c77a9464d1f8 100644
--- a/net-misc/miniupnpd/Manifest
+++ b/net-misc/miniupnpd/Manifest
@@ -1,2 +1,4 @@
DIST miniupnpd-2.3.0.tar.gz 256069 BLAKE2B dd21b4ee692cf9958bd996c6fe70e7e1f6cdfe467506676d2335ccf37cd0ed7e55ff435983747cad5d2342019b36597e538fcb9b511872889305330212e88cb0 SHA512 437a4b101bcadd9feb3845d37402c253a0a2114463fd8c5930859c7eae0ffaf7714ef7c9d387be2339c584e2f106fafa008a4364ff347b6640153c9a09919b0a
DIST miniupnpd-2.3.0.tar.gz.sig 543 BLAKE2B 312d46521d37c1a2fda146f2c7c964af45ffa4a75bc327dc743b40f96586e0916a674db4a0bb847b5e386f0b781319868d1d6cc74fbffaf3a8e989db18f4f6e6 SHA512 87be539c27d0147fcc62b69a82858518e862f2b593a0e03a9986e3641a0d61f4fa831d79a7ce645b33569234463a9517b9dbbc79ee988c9f561474a4757c4c04
+DIST miniupnpd-2.3.1.tar.gz 258050 BLAKE2B c11e3ecb3f1c6b97dfa1acfbc5f844f0bbdaea65fc91be9aec41e9e152900c6998c0fc132ad4faa07cf0cd7c8e433610a8a34ecab7c409f96a9990b6c17ff1ea SHA512 2b854bb75aad7f5b2ad28eeacb3afc2102edecffe50b293bc798b5ae66a9f3eb80df2e27fa14b9f5f232f78831308a5c0d6c7464697dde1770d60a75d98155f7
+DIST miniupnpd-2.3.1.tar.gz.sig 543 BLAKE2B 7211174bf1fa2244fafa1df63c3f872a8c557845840fa83f7cdc6264f6692fa5b4919d8c086e78253451497d55fca22300894a8d0e0bde58dbf8baaa6d8e4a26 SHA512 c661f8e028f0a3d96cc943dacd85414570473cd6805c2215531d14f355da2cee3695083807c91218eabbb9d40efed3c8f1c0178cff9461bf92202b4a948088c7
diff --git a/net-misc/miniupnpd/miniupnpd-2.3.1.ebuild b/net-misc/miniupnpd/miniupnpd-2.3.1.ebuild
new file mode 100644
index 000000000000..271875f16467
--- /dev/null
+++ b/net-misc/miniupnpd/miniupnpd-2.3.1.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit toolchain-funcs verify-sig
+
+MY_P=${P/_rc/-RC}
+DESCRIPTION="MiniUPnP IGD Daemon"
+HOMEPAGE="http://miniupnp.free.fr/"
+SRC_URI="
+ http://miniupnp.free.fr/files/${MY_P}.tar.gz
+ verify-sig? ( http://miniupnp.free.fr/files/${MY_P}.tar.gz.sig )
+"
+S=${WORKDIR}/${MY_P}
+
+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=${BROOT}/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"
+}