Gentoo Archives: gentoo-commits

From: "Miroslav Sulc (fordfrog)" <fordfrog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-servers/tomcat: ChangeLog tomcat-8.0.20.ebuild
Date: Tue, 24 Feb 2015 21:06:27
Message-Id: 20150224210623.30F9E1279B@oystercatcher.gentoo.org
1 fordfrog 15/02/24 21:06:23
2
3 Modified: ChangeLog
4 Added: tomcat-8.0.20.ebuild
5 Log:
6 www-servers/tomcat: version bump
7
8 (Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key CFE47E2F)
9
10 Revision Changes Path
11 1.343 www-servers/tomcat/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/tomcat/ChangeLog?rev=1.343&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/tomcat/ChangeLog?rev=1.343&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/tomcat/ChangeLog?r1=1.342&r2=1.343
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v
20 retrieving revision 1.342
21 retrieving revision 1.343
22 diff -u -r1.342 -r1.343
23 --- ChangeLog 20 Feb 2015 11:56:20 -0000 1.342
24 +++ ChangeLog 24 Feb 2015 21:06:23 -0000 1.343
25 @@ -1,6 +1,12 @@
26 # ChangeLog for www-servers/tomcat
27 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.342 2015/02/20 11:56:20 fordfrog Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.343 2015/02/24 21:06:23 fordfrog Exp $
30 +
31 +*tomcat-8.0.20 (24 Feb 2015)
32 +
33 + 24 Feb 2015; Miroslav Šulc <fordfrog@g.o> +tomcat-8.0.20.ebuild,
34 + +files/tomcat-8.0.20-build.xml.patch:
35 + version bump
36
37 20 Feb 2015; Miroslav Šulc <fordfrog@g.o> tomcat-8.0.18.ebuild:
38 changed to eapi 5, simplified find command
39
40
41
42 1.1 www-servers/tomcat/tomcat-8.0.20.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/tomcat/tomcat-8.0.20.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/tomcat/tomcat-8.0.20.ebuild?rev=1.1&content-type=text/plain
46
47 Index: tomcat-8.0.20.ebuild
48 ===================================================================
49 # Copyright 1999-2015 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-8.0.20.ebuild,v 1.1 2015/02/24 21:06:23 fordfrog Exp $
52
53 EAPI="5"
54
55 JAVA_PKG_IUSE="doc source test"
56
57 inherit eutils java-pkg-2 java-ant-2 prefix user
58
59 MY_P="apache-${P}-src"
60
61 DESCRIPTION="Tomcat Servlet-3.1/JSP-2.3 Container"
62 HOMEPAGE="http://tomcat.apache.org/"
63 SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz"
64
65 LICENSE="Apache-2.0"
66 SLOT="8"
67 KEYWORDS="~amd64 ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris"
68 IUSE="extra-webapps"
69
70 RESTRICT="test" # can we run them on a production system?
71
72 ECJ_SLOT="4.4"
73 SAPI_SLOT="3.1"
74
75 COMMON_DEP="
76 dev-java/eclipse-ecj:${ECJ_SLOT}
77 ~dev-java/tomcat-servlet-api-${PV}
78 extra-webapps? ( dev-java/jakarta-jstl:0 )"
79 RDEPEND="${COMMON_DEP}
80 !<dev-java/tomcat-native-1.1.24
81 >=virtual/jre-1.7"
82 DEPEND="${COMMON_DEP}
83 >=virtual/jdk-1.7
84 >=dev-java/ant-core-1.8.1:0
85 test? (
86 dev-java/ant-junit:0
87 dev-java/junit:4
88 )"
89
90 S=${WORKDIR}/${MY_P}
91
92 pkg_setup() {
93 java-pkg-2_pkg_setup
94 enewgroup tomcat 265
95 enewuser tomcat 265 -1 /dev/null tomcat
96 }
97
98 java_prepare() {
99 find -name '*.jar' -type f -delete -print || die
100
101 epatch "${FILESDIR}/${P}-build.xml.patch"
102
103 # For use of catalina.sh in netbeans
104 sed -i -e "/^# ----- Execute The Requested Command/ a\
105 CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \
106 bin/catalina.sh || die
107 }
108
109 JAVA_ANT_REWRITE_CLASSPATH="true"
110
111 EANT_BUILD_TARGET="deploy"
112 EANT_GENTOO_CLASSPATH="tomcat-servlet-api-${SAPI_SLOT},eclipse-ecj-${ECJ_SLOT}"
113 EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes"
114 EANT_NEEDS_TOOLS="true"
115 EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false"
116
117 # revision of the instance-manager script
118 IM_REV="-r1"
119
120 src_compile() {
121 EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)"
122 java-pkg-2_src_compile
123 }
124
125 EANT_TEST_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH},junit-4"
126
127 src_test() {
128 java-pkg-2_src_test
129 }
130
131 src_install() {
132 local dest="/usr/share/${PN}-${SLOT}"
133
134 java-pkg_jarinto "${dest}"/bin
135 java-pkg_dojar output/build/bin/*.jar
136 exeinto "${dest}"/bin
137 doexe output/build/bin/*.sh
138
139 java-pkg_jarinto "${dest}"/lib
140 java-pkg_dojar output/build/lib/*.jar
141
142 # so we don't have to call java-config with --with-dependencies, which might
143 # bring in more jars then actually desired.
144 java-pkg_addcp "$(java-pkg_getjars eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT})"
145
146 dodoc RELEASE-NOTES RUNNING.txt
147 use doc && java-pkg_dojavadoc output/dist/webapps/docs/api
148 use source && java-pkg_dosrc java/*
149
150 ### Webapps ###
151
152 insinto "${dest}"/webapps
153 doins -r output/build/webapps/{host-manager,manager,ROOT}
154 use extra-webapps && doins -r output/build/webapps/{docs,examples}
155
156 ### Config ###
157
158 # replace the default pw with a random one, see #92281
159 local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15)
160 sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die
161
162 insinto "${dest}"
163 doins -r output/build/conf
164
165 ### rc ###
166
167 cp "${FILESDIR}"/tomcat{.conf,.init,-instance-manager${IM_REV}.bash} "${T}" || die
168 eprefixify "${T}"/tomcat{.conf,.init,-instance-manager${IM_REV}.bash}
169 sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,.init,-instance-manager${IM_REV}.bash} || die
170
171 insinto "${dest}"/gentoo
172 doins "${T}"/tomcat.conf
173 exeinto "${dest}"/gentoo
174 doexe "${T}"/tomcat.init
175 newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash
176 }
177
178 pkg_postinst() {
179 elog "New ebuilds of Tomcat support running multiple instances. If you used prior version"
180 elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat."
181 elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat"
182
183 elog "To manage Tomcat instances, run:"
184 elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help"
185
186 ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar"
187 ewarn "from upstream binary if you need it. Gentoo Bug # 144276"
188
189 # einfo "Please read http://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information."
190 }