From ad6182343997a405079870a2fe91c4e0c6b94595 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 25 Sep 2019 19:33:39 +0100 Subject: gentoo resync : 25.09.2019 --- net-misc/miniupnpd/miniupnpd-2.1.20190924.ebuild | 91 ++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 net-misc/miniupnpd/miniupnpd-2.1.20190924.ebuild (limited to 'net-misc/miniupnpd/miniupnpd-2.1.20190924.ebuild') diff --git a/net-misc/miniupnpd/miniupnpd-2.1.20190924.ebuild b/net-misc/miniupnpd/miniupnpd-2.1.20190924.ebuild new file mode 100644 index 000000000000..8878d99503e2 --- /dev/null +++ b/net-misc/miniupnpd/miniupnpd-2.1.20190924.ebuild @@ -0,0 +1,91 @@ +# 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 + # meh, we have two Makefiles but genconfig.sh guesses anyway... + sed -e "s@\[ -x \"\$(command -v nft)\" \]@$(usex nftables true false)@" \ + -i genconfig.sh || 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" +} -- cgit v1.2.3