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, 14 May 2020 06:26:16
Message-Id: 1589437354.ed95db20162599e33f062aab3ca2019954bf8652.mgorny@gentoo
1 commit: ed95db20162599e33f062aab3ca2019954bf8652
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 14 06:22:34 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu May 14 06:22:34 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed95db20
7
8 net-misc/miniupnpd: Bump to 2.1.20200510
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.20200510.ebuild | 79 ++++++++++++++++++++++++
14 2 files changed, 80 insertions(+)
15
16 diff --git a/net-misc/miniupnpd/Manifest b/net-misc/miniupnpd/Manifest
17 index a2d5175bf55..a9ff957550b 100644
18 --- a/net-misc/miniupnpd/Manifest
19 +++ b/net-misc/miniupnpd/Manifest
20 @@ -1 +1,2 @@
21 DIST miniupnpd-2.1.20200329.tar.gz 243725 BLAKE2B a9ca048744bc8f397e10bcc5e27638285d0000700855952cce4c2ba7959b2c9099e18045bd5e9103c67da79c90d04a2e505e064bcb1bbca5574437d4625101a5 SHA512 3f6a1a6f08924505a6db5ca5b1dbf7c59f8b48647c59a600799b020146422497248367767e41df0715bd9774129f2d8f95c4a63493af2db849bbe006231e6edf
22 +DIST miniupnpd-2.1.20200510.tar.gz 245426 BLAKE2B 17b5335bb4cfb55a517c1f0aeb1eabd7515c729480ee737a8ba525988e59f067e18d2de78393df2ff62cc15201a742d17a17d5632601c1d98ea2a943dcc4a393 SHA512 36a5d1844075a93e76f13aba8820b3747bcc8f562c8cbcc562f991ac154e91c951b5caaa9b7c7066cf80534066c3ee6e20a066012b830143f0a7352cb9f5d71b
23
24 diff --git a/net-misc/miniupnpd/miniupnpd-2.1.20200510.ebuild b/net-misc/miniupnpd/miniupnpd-2.1.20200510.ebuild
25 new file mode 100644
26 index 00000000000..b208d8cce8f
27 --- /dev/null
28 +++ b/net-misc/miniupnpd/miniupnpd-2.1.20200510.ebuild
29 @@ -0,0 +1,79 @@
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_configure() {
64 + local opts=(
65 + --vendorcfg
66 + $(usex igd2 '--igd2' '')
67 + $(usex ipv6 '--ipv6' '')
68 + $(usex leasefile '--leasefile' '')
69 + $(usex portinuse '--portinuse' '')
70 + $(usex pcp-peer '--pcp-peer' '')
71 + $(usex strict '--strict' '')
72 + --firewall=$(usex nftables nftables iptables)
73 + )
74 +
75 + # custom script
76 + ./configure "${opts[@]}" || die
77 + # prevent gzipping manpage
78 + sed -i -e '/gzip/d' Makefile || die
79 +}
80 +
81 +src_compile() {
82 + # By default, it builds a bunch of unittests that are missing wrapper
83 + # scripts in the tarball
84 + emake CC="$(tc-getCC)" STRIP=true miniupnpd
85 +}
86 +
87 +src_install() {
88 + emake PREFIX="${ED}" STRIP=true install
89 +
90 + local confd_seds=()
91 + if use nftables; then
92 + confd_seds+=( -e 's/^iptables_scripts=/#&/' )
93 + else
94 + confd_seds+=( -e 's/^nftables_scripts=/#&/' )
95 + fi
96 + if ! use ipv6 || use nftables; then
97 + confd_seds+=( -e 's/^ip6tables_scripts=/#&/' )
98 + fi
99 +
100 + newinitd "${FILESDIR}"/${PN}-init.d-r2 ${PN}
101 + newconfd - ${PN} < <(sed "${confd_seds[@]}" \
102 + "${FILESDIR}"/${PN}-conf.d-r2 || die)
103 +}
104 +
105 +pkg_postinst() {
106 + elog "Please correct the external interface in the top of the two"
107 + elog "scripts in /etc/miniupnpd and edit the config file in there too"
108 +}