Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-vpn/i2pd/
Date: Fri, 30 Apr 2021 07:19:29
Message-Id: 1619767158.5b2e68b9edf58bd52fe1b567544238b9b5210252.juippis@gentoo
1 commit: 5b2e68b9edf58bd52fe1b567544238b9b5210252
2 Author: Alexey Korepanov <kaikaikai <AT> yandex <DOT> ru>
3 AuthorDate: Thu Apr 29 18:16:57 2021 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 30 07:19:18 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b2e68b9
7
8 net-vpn/i2pd: version bump 2.37.0
9
10 Signed-off-by: Alexey Korepanov <kaikaikai <AT> yandex.ru>
11 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
12
13 net-vpn/i2pd/Manifest | 1 +
14 net-vpn/i2pd/i2pd-2.37.0.ebuild | 94 +++++++++++++++++++++++++++++++++++++++++
15 2 files changed, 95 insertions(+)
16
17 diff --git a/net-vpn/i2pd/Manifest b/net-vpn/i2pd/Manifest
18 index f0eaa1493f2..88e41383f75 100644
19 --- a/net-vpn/i2pd/Manifest
20 +++ b/net-vpn/i2pd/Manifest
21 @@ -1 +1,2 @@
22 DIST i2pd-2.36.0.tar.gz 550451 BLAKE2B 28ed24121a241b63d929c225223ebfea994ce993d715393db89199da123050f51a7b056205ed5ef6dd570c3ea51e0c56aead156ec5ebaeea8aef6a23daca9937 SHA512 7a1dc13ea4adddc5777532d5d50a4e7d1a8f8466983d4fc8874a38779723e213da0e09c831998688227317602c7e23b4fee0035367150c5fe3f338c595e872ad
23 +DIST i2pd-2.37.0.tar.gz 551885 BLAKE2B 478c4b3088760643a79b12fe963d8edb3f0f98b9f3422195ce493477b338e875fd5e28f45cd9d29c7f1e536732c22ed6cb4144f1400c8c3c3ec9db5697d558e1 SHA512 2cf785941b58563a575511ad2ef8b94ec20bfed10f1a4a06e82603f85c9b9586cf10740fcee0d962cd94bf6059c3950f68f2a0b96b55f1c6de23a7d49014d3e6
24
25 diff --git a/net-vpn/i2pd/i2pd-2.37.0.ebuild b/net-vpn/i2pd/i2pd-2.37.0.ebuild
26 new file mode 100644
27 index 00000000000..0afeb4fffed
28 --- /dev/null
29 +++ b/net-vpn/i2pd/i2pd-2.37.0.ebuild
30 @@ -0,0 +1,94 @@
31 +# Copyright 1999-2021 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +
36 +inherit cmake toolchain-funcs systemd
37 +
38 +DESCRIPTION="A C++ daemon for accessing the I2P anonymous network"
39 +HOMEPAGE="https://github.com/PurpleI2P/i2pd"
40 +SRC_URI="https://github.com/PurpleI2P/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
41 +
42 +LICENSE="BSD"
43 +SLOT="0"
44 +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
45 +IUSE="cpu_flags_x86_aes cpu_flags_x86_avx i2p-hardening libressl static +upnp"
46 +
47 +RDEPEND="
48 + acct-user/i2pd
49 + acct-group/i2pd
50 + !static? (
51 + dev-libs/boost:=[threads]
52 + !libressl? ( dev-libs/openssl:0=[-bindist] )
53 + libressl? ( dev-libs/libressl:0= )
54 + upnp? ( net-libs/miniupnpc:= )
55 + )"
56 +DEPEND="${RDEPEND}
57 + static? (
58 + dev-libs/boost:=[static-libs,threads]
59 + sys-libs/zlib[static-libs]
60 + !libressl? ( dev-libs/openssl:0=[static-libs] )
61 + libressl? ( dev-libs/libressl:0=[static-libs] )
62 + upnp? ( net-libs/miniupnpc:=[static-libs] )
63 + )"
64 +
65 +CMAKE_USE_DIR="${S}/build"
66 +
67 +DOCS=( README.md contrib/i2pd.conf contrib/tunnels.conf )
68 +
69 +PATCHES=(
70 + "${FILESDIR}/i2pd-2.25.0-lib-path.patch"
71 +)
72 +
73 +pkg_pretend() {
74 + if use i2p-hardening && ! tc-is-gcc; then
75 + die "i2p-hardening requires gcc"
76 + fi
77 +}
78 +
79 +src_configure() {
80 + mycmakeargs=(
81 + -DWITH_AESNI=$(usex cpu_flags_x86_aes ON OFF)
82 + -DWITH_HARDENING=$(usex i2p-hardening ON OFF)
83 + -DWITH_PCH=OFF
84 + -DWITH_STATIC=$(usex static ON OFF)
85 + -DWITH_UPNP=$(usex upnp ON OFF)
86 + -DWITH_LIBRARY=ON
87 + -DWITH_BINARY=ON
88 + )
89 + cmake_src_configure
90 +}
91 +
92 +src_install() {
93 + cmake_src_install
94 +
95 + # config
96 + insinto /etc/i2pd
97 + doins contrib/i2pd.conf
98 + doins contrib/tunnels.conf
99 +
100 + # working directory
101 + insinto /var/lib/i2pd
102 + doins -r contrib/certificates
103 +
104 + # add /var/lib/i2pd/certificates to CONFIG_PROTECT
105 + doenvd "${FILESDIR}/99i2pd"
106 +
107 + # openrc and systemd daemon routines
108 + newconfd "${FILESDIR}/i2pd-2.6.0-r3.confd" i2pd
109 + newinitd "${FILESDIR}/i2pd-2.6.0-r3.initd" i2pd
110 + systemd_newunit "${FILESDIR}/i2pd-2.6.0-r3.service" i2pd.service
111 +
112 + # logrotate
113 + insinto /etc/logrotate.d
114 + newins "${FILESDIR}/i2pd-2.6.0-r3.logrotate" i2pd
115 +}
116 +
117 +pkg_postinst() {
118 + if [[ -f ${EROOT}/etc/i2pd/subscriptions.txt ]]; then
119 + ewarn
120 + ewarn "Configuration of the subscriptions has been moved from"
121 + ewarn "subscriptions.txt to i2pd.conf. We recommend updating"
122 + ewarn "i2pd.conf accordingly and deleting subscriptions.txt."
123 + fi
124 +}