summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-09-29 03:49:50 +0200
committerMichał Górny <mgorny@gentoo.org>2020-09-29 04:14:47 +0200
commitdf4f437735c8007bdc400ce84ca10f4944e0b22d (patch)
treed8ca378e0cf6bf9d67c8713ca26e915aa4ab97da /net-misc/miniupnpd
parentnet-misc/minissdpd: Bump to 1.5.20200928 (diff)
downloadgentoo-df4f437735c8007bdc400ce84ca10f4944e0b22d.tar.gz
gentoo-df4f437735c8007bdc400ce84ca10f4944e0b22d.tar.bz2
gentoo-df4f437735c8007bdc400ce84ca10f4944e0b22d.zip
net-misc/miniupnpd: Bump to 2.2.0-RC2
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'net-misc/miniupnpd')
-rw-r--r--net-misc/miniupnpd/Manifest1
-rw-r--r--net-misc/miniupnpd/miniupnpd-2.2.0_rc2.ebuild80
2 files changed, 81 insertions, 0 deletions
diff --git a/net-misc/miniupnpd/Manifest b/net-misc/miniupnpd/Manifest
index 3ad834c9aff6..5cc9be099c46 100644
--- a/net-misc/miniupnpd/Manifest
+++ b/net-misc/miniupnpd/Manifest
@@ -1 +1,2 @@
DIST miniupnpd-2.1.20200510.tar.gz 245426 BLAKE2B 17b5335bb4cfb55a517c1f0aeb1eabd7515c729480ee737a8ba525988e59f067e18d2de78393df2ff62cc15201a742d17a17d5632601c1d98ea2a943dcc4a393 SHA512 36a5d1844075a93e76f13aba8820b3747bcc8f562c8cbcc562f991ac154e91c951b5caaa9b7c7066cf80534066c3ee6e20a066012b830143f0a7352cb9f5d71b
+DIST miniupnpd-2.2.0-RC2.tar.gz 248756 BLAKE2B 428f353496f4410ae2ddce96d8edca1d4addf4f77c1e794ba48b5ac7fbe12368f994d91c04eb5d54fbddd24f5e6d36aa87e4cfb4f60b8e3f08f3bf96b5b7f094 SHA512 17dd31477c018f3f26b05a9ab5370819f763bcab6c00f3bb13ea87bc3781f5dcd190e294837b85a9e41b4fe7d1bfa0b475ef8da2f1fa48c3fe357c284f585508
diff --git a/net-misc/miniupnpd/miniupnpd-2.2.0_rc2.ebuild b/net-misc/miniupnpd/miniupnpd-2.2.0_rc2.ebuild
new file mode 100644
index 000000000000..e80efef5db1b
--- /dev/null
+++ b/net-misc/miniupnpd/miniupnpd-2.2.0_rc2.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+DESCRIPTION="MiniUPnP IGD Daemon"
+HOMEPAGE="http://miniupnp.free.fr/"
+SRC_URI="http://miniupnp.free.fr/files/${P/_rc/-RC}.tar.gz"
+S=${WORKDIR}/${P/_rc/-RC}
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~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}
+ sys-apps/lsb-release"
+
+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_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"
+}