summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-08-28 07:22:03 +0200
committerMichał Górny <mgorny@gentoo.org>2019-08-28 07:36:45 +0200
commitb5a834ce44f4a441964feba3358e836e57aa13a1 (patch)
tree5280b0bf59457052ca630572357fd449d0f596f8
parentdev-python/miniupnpc: Bump to 2.1.20190824 (diff)
downloadgentoo-b5a834ce.tar.gz
gentoo-b5a834ce.tar.bz2
gentoo-b5a834ce.zip
net-misc/miniupnpd: Bump to 2.1.20190824
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--net-misc/miniupnpd/Manifest1
-rw-r--r--net-misc/miniupnpd/miniupnpd-2.1.20190824.ebuild88
2 files changed, 89 insertions, 0 deletions
diff --git a/net-misc/miniupnpd/Manifest b/net-misc/miniupnpd/Manifest
index 49fd75fafdec..bbb04bab5d91 100644
--- a/net-misc/miniupnpd/Manifest
+++ b/net-misc/miniupnpd/Manifest
@@ -1 +1,2 @@
DIST miniupnpd-2.1.20190630.tar.gz 240466 BLAKE2B fe4d4e59a7dad32bef9ed9b4c58b52e378ec9b26ea2439e84284630a7ef7269c6cd53cabdc632ff274cae88aea2552a8808af2ea349138f8b8ed667baf9e87ee SHA512 cd6006e5487652a258f7320e1e28fea7b0790528cc014071109a1abd0f6c249237cf8d0620987c14ee0ce1cca14f4bb4abd439b1d422e0e49a398cd485eaf970
+DIST miniupnpd-2.1.20190824.tar.gz 240490 BLAKE2B c2eaf08b18d4cd27a18a71232fd8d972ced799a68b0e6f3ff1b3d155ab0e27047153dcd81a0c89806f74a6c09c303eb3255825f6fd4083f1ec77605ee4f0d1b3 SHA512 f3e591e10b33d2459e55118db11f6692bafd75ae867f934f4a5c6ccf6c9cf21363d0a746d1b319a08381119f382d5941af84c5bfb5c54b97f8945aa9d7372987
diff --git a/net-misc/miniupnpd/miniupnpd-2.1.20190824.ebuild b/net-misc/miniupnpd/miniupnpd-2.1.20190824.ebuild
new file mode 100644
index 000000000000..07c804f35640
--- /dev/null
+++ b/net-misc/miniupnpd/miniupnpd-2.1.20190824.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2019 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}.tar.gz"
+
+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_prepare() {
+ default
+
+ # Prevent overriding CFLAGS.
+ sed -i -e '/^CFLAGS =/d' Makefile.linux_nft || die
+
+ mv "Makefile.linux$(usex nftables _nft '')" Makefile || die
+
+ # Prevent gzipping manpage.
+ sed -i -e '/gzip/d' Makefile || die
+}
+
+src_configure() {
+ local -a opts
+ opts=(
+ --vendorcfg
+ $(usex igd2 '--igd2' '')
+ $(usex ipv6 '--ipv6' '')
+ $(usex leasefile '--leasefile' '')
+ $(usex portinuse '--portinuse' '')
+ $(usex pcp-peer '--pcp-peer' '')
+ $(usex strict '--strict' '')
+ )
+
+ emake CONFIG_OPTIONS="${opts[*]}" config.h
+}
+
+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"
+}