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: Wed, 28 Aug 2019 05:36:55
Message-Id: 1566970605.b5a834ce44f4a441964feba3358e836e57aa13a1.mgorny@gentoo
1 commit: b5a834ce44f4a441964feba3358e836e57aa13a1
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 28 05:22:03 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 28 05:36:45 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5a834ce
7
8 net-misc/miniupnpd: Bump to 2.1.20190824
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.20190824.ebuild | 88 ++++++++++++++++++++++++
14 2 files changed, 89 insertions(+)
15
16 diff --git a/net-misc/miniupnpd/Manifest b/net-misc/miniupnpd/Manifest
17 index 49fd75fafde..bbb04bab5d9 100644
18 --- a/net-misc/miniupnpd/Manifest
19 +++ b/net-misc/miniupnpd/Manifest
20 @@ -1 +1,2 @@
21 DIST miniupnpd-2.1.20190630.tar.gz 240466 BLAKE2B fe4d4e59a7dad32bef9ed9b4c58b52e378ec9b26ea2439e84284630a7ef7269c6cd53cabdc632ff274cae88aea2552a8808af2ea349138f8b8ed667baf9e87ee SHA512 cd6006e5487652a258f7320e1e28fea7b0790528cc014071109a1abd0f6c249237cf8d0620987c14ee0ce1cca14f4bb4abd439b1d422e0e49a398cd485eaf970
22 +DIST miniupnpd-2.1.20190824.tar.gz 240490 BLAKE2B c2eaf08b18d4cd27a18a71232fd8d972ced799a68b0e6f3ff1b3d155ab0e27047153dcd81a0c89806f74a6c09c303eb3255825f6fd4083f1ec77605ee4f0d1b3 SHA512 f3e591e10b33d2459e55118db11f6692bafd75ae867f934f4a5c6ccf6c9cf21363d0a746d1b319a08381119f382d5941af84c5bfb5c54b97f8945aa9d7372987
23
24 diff --git a/net-misc/miniupnpd/miniupnpd-2.1.20190824.ebuild b/net-misc/miniupnpd/miniupnpd-2.1.20190824.ebuild
25 new file mode 100644
26 index 00000000000..07c804f3564
27 --- /dev/null
28 +++ b/net-misc/miniupnpd/miniupnpd-2.1.20190824.ebuild
29 @@ -0,0 +1,88 @@
30 +# Copyright 1999-2019 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 + emake CONFIG_OPTIONS="${opts[*]}" 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 +}