diff options
author | Michał Górny <mgorny@gentoo.org> | 2020-04-02 09:03:19 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2020-04-02 09:32:42 +0200 |
commit | 20ff498fd8b14c387ae39603509450a851b2e379 (patch) | |
tree | 5f12dee293b2733d7dccbe029fc38b5989afaec9 /net-misc/miniupnpd | |
parent | xfce-extra/xfce4-whiskermenu-plugin: Remove obsolete sed call (diff) | |
download | gentoo-20ff498fd8b14c387ae39603509450a851b2e379.tar.gz gentoo-20ff498fd8b14c387ae39603509450a851b2e379.tar.bz2 gentoo-20ff498fd8b14c387ae39603509450a851b2e379.zip |
net-misc/miniupnpd: Bump to 2.1.20200329
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'net-misc/miniupnpd')
-rw-r--r-- | net-misc/miniupnpd/Manifest | 1 | ||||
-rw-r--r-- | net-misc/miniupnpd/miniupnpd-2.1.20200329.ebuild | 88 |
2 files changed, 89 insertions, 0 deletions
diff --git a/net-misc/miniupnpd/Manifest b/net-misc/miniupnpd/Manifest index 1574ecf6cf8f..2bc14b305b96 100644 --- a/net-misc/miniupnpd/Manifest +++ b/net-misc/miniupnpd/Manifest @@ -1 +1,2 @@ DIST miniupnpd-2.1.20191006.tar.gz 243255 BLAKE2B 38654cfc0238cdd413600216b01465cbecda69589249df5b6500db7e0719053dae351ab8c61d763a7586924f68b6d634266a1020084f30261442ac62fbd17a5e SHA512 5de2dc5ffb6df7b06bcb6ab8d8fbb34aa5a229a8310938e980b4caf6b957ceab104c455cebb57d7083736fde2db9569fcdf98783a36c915d362f7ff2987e3599 +DIST miniupnpd-2.1.20200329.tar.gz 243725 BLAKE2B a9ca048744bc8f397e10bcc5e27638285d0000700855952cce4c2ba7959b2c9099e18045bd5e9103c67da79c90d04a2e505e064bcb1bbca5574437d4625101a5 SHA512 3f6a1a6f08924505a6db5ca5b1dbf7c59f8b48647c59a600799b020146422497248367767e41df0715bd9774129f2d8f95c4a63493af2db849bbe006231e6edf diff --git a/net-misc/miniupnpd/miniupnpd-2.1.20200329.ebuild b/net-misc/miniupnpd/miniupnpd-2.1.20200329.ebuild new file mode 100644 index 000000000000..a2f14c2708f1 --- /dev/null +++ b/net-misc/miniupnpd/miniupnpd-2.1.20200329.ebuild @@ -0,0 +1,88 @@ +# 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}.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' '') + ) + + CONFIG_OPTIONS="${opts[*]}" emake 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" +} |