]>
Commit | Line | Data |
---|---|---|
e22e9de1 | 1 | # |
d58ce9ff ER |
2 | # Conditional build: |
3 | %bcond_with binary # build from binary source | |
4 | %bcond_without javadoc # skip building javadocs | |
5 | # | |
6 | Summary: Apache Servlet/JSP Engine, RI for Servlet 2.4/JSP 2.0 API | |
e22e9de1 | 7 | Summary(pl.UTF-8): Silnik Servlet/JSP Apache będący wzorcową implementacją API Servlet 2.4/JSP 2.0 |
3cd7b38d | 8 | Name: apache-tomcat |
d58ce9ff ER |
9 | Version: 5.5.23 |
10 | Release: 0.1 | |
27743710 | 11 | License: Apache |
4470e4fe | 12 | Group: Development/Languages/Java |
d58ce9ff | 13 | #Source0: http://www.apache.org/dist/tomcat/tomcat-5/v5.0.30/src/%{name}-%{version}-src.tar.gz |
3cd7b38d | 14 | Source0: http://www.apache.org/dist/tomcat/tomcat-5/v%{version}/src/%{name}-%{version}-src.tar.gz |
d58ce9ff ER |
15 | # Source0-md5: 362d1d8b15dc09882440dcab8c592dd7 |
16 | #Source0: http://apache.zone-h.org/ | |
05be5db6 | 17 | Source1: jakarta-tomcat.init |
3cd7b38d ER |
18 | Patch0: %{name}-skip-servletapi.patch |
19 | Patch1: %{name}-nsis.patch | |
20 | Patch2: %{name}-native.patch | |
21 | Patch3: %{name}-skip-jdt.patch | |
05be5db6 | 22 | Patch4: %{name}-no-connectors.patch |
797e0d23 | 23 | URL: http://tomcat.apache.org/ |
55df0736 | 24 | # required: |
51bf99d9 | 25 | BuildRequires: ant >= 1.5.3 |
4c334025 | 26 | BuildRequires: jaas |
3f4d8696 | 27 | BuildRequires: jakarta-commons-beanutils |
43310914 | 28 | BuildRequires: jakarta-commons-collections |
8bfa2080 ER |
29 | BuildRequires: jakarta-commons-collections-source |
30 | BuildRequires: jakarta-commons-daemon | |
31 | BuildRequires: jakarta-commons-dbcp | |
32 | BuildRequires: jakarta-commons-dbcp-source | |
3f4d8696 | 33 | BuildRequires: jakarta-commons-digester |
66800769 | 34 | BuildRequires: jakarta-commons-fileupload |
8bfa2080 | 35 | BuildRequires: jakarta-commons-httpclient |
43310914 | 36 | BuildRequires: jakarta-commons-logging |
8bfa2080 ER |
37 | BuildRequires: jakarta-commons-modeler >= 2.0 |
38 | BuildRequires: jakarta-commons-pool | |
39 | BuildRequires: jakarta-commons-pool-source | |
98862cba | 40 | BuildRequires: jakarta-regexp |
8bfa2080 | 41 | BuildRequires: jakarta-servletapi5 |
0c0e0d39 | 42 | BuildRequires: jakarta-struts >= 1.0.2 |
43 | BuildRequires: jaxp_parser_impl | |
8bfa2080 | 44 | BuildRequires: jdk >= 1.5 |
4c334025 | 45 | BuildRequires: jpackage-utils |
8665efb1 | 46 | BuildRequires: mx4j >= 1.1.1 |
47 | BuildRequires: puretls | |
4c334025 | 48 | BuildRequires: rpmbuild(macros) >= 1.300 |
d58ce9ff | 49 | BuildRequires: xerces-j |
8bfa2080 | 50 | %if %{with javadoc} |
05be5db6 | 51 | BuildRequires: jakarta-commons-el |
8bfa2080 | 52 | %endif |
55df0736 | 53 | # optional: |
0c0e0d39 | 54 | BuildRequires: jaf >= 1.0.1 |
3f919c68 | 55 | BuildRequires: jakarta-commons-dbcp |
3f919c68 | 56 | BuildRequires: jakarta-commons-pool |
0c0e0d39 | 57 | BuildRequires: javamail >= 1.2 |
55df0736 | 58 | BuildRequires: jdbc-stdext >= 2.0 |
55df0736 | 59 | BuildRequires: jndi >= 1.2.1 |
55df0736 JB |
60 | BuildRequires: jsse >= 1.0.2 |
61 | BuildRequires: jta >= 1.0.1 | |
55df0736 | 62 | BuildRequires: junit >= 3.7 |
d58ce9ff | 63 | BuildRequires: rpmbuild(macros) >= 1.268 |
0c0e0d39 | 64 | BuildRequires: tyrex >= 1.0 |
8665efb1 | 65 | BuildRequires: xml-commons |
43310914 ER |
66 | Requires(post,postun): /sbin/ldconfig |
67 | Requires(post,preun): /sbin/chkconfig | |
68 | Requires(postun): /usr/sbin/groupdel | |
69 | Requires(postun): /usr/sbin/userdel | |
70 | Requires(pre): /bin/id | |
71 | Requires(pre): /usr/bin/getgid | |
72 | Requires(pre): /usr/sbin/groupadd | |
73 | Requires(pre): /usr/sbin/useradd | |
74 | Requires: jaas | |
75 | Requires: jaf >= 1.0.1 | |
3f4d8696 | 76 | Requires: jakarta-commons-beanutils |
43310914 | 77 | Requires: jakarta-commons-collections |
3f4d8696 | 78 | Requires: jakarta-commons-digester |
66800769 | 79 | Requires: jakarta-commons-fileupload |
43310914 | 80 | Requires: jakarta-commons-logging |
55df0736 | 81 | Requires: jakarta-regexp |
43310914 ER |
82 | Requires: jakarta-servletapi >= 4 |
83 | Requires: javamail >= 1.2 | |
84 | Requires: jaxp_parser_impl | |
55df0736 | 85 | Requires: jdbc-stdext >= 2.0 |
55df0736 | 86 | Requires: jndi >= 1.2.1 |
43310914 | 87 | Requires: jre >= 1.2 |
55df0736 JB |
88 | Requires: jsse >= 1.0.2 |
89 | Requires: jta >= 1.0.1 | |
43310914 | 90 | Requires: mx4j >= 1.1.1 |
d58ce9ff | 91 | Requires: rc-scripts |
a0a11518 | 92 | Requires: tyrex >= 1.0 |
8665efb1 | 93 | Requires: xml-commons |
0c0e0d39 | 94 | Provides: group(http) |
95 | Provides: user(http) | |
3cd7b38d | 96 | Obsoletes: jakarta-tomcat |
4470e4fe | 97 | BuildArch: noarch |
98 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
99 | ||
4470e4fe | 100 | %define _tomcatdir %{_libdir}/tomcat |
101 | %define _logdir %{_var}/log | |
55df0736 | 102 | %define _vardir %{_var}/lib/tomcat |
4470e4fe | 103 | |
104 | %description | |
d58ce9ff ER |
105 | Tomcat is the servlet container that is used in the official Reference |
106 | Implementation for the Java Servlet and JavaServer Pages technologies. | |
107 | The Java Servlet and JavaServer Pages specifications are developed by | |
108 | Sun under the Java Community Process. | |
4470e4fe | 109 | |
d58ce9ff ER |
110 | Tomcat is developed in an open and participatory environment and |
111 | released under the Apache Software License. Tomcat is intended to be a | |
112 | collaboration of the best-of-breed developers from around the world. | |
113 | We invite you to participate in this open development project. | |
114 | ||
e22e9de1 JB |
115 | %description -l pl.UTF-8 |
116 | Tomcat to kontener serwletowy używany przez oficjalną implementację | |
117 | wzorcową technologii Java Servlet i JavaServer Pages. Specyfikacje | |
3cd7b38d ER |
118 | Java Servlet i JavaServer Pages są rozwijane przez Suna zgodnie z Java |
119 | Community Process. | |
4470e4fe | 120 | |
121 | %package doc | |
3cd7b38d | 122 | Summary: The Apache Tomcat Servlet/JSP Container documentation |
e22e9de1 | 123 | Summary(pl.UTF-8): Dokumentacja do Tomcata - kontekera Servlet/JSP |
4470e4fe | 124 | Group: Development/Languages/Java |
3cd7b38d | 125 | Obsoletes: jakarta-tomcat-doc |
4470e4fe | 126 | |
127 | %description doc | |
2b38d386 JB |
128 | The Tomcat Servlet/JSP Container documentation. |
129 | ||
e22e9de1 JB |
130 | %description doc -l pl.UTF-8 |
131 | Dokumentacja do Tomcata - kontekera Servlet/JSP. | |
4470e4fe | 132 | |
133 | %prep | |
3cd7b38d | 134 | %setup -q -n %{name}-%{version}-src |
8bfa2080 ER |
135 | %patch0 -p1 |
136 | %patch1 -p1 | |
137 | %patch2 -p1 | |
138 | %patch3 -p1 | |
05be5db6 | 139 | %patch4 -p1 |
8bfa2080 | 140 | |
05be5db6 | 141 | # servletapi built from jakarta-servletapi5.spec |
8bfa2080 | 142 | rm -rf servletapi |
05be5db6 ER |
143 | # connectors (apache2 for now only) are built from apache-mod_jk.spec |
144 | rm -rf connectors | |
d58ce9ff ER |
145 | |
146 | # Remove pre-built jars | |
147 | find -name '*.jar' | xargs rm -fv | |
4470e4fe | 148 | |
149 | %build | |
d58ce9ff | 150 | TOPDIR=$(pwd) |
8bfa2080 ER |
151 | #xerces.jar=$(build-classpath xerces) |
152 | #jasper-compiler-jdt.jar=$(build-classpath jdtcore) | |
d58ce9ff | 153 | |
8bfa2080 ER |
154 | mkdir -p tomcat-deps |
155 | > tomcat-deps/tomcat-dbcp.jar | |
d58ce9ff | 156 | |
8bfa2080 ER |
157 | %if 0 |
158 | # build jasper javadocs | |
159 | cd jasper | |
160 | CLASSPATH=$(build-classpath xml-commons-apis) | |
d58ce9ff ER |
161 | cat > build.properties <<EOF |
162 | ant.jar=$(build-classpath ant) | |
8bfa2080 ER |
163 | servlet-api.jar=$(build-classpath servlet-api) |
164 | jsp-api.jar=$(build-classpath jsp-api) | |
d58ce9ff | 165 | tools.jar=%{java_home}/lib/tools.jar |
d58ce9ff ER |
166 | xercesImpl.jar=$(build-classpath jaxp_parser_impl) |
167 | xmlParserAPIs.jar=$(build-classpath xml-commons-apis) | |
d58ce9ff ER |
168 | commons-collections.jar=$(build-classpath commons-collections) |
169 | commons-logging.jar=$(build-classpath commons-logging) | |
170 | commons-daemon.jar=$(build-classpath commons-daemon) | |
171 | junit.jar=$(build-classpath junit) | |
8bfa2080 | 172 | commons-el.jar=$(build-classpath commons-el) |
d58ce9ff | 173 | EOF |
8bfa2080 ER |
174 | # building jasper needs eclipse classes |
175 | #%ant dist | |
176 | ||
177 | %if %{with javadoc} | |
178 | %ant javadoc \ | |
179 | -Dcompile.source=1.4 \ | |
180 | -Dbuild.compiler=modern \ | |
181 | ||
182 | %endif | |
183 | cd - | |
184 | %endif | |
d58ce9ff ER |
185 | |
186 | # build tomcat 5.5 | |
8bfa2080 ER |
187 | #cd build |
188 | cat > build.properties <<EOF | |
d58ce9ff | 189 | commons-beanutils.jar=$(build-classpath commons-beanutils) |
8bfa2080 ER |
190 | commons-launcher.jar=$(build-classpath commons-launcher) |
191 | commons-daemon.jar=$(build-classpath commons-daemon) | |
d58ce9ff ER |
192 | commons-digester.jar=$(build-classpath commons-digester) |
193 | commons-el.jar=$(build-classpath commons-el) | |
d58ce9ff | 194 | commons-logging-api.jar=$(build-classpath commons-logging-api) |
8bfa2080 | 195 | commons-logging.jar=$(build-classpath commons-logging) |
d58ce9ff | 196 | commons-modeler.jar=$(build-classpath commons-modeler) |
8bfa2080 ER |
197 | xercesImpl.jar=$(build-classpath jaxp_parser_impl) |
198 | xml-apis.jar=$(build-classpath xml-commons-apis) | |
199 | %if 0 | |
200 | jdt.jar=${jdt.lib}/org.eclipse.jdt.core_3.1.2.jar | |
201 | log4j.jar=${log4j.lib}/dist/lib/log4j-1.2.12.jar | |
202 | %endif | |
203 | commons-httpclient.jar=$(build-classpath commons-httpclient) | |
204 | commons-collections.jar=$(build-classpath commons-collections) | |
205 | commons-fileupload.jar=$(build-classpath commons-fileupload) | |
206 | ||
207 | ||
208 | %if 0 | |
209 | jmx.jar=${jmx.lib}/mx4j.jar | |
210 | %endif | |
d58ce9ff | 211 | jmx.jar=$(build-classpath jre/jmx) |
8bfa2080 ER |
212 | %if 0 |
213 | jmx-tools.jar=${jmx.lib}/mx4j-tools.jar | |
214 | %endif | |
d58ce9ff | 215 | jmx-tools.jar=$(build-classpath jre/jmx) |
8bfa2080 ER |
216 | %if 0 |
217 | jmx-remote.jar=${jmx.lib}/mx4j-remote.jar | |
218 | %endif | |
d58ce9ff | 219 | junit.jar=$(build-classpath junit) |
8bfa2080 ER |
220 | %if 0 |
221 | rhino.jar=${rhino.home}/js.jar | |
222 | %endif | |
223 | struts.jar=$(build-classpath struts) | |
224 | activation.jar=$(build-classpath jaf) | |
225 | jcert.jar=$(build-classpath java/jcert) | |
226 | jnet.jar=$(build-classpath java/jnet) | |
227 | jsse.jar=$(build-classpath java/jsse) | |
228 | jta.jar=$(build-classpath jta) | |
229 | mail.jar=$(build-classpath javamail/mailapi) | |
230 | puretls.jar=$(build-classpath puretls) | |
231 | ||
232 | servlet-api.jar=$(build-classpath servlet-api) | |
233 | # how the fck those bools work | |
234 | # build.xml:103: servletapi/jsr154/src not found. | |
235 | servletapi.build.notrequired=true | |
236 | ||
237 | jsp-api.jar=$(build-classpath jsp-api) | |
238 | jspapi.build.notrequired=true | |
239 | ||
240 | log4j.jar=$(build-classpath logging-log4j) | |
241 | #log4j.loc=%{_javadir} | |
242 | ||
243 | # source is needed because source is copied modified and recompiled as tomcat jar | |
244 | # see <target name="-build-tomcat-dbcp"> in build/build.xml | |
245 | tomcat-dbcp.home= | |
246 | commons-collections.home=%{_prefix}/src/jakarta-commons-collections-3.1 | |
247 | commons-pool.home=%{_prefix}/src/jakarta-commons-pool-1.3 | |
248 | commons-dbcp.home=%{_prefix}/src/jakarta-commons-dbcp-1.2.1 | |
249 | tomcat-dbcp.home=$TOPDIR/tomcat-deps | |
250 | # err, it compiles three above and then appends to the jar, so the file should exist | |
251 | tomcat-dbcp.jar=$TOPDIR/tomcat-deps/tomcat-dbcp.jar | |
252 | ||
253 | %if 0 | |
254 | ant.jar=%{_javadir}/ant.jar | |
255 | ant-launcher.jar=%{_javadir}/ant-launcher.jar | |
256 | jtc.home=$TOPDIR/jakarta-tomcat-connectors/ | |
257 | jasper.home=$TOPDIR/jakarta-tomcat-jasper/jasper2 | |
258 | commons-dbcp.jar=$(build-classpath commons-dbcp) | |
259 | commons-pool.jar=$(build-classpath commons-pool) | |
260 | jmxri.jar=$(build-classpath jre/jmx) | |
d58ce9ff | 261 | regexp.jar=$(build-classpath regexp) |
d58ce9ff ER |
262 | jsp-api.jar=$TOPDIR/jakarta-servletapi-5/jsr152/dist/lib/jsp-api.jar |
263 | servlet.doc=$TOPDIR/jakarta-servletapi-5/jsr154/dist/docs/api | |
d58ce9ff | 264 | struts.lib=%{_datadir}/struts |
8bfa2080 | 265 | servletapi.build.notrequired=true |
d58ce9ff ER |
266 | tyrex.jar=$(build-classpath tyrex) |
267 | jaas.jar=$(build-classpath jre/jaas) | |
268 | jndi.jar=$(build-classpath jre/jndi) | |
269 | jdbc20ext.jar=$(build-classpath jdbc-stdext) | |
d58ce9ff ER |
270 | jspapi.build.notrequired=true |
271 | taglibs-core.jar=$(build-classpath taglibs-core) | |
272 | taglibs-standard.jar=$(build-classpath taglibs-standard) | |
8bfa2080 ER |
273 | %endif |
274 | ||
d58ce9ff ER |
275 | EOF |
276 | ||
05be5db6 ER |
277 | %ant \ |
278 | -Dcompile.source=1.4 | |
d58ce9ff ER |
279 | |
280 | exit 1 | |
281 | ||
d58ce9ff | 282 | # build the connectors |
8bfa2080 ER |
283 | cd connectors |
284 | ||
285 | %if 0 | |
d58ce9ff ER |
286 | |
287 | # this is just plain and simply evil but something changed in a major way between 5.0.16 and 5.0.18 | |
288 | oldclasspath=$CLASSPATH | |
289 | export CLASSPATH=$TOPDIR/jakarta-servletapi-5/jsr154/dist/lib/servlet-api.jar:\ | |
290 | $TOPDIR/jakarta-tomcat-5/build/server/lib/catalina.jar | |
8bfa2080 ER |
291 | %endif |
292 | ||
293 | %if 0 | |
294 | cat > build.properties <<EOF | |
d58ce9ff | 295 | |
d58ce9ff ER |
296 | activation.jar=$(build-classpath jaf) |
297 | ant.jar=%{_javadir}/ant.jar | |
298 | junit.jar=$(build-classpath junit) | |
299 | commons-beanutils.jar=$(build-classpath commons-beanutils) | |
300 | commons-collections.jar=$(build-classpath commons-collections) | |
301 | commons-digester.jar=$(build-classpath commons-digester) | |
302 | commons-fileupload.jar=$(build-classpath commons-fileupload) | |
303 | commons-logging.jar=$(build-classpath commons-logging) | |
304 | commons-logging-api.jar=$(build-classpath commons-logging-api) | |
305 | commons-modeler.jar=$(build-classpath commons-modeler) | |
306 | commons-pool.jar=$(build-classpath commons-pool) | |
307 | regexp.jar=$(build-classpath regexp) | |
308 | jmx.jar=$(build-classpath mx4j/mx4j) | |
309 | puretls=$(build-classpath puretls) | |
310 | activation.jar=$(build-classpath jaf) | |
311 | mail.jar=$(build-classpath javamail/mailapi) | |
312 | jta.jar=$(build-classpath jta) | |
313 | tyrex.jar=$(build-classpath tyrex) | |
314 | jaas.jar=$(build-classpath jaas) | |
315 | jndi.jar=$(build-classpath jndi) | |
316 | jdbc20ext.jar=$(build-classpath java/jdbc-stdext) | |
317 | puretls.jar=$(build-classpath puretls) | |
318 | jcert.jar=$(build-classpath jsse/jcert) | |
319 | jnet.jar=$(build-classpath jsse/jnet) | |
320 | jsse.jar=$(build-classpath jsse/jsse) | |
8bfa2080 ER |
321 | |
322 | %endif | |
323 | ||
324 | %if 0 | |
325 | commons-beanutils.jar=${commons-beanutils.lib}/commons-beanutils.jar | |
326 | commons-collections.jar=${commons-collections.lib}/commons-collections.jar | |
327 | commons-digester.jar=${commons-digester.lib}/commons-digester.jar | |
328 | commons-fileupload.jar=${commons-fileupload.lib}/commons-fileupload-1.0-beta-1.jar | |
329 | commons-logging-api.jar=${commons-logging.lib}/commons-logging-api.jar | |
330 | commons-logging.jar=${commons-logging.lib}/commons-logging.jar | |
331 | jndi.jar=${jndi.lib}/jndi.jar | |
332 | ldap.jar=${jndi.lib}/ldap.jar | |
333 | jaas.jar=${jndi.lib}/jaas.jar | |
334 | regexp.jar=${regexp.lib}/jakarta-regexp-1.4.jar | |
335 | servlet.jar=${servlet.lib}/servlet.jar | |
336 | #xerces.jar=${xerces.lib}/xerces.jar | |
337 | xercesImpl.jar=${xerces.lib}/xercesImpl.jar | |
338 | xml-apis.jar=${xerces.lib}/xml-apis.jar | |
339 | activation.jar=${activation.lib}/activation.jar | |
340 | commons-daemon.jar=${commons-daemon.lib}/commons-daemon.jar | |
341 | commons-dbcp.jar=${commons-dbcp.lib}/commons-dbcp.jar | |
342 | commons-modeler.jar=${commons-modeler.lib}/commons-modeler.jar | |
343 | commons-pool.jar=${commons-pool.lib}/commons-pool.jar | |
344 | jdbc20ext.jar=${jdbc20ext.lib}/jdbc2_0-stdext.jar | |
345 | jmx.jar=${jmx.lib}/mx4j-jmx.jar | |
346 | jcert.jar=${jsse.lib}/jcert.jar | |
347 | jnet.jar=${jsse.lib}/jnet.jar | |
348 | jsse.jar=${jsse.lib}/jsse.jar | |
349 | jta.jar=${jta.lib}/jta.jar | |
350 | junit.jar=${junit.lib}/junit.jar | |
351 | mail.jar=${mail.lib}/mail.jar | |
352 | puretls.jar=${puretls.lib}/puretls.jar | |
353 | struts.jar=${struts.lib}/struts.jar | |
354 | tyrex.jar=${tyrex.lib}/tyrex-1.0.jar | |
355 | tomcat5.jar=${tomcat5.home}/server/lib/catalina.jar | |
356 | servlet-api.jar=${tomcat5.home}/common/lib/servlet-api.jar | |
357 | tomcat41.jar=${tomcat41.home}/server/lib/catalina.jar | |
358 | servlet-api.jar=${tomcat41.home}/common/lib/servlet.jar | |
359 | tomcat33.jar=${tomcat33.home}/lib/common/tomcat_core.jar | |
360 | %endif | |
361 | ||
362 | ||
363 | %if 0 | |
364 | EOF | |
365 | %ant build \ | |
366 | -Dbuild.compiler=modern \ | |
367 | -Djava.home=%{java_home} | |
368 | %endif | |
369 | %if 0 | |
d58ce9ff | 370 | export CLASSPATH=$oldclasspath |
8665efb1 | 371 | |
d58ce9ff ER |
372 | # build the webapps and make the tree ready to install |
373 | cd ../jakarta-tomcat-5 | |
374 | %ant -Dbuild.compiler=modern -Djava.home=%{java_home} dist | |
375 | %endif | |
4470e4fe | 376 | |
377 | %install | |
378 | rm -rf $RPM_BUILD_ROOT | |
379 | ||
8665efb1 | 380 | DEST=$RPM_BUILD_ROOT%{_tomcatdir} |
381 | ||
382 | install -d $DEST/bin \ | |
383 | $DEST/common/{lib,classes,endorsed} \ | |
384 | $DEST/server/{lib,classes} \ | |
385 | $DEST/webapps \ | |
98862cba | 386 | $RPM_BUILD_ROOT%{_sysconfdir}/tomcat \ |
55df0736 JB |
387 | $RPM_BUILD_ROOT%{_logdir}/tomcat \ |
388 | $RPM_BUILD_ROOT%{_vardir}/work \ | |
389 | $RPM_BUILD_ROOT/etc/rc.d/init.d | |
98862cba | 390 | |
8665efb1 | 391 | install build/bin/*.sh $DEST/bin |
392 | install build/bin/bootstrap*.jar $DEST/bin | |
393 | install build/bin/tomcat*.jar $DEST/bin | |
394 | install build/common/lib/naming-*.jar $DEST/common/lib | |
395 | install build/common/lib/jasper-*.jar $DEST/common/lib | |
396 | install build/conf/* $RPM_BUILD_ROOT%{_sysconfdir}/tomcat | |
397 | install build/server/lib/catalina*.jar $DEST/server/lib | |
398 | install build/server/lib/servlets*.jar $DEST/server/lib | |
399 | install build/server/lib/tomcat*.jar $DEST/server/lib | |
400 | install build/server/lib/servlets-cgi.renametojar $DEST/server/lib/servlets-cgi.jar | |
401 | install build/server/lib/servlets-ssi.renametojar $DEST/server/lib/servlets-ssi.jar | |
402 | cp -rf build/server/webapps $DEST/server | |
403 | cp -rf build/webapps $DEST | |
404 | cp -rf build/shared $DEST | |
405 | cp -rf build/temp $DEST | |
406 | ||
407 | ln -sf %{_logdir}/tomcat $DEST/logs | |
408 | ln -sf %{_vardir}/work $DEST/work | |
409 | ln -sf %{_sysconfdir}/tomcat $DEST/conf | |
4470e4fe | 410 | |
4c3d1713 | 411 | # symlinks instead of copies |
d58ce9ff ER |
412 | ln -sf %{_javadir}/commons-daemon.jar $DEST/bin |
413 | ||
414 | ln -sf %{_javadir}/activation.jar $DEST/common/lib | |
415 | ln -sf %{_javadir}/ant.jar $DEST/common/lib | |
416 | ln -sf %{_javadir}/commons-collections.jar $DEST/common/lib | |
417 | ln -sf %{_javadir}/commons-dbcp.jar $DEST/common/lib | |
418 | ln -sf %{_javadir}/commons-logging-api.jar $DEST/common/lib | |
419 | ln -sf %{_javadir}/commons-pool.jar $DEST/common/lib | |
420 | ln -sf %{_javadir}/servlet.jar $DEST/common/lib | |
421 | ln -sf %{_javadir}/servlet.jar $DEST/common/lib/servletapi4.jar | |
422 | ln -sf %{_javadir}/jdbc-stdext.jar $DEST/common/lib/jdbc2_0-stdext.jar | |
423 | ln -sf %{_javadir}/jdbc-stdext.jar $DEST/common/lib/jdbc-stdext-2.0.jar | |
424 | ln -sf %{_javadir}/jmxri.jar $DEST/common/lib | |
425 | ln -sf %{_javadir}/jndi.jar $DEST/common/lib | |
426 | ln -sf %{_javadir}/jta.jar $DEST/common/lib | |
427 | ln -sf %{_javadir}/mail.jar $DEST/common/lib | |
428 | ln -sf %{_javadir}/jsse.jar $DEST/common/lib | |
429 | ln -sf %{_javadir}/tyrex.jar $DEST/common/lib | |
430 | ln -sf %{_javadir}/junit.jar $DEST/common/lib | |
431 | ||
432 | ln -sf %{_javadir}/mailapi.jar $DEST/common/lib | |
433 | ln -sf %{_javadir}/pop3.jar $DEST/common/lib | |
434 | ln -sf %{_javadir}/pop3.jar $DEST/common/lib/pop.jar | |
435 | ln -sf %{_javadir}/smtp.jar $DEST/common/lib | |
436 | ln -sf %{_javadir}/imap.jar $DEST/common/lib | |
437 | ||
438 | ln -sf %{_javadir}/commons-beanutils.jar $DEST/server/lib | |
439 | ln -sf %{_javadir}/commons-digester.jar $DEST/server/lib | |
440 | ln -sf %{_javadir}/commons-fileupload.jar $DEST/server/lib | |
441 | ln -sf %{_javadir}/commons-logging.jar $DEST/server/lib | |
442 | ln -sf %{_javadir}/commons-modeler.jar $DEST/server/lib | |
443 | ln -sf %{_javadir}/jaas.jar $DEST/server/lib/jaas.jar | |
444 | ln -sf %{_javadir}/mx4j-jmx.jar $DEST/server/lib | |
445 | ln -sf %{_javadir}/regexp.jar $DEST/server/lib | |
446 | ln -sf %{_javadir}/regexp.jar $DEST/server/lib/jakarta-regexp-1.2.jar | |
447 | ln -sf %{_javadir}/regexp.jar $DEST/server/lib/regexp-1.2.jar | |
448 | ||
449 | ln -sf %{_javadir}/jaxp_parser_impl.jar $DEST/common/endorsed | |
450 | ln -sf %{_javadir}/xml-commons-apis.jar $DEST/common/endorsed | |
451 | ||
452 | ln -sf %{_javadir}/struts.jar $DEST/server/webapps/admin/WEB-INF/lib | |
453 | ||
454 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/tomcat | |
55df0736 | 455 | |
4470e4fe | 456 | %clean |
457 | rm -rf $RPM_BUILD_ROOT | |
458 | ||
50d4797f | 459 | %pre |
aa5bd00e ER |
460 | %groupadd -g 51 -r -f http |
461 | %useradd -u 51 -r -d /home/services/httpd -s /bin/false -c "HTTP User" -g http http | |
50d4797f | 462 | |
463 | %post | |
464 | /sbin/chkconfig --add tomcat | |
4c334025 | 465 | %service tomcat restart |
50d4797f | 466 | |
467 | %preun | |
468 | if [ "$1" = "0" ]; then | |
4c334025 | 469 | %service tomcat stop |
50d4797f | 470 | /sbin/chkconfig --del tomcat |
471 | fi | |
472 | ||
473 | %postun | |
474 | if [ "$1" = "0" ]; then | |
0c0e0d39 | 475 | %userremove http |
476 | %groupremove http | |
50d4797f | 477 | fi |
478 | ||
4470e4fe | 479 | %files |
480 | %defattr(644,root,root,755) | |
27743710 | 481 | %doc *.txt LICENSE |
55df0736 JB |
482 | %dir %{_tomcatdir} |
483 | %dir %{_tomcatdir}/bin | |
98862cba | 484 | %attr(755,root,root) %{_tomcatdir}/bin/*.sh |
98862cba | 485 | %{_tomcatdir}/bin/*.jar |
55df0736 JB |
486 | %dir %{_tomcatdir}/common |
487 | %dir %{_tomcatdir}/common/classes | |
50d4797f | 488 | %dir %{_tomcatdir}/common/endorsed |
8665efb1 | 489 | %{_tomcatdir}/common/endorsed/*.jar |
4470e4fe | 490 | %{_tomcatdir}/common/lib |
491 | %{_tomcatdir}/conf | |
4470e4fe | 492 | %{_tomcatdir}/logs |
55df0736 JB |
493 | %dir %{_tomcatdir}/server |
494 | %dir %{_tomcatdir}/server/classes | |
4470e4fe | 495 | %{_tomcatdir}/server/lib |
50d4797f | 496 | %{_tomcatdir}/server/webapps |
55df0736 JB |
497 | %{_tomcatdir}/webapps |
498 | %{_tomcatdir}/work | |
50d4797f | 499 | %{_tomcatdir}/shared |
500 | %{_tomcatdir}/temp | |
4c3d1713 JB |
501 | # tomcat wants to regenerate tomcat-users.xml |
502 | %attr(775,root,http) %dir %{_sysconfdir}/tomcat | |
43310914 | 503 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tomcat/* |
55df0736 JB |
504 | %attr(754,root,root) /etc/rc.d/init.d/tomcat |
505 | %dir %{_vardir} | |
506 | %attr(1730,root,http) %dir %{_vardir}/work | |
507 | %attr(1730,root,http) %dir %{_logdir}/tomcat | |
4470e4fe | 508 | |
509 | %files doc | |
9c3d8079 | 510 | %defattr(644,root,root,755) |
4470e4fe | 511 | %doc catalina/docs/* |