Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/miniupnpd/
Date: Thu, 02 Apr 2020 07:32:52
Message-Id: 1585812762.20ff498fd8b14c387ae39603509450a851b2e379.mgorny@gentoo
1 commit: 20ff498fd8b14c387ae39603509450a851b2e379
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 2 07:03:19 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 2 07:32:42 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20ff498f
7
8 net-misc/miniupnpd: Bump to 2.1.20200329
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 net-misc/miniupnpd/Manifest | 1 +
13 net-misc/miniupnpd/miniupnpd-2.1.20200329.ebuild | 88 ++++++++++++++++++++++++
14 2 files changed, 89 insertions(+)
15
16 diff --git a/net-misc/miniupnpd/Manifest b/net-misc/miniupnpd/Manifest
17 index 1574ecf6cf8..2bc14b305b9 100644
18 --- a/net-misc/miniupnpd/Manifest
19 +++ b/net-misc/miniupnpd/Manifest
20 @@ -1 +1,2 @@
21 DIST miniupnpd-2.1.20191006.tar.gz 243255 BLAKE2B 38654cfc0238cdd413600216b01465cbecda69589249df5b6500db7e0719053dae351ab8c61d763a7586924f68b6d634266a1020084f30261442ac62fbd17a5e SHA512 5de2dc5ffb6df7b06bcb6ab8d8fbb34aa5a229a8310938e980b4caf6b957ceab104c455cebb57d7083736fde2db9569fcdf98783a36c915d362f7ff2987e3599
22 +DIST miniupnpd-2.1.20200329.tar.gz 243725 BLAKE2B a9ca048744bc8f397e10bcc5e27638285d0000700855952cce4c2ba7959b2c9099e18045bd5e9103c67da79c90d04a2e505e064bcb1bbca5574437d4625101a5 SHA512 3f6a1a6f08924505a6db5ca5b1dbf7c59f8b48647c59a600799b020146422497248367767e41df0715bd9774129f2d8f95c4a63493af2db849bbe006231e6edf
23
24 diff --git a/net-misc/miniupnpd/miniupnpd-2.1.20200329.ebuild b/net-misc/miniupnpd/miniupnpd-2.1.20200329.ebuild
25 new file mode 100644
26 index 00000000000..a2f14c2708f
27 --- /dev/null
28 +++ b/net-misc/miniupnpd/miniupnpd-2.1.20200329.ebuild
29 @@ -0,0 +1,88 @@
30 +# Copyright 1999-2020 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=7
34 +
35 +inherit toolchain-funcs
36 +
37 +DESCRIPTION="MiniUPnP IGD Daemon"
38 +HOMEPAGE="http://miniupnp.free.fr/"
39 +SRC_URI="http://miniupnp.free.fr/files/${P}.tar.gz"
40 +
41 +LICENSE="BSD"
42 +SLOT="0"
43 +KEYWORDS="~amd64 ~arm ~x86"
44 +IUSE="+leasefile igd2 ipv6 nftables pcp-peer portinuse strict"
45 +
46 +RDEPEND="
47 + dev-libs/gmp:0=
48 + sys-apps/util-linux:=
49 + dev-libs/openssl:0=
50 + !nftables? (
51 + >=net-firewall/iptables-1.4.6:0=[ipv6?]
52 + net-libs/libnfnetlink:=
53 + net-libs/libmnl:=
54 + )
55 + nftables? (
56 + net-firewall/nftables
57 + net-libs/libnftnl:=
58 + net-libs/libmnl:=
59 + )"
60 +DEPEND="${RDEPEND}
61 + sys-apps/lsb-release"
62 +
63 +src_prepare() {
64 + default
65 +
66 + # Prevent overriding CFLAGS.
67 + sed -i -e '/^CFLAGS =/d' Makefile.linux_nft || die
68 +
69 + mv "Makefile.linux$(usex nftables _nft '')" Makefile || die
70 +
71 + # Prevent gzipping manpage.
72 + sed -i -e '/gzip/d' Makefile || die
73 +}
74 +
75 +src_configure() {
76 + local -a opts
77 + opts=(
78 + --vendorcfg
79 + $(usex igd2 '--igd2' '')
80 + $(usex ipv6 '--ipv6' '')
81 + $(usex leasefile '--leasefile' '')
82 + $(usex portinuse '--portinuse' '')
83 + $(usex pcp-peer '--pcp-peer' '')
84 + $(usex strict '--strict' '')
85 + )
86 +
87 + CONFIG_OPTIONS="${opts[*]}" emake config.h
88 +}
89 +
90 +src_compile() {
91 + # By default, it builds a bunch of unittests that are missing wrapper
92 + # scripts in the tarball
93 + emake CC="$(tc-getCC)" STRIP=true miniupnpd
94 +}
95 +
96 +src_install() {
97 + emake PREFIX="${ED}" STRIP=true install
98 +
99 + local confd_seds=()
100 + if use nftables; then
101 + confd_seds+=( -e 's/^iptables_scripts=/#&/' )
102 + else
103 + confd_seds+=( -e 's/^nftables_scripts=/#&/' )
104 + fi
105 + if ! use ipv6 || use nftables; then
106 + confd_seds+=( -e 's/^ip6tables_scripts=/#&/' )
107 + fi
108 +
109 + newinitd "${FILESDIR}"/${PN}-init.d-r2 ${PN}
110 + newconfd - ${PN} < <(sed "${confd_seds[@]}" \
111 + "${FILESDIR}"/${PN}-conf.d-r2 || die)
112 +}
113 +
114 +pkg_postinst() {
115 + elog "Please correct the external interface in the top of the two"
116 + elog "scripts in /etc/miniupnpd and edit the config file in there too"
117 +}