Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/i2p/
Date: Wed, 24 Feb 2016 21:31:43
Message-Id: 1455436685.4eae7210ca88d54ee3f8ff245a5813683156ee4b.monsieurp@gentoo
1 commit: 4eae7210ca88d54ee3f8ff245a5813683156ee4b
2 Author: Matthew Brewer <tomboy64 <AT> sina <DOT> cn>
3 AuthorDate: Fri Feb 12 20:45:15 2016 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 14 07:58:05 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4eae7210
7
8 net-p2p/i2p: rebump to 0.9.24-r1
9
10 adjust requirements for JVM regarding ECDSA
11
12 Package-Manager: portage-2.2.26
13 RepoMan-Options: --ignore-arches
14
15 net-p2p/i2p/i2p-0.9.24-r1.ebuild | 151 +++++++++++++++++++++++++++++++++++++++
16 1 file changed, 151 insertions(+)
17
18 diff --git a/net-p2p/i2p/i2p-0.9.24-r1.ebuild b/net-p2p/i2p/i2p-0.9.24-r1.ebuild
19 new file mode 100644
20 index 0000000..c265d91
21 --- /dev/null
22 +++ b/net-p2p/i2p/i2p-0.9.24-r1.ebuild
23 @@ -0,0 +1,151 @@
24 +# Copyright 1999-2016 Gentoo Foundation
25 +# Distributed under the terms of the GNU General Public License v2
26 +# $Id$
27 +
28 +EAPI="5"
29 +
30 +inherit eutils java-pkg-2 java-ant-2 systemd user
31 +
32 +DESCRIPTION="A privacy-centric, anonymous network."
33 +HOMEPAGE="https://geti2p.net"
34 +SRC_URI="https://download.i2p2.de/releases/${PV}/i2psource_${PV}.tar.bz2"
35 +
36 +LICENSE="Apache-2.0 Artistic BSD CC-BY-2.5 CC-BY-3.0 CC-BY-SA-3.0 EPL-1.0 GPL-2 GPL-3 LGPL-2.1 LGPL-3 MIT public-domain WTFPL-2"
37 +SLOT="0"
38 +
39 +# Until the deps reach other arches
40 +KEYWORDS="~amd64 ~x86"
41 +IUSE="nls"
42 +
43 +# dev-java/ant-core is automatically added due to java-ant-2.eclass
44 +CDEPEND="dev-java/bcprov:1.50
45 + dev-java/jrobin:0
46 + dev-java/slf4j-api:0
47 + dev-java/tomcat-jstl-impl:0
48 + dev-java/tomcat-jstl-spec:0
49 + dev-java/java-service-wrapper:0"
50 +
51 +DEPEND="${CDEPEND}
52 + dev-java/eclipse-ecj:*
53 + dev-libs/gmp:*
54 + nls? ( sys-devel/gettext )
55 + >=virtual/jdk-1.7"
56 +
57 +RDEPEND="${CDEPEND}
58 + || (
59 + dev-java/icedtea:7[-sunec]
60 + dev-java/icedtea:8[-sunec]
61 + dev-java/icedtea:7[nss,-sunec]
62 + dev-java/icedtea-bin:7[nss]
63 + dev-java/icedtea-bin:7
64 + dev-java/icedtea-bin:8
65 + dev-java/oracle-jre-bin
66 + dev-java/oracle-jdk-bin
67 + )"
68 +
69 +EANT_BUILD_TARGET="pkg"
70 +EANT_GENTOO_CLASSPATH="java-service-wrapper,jrobin,slf4j-api,tomcat-jstl-impl,tomcat-jstl-spec,bcprov-1.50"
71 +
72 +I2P_ROOT='/usr/share/i2p'
73 +I2P_CONFIG_HOME='/var/lib/i2p'
74 +I2P_CONFIG_DIR="${I2P_HOME}/.i2p"
75 +
76 +pkg_setup() {
77 + java-pkg-2_pkg_setup
78 +
79 + enewgroup i2p
80 + enewuser i2p -1 -1 "${I2P_CONFIG_HOME}" i2p -m
81 +}
82 +
83 +src_unpack() {
84 + unpack ${A}
85 + cd "${S}" || die
86 + java-ant_rewrite-classpath
87 +}
88 +
89 +src_prepare() {
90 + java-pkg-2_src_prepare
91 +
92 + # We're on GNU/Linux, we don't need .exe files
93 + echo "noExe=true" > override.properties
94 + if ! use nls; then
95 + echo "require.gettext=false" >> override.properties
96 + fi
97 +}
98 +
99 +src_install() {
100 + # Cd into pkg-temp.
101 + cd "${S}/pkg-temp" || die
102 +
103 + # add libs
104 + epatch "${FILESDIR}/${P}_add-libs.patch"
105 +
106 + # avoid auto starting browser
107 + sed -i 's|clientApp.4.startOnLoad=true|clientApp.4.startOnLoad=false|' \
108 + clients.config || die
109 +
110 + # replace paths as the installer would
111 + sed -i "s|%INSTALL_PATH|${I2P_ROOT}|" \
112 + eepget i2prouter runplain.sh || die
113 + sed -i "s|\$INSTALL_PATH|${I2P_ROOT}|" wrapper.config || die
114 + sed -i "s|%SYSTEM_java_io_tmpdir|${I2P_CONFIG_DIR}|" \
115 + i2prouter runplain.sh || die
116 + sed -i "s|%USER_HOME|${I2P_CONFIG_HOME}|" i2prouter || die
117 +
118 + # This is ugly, but to satisfy all non-system .jar dependencies, jetty and
119 + # systray4j would need to be packaged. The former would be too large a task
120 + # for an unseasoned developer and systray4j hasn't been touched in over 10
121 + # years. This seems to be the most pragmatic solution
122 + java-pkg_jarinto "${I2P_ROOT}/lib"
123 + for i in BOB commons-el commons-logging i2p i2psnark i2ptunnel \
124 + jasper-compiler jasper-runtime javax.servlet jbigi jetty* mstreaming org.mortbay.* router* \
125 + sam standard streaming systray systray4j; do
126 + java-pkg_dojar lib/${i}.jar
127 + done
128 +
129 + # Set up symlinks for binaries
130 + dosym /usr/bin/wrapper "${I2P_ROOT}/i2psvc"
131 + dosym "${I2P_ROOT}/i2prouter" /usr/bin/i2prouter
132 + dosym "${I2P_ROOT}/eepget" /usr/bin/eepget
133 +
134 + # Install main files and basic documentation
135 + exeinto "${I2P_ROOT}"
136 + insinto "${I2P_ROOT}"
137 + doins blocklist.txt hosts.txt *.config
138 + doexe eepget i2prouter runplain.sh
139 + dodoc history.txt INSTALL-headless.txt LICENSE.txt
140 + doman man/*
141 +
142 + # Install other directories
143 + doins -r certificates docs eepsite geoip scripts
144 + dodoc -r licenses
145 + java-pkg_dowar webapps/*.war
146 +
147 + # Install daemon files
148 + newinitd "${FILESDIR}/${P}_initd" i2p
149 + systemd_newunit "${FILESDIR}"/i2p.service i2p.service
150 +
151 + # setup user
152 + dodir "${I2P_CONFIG_DIR}"
153 + fowners -R i2p:i2p "${I2P_CONFIG_DIR}"
154 +}
155 +
156 +pkg_postinst() {
157 + elog "Custom configuration belongs in /var/lib/i2p/.i2p/ to avoid being overwritten."
158 + elog "I2P can be configured through the web interface at http://localhost:7657/index.jsp"
159 +
160 + ewarn 'Currently, the i2p team does not enforce to use ECDSA keys. But it is more and'
161 + ewarn 'more pushed. To help the network, you are recommended to have either:'
162 + ewarn ' dev-java/icedtea[-sunec,nss]'
163 + ewarn ' dev-java/icedtea-bin[nss]'
164 + ewarn ' dev-java/icedtea[-sunec] and bouncycastle (bcprov)'
165 + ewarn ' dev-java/icedtea-bin and bouncycastle (bcprov)'
166 + ewarn ' dev-java/oracle-jre-bin'
167 + ewarn ' dev-java/oracle-jdk-bin'
168 + ewarn 'Alternatively you can just use Ed25519 keys - which is a stronger algorithm anyways.'
169 + ewarn
170 + ewarn "This is purely a run-time issue. You're free to build i2p with any JDK, as long as"
171 + ewarn 'the JVM you run it with is one of the above listed and from the same or a newer generation'
172 + ewarn 'as the one you built with.'
173 +
174 +}