/[packages]/cauldron/tomcat/current/SPECS/tomcat.spec
ViewVC logotype

Contents of /cauldron/tomcat/current/SPECS/tomcat.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 133622 - (show annotations) (download)
Mon Aug 15 23:24:29 2011 UTC (9 years, 11 months ago) by dmorgan
File size: 21390 byte(s)
New version 7.0.20
1 # Copyright (c) 2000-2008, JPackage Project
2 # All rights reserved.
3 #
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions
6 # are met:
7 #
8 # 1. Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer.
10 # 2. Redistributions in binary form must reproduce the above copyright
11 # notice, this list of conditions and the following disclaimer in the
12 # documentation and/or other materials provided with the
13 # distribution.
14 # 3. Neither the name of the JPackage Project nor the names of its
15 # contributors may be used to endorse or promote products derived
16 # from this software without specific prior written permission.
17 #
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 #
30
31 %global jspspec 2.2
32 %global major_version 7
33 %global minor_version 0
34 %global micro_version 20
35 %global packdname apache-tomcat-%{version}-src
36 %global servletspec 3.0
37 %global elspec 2.2
38 %global tcuid 91
39
40 # FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/
41 %global basedir %{_var}/lib/%{name}
42 %global appdir %{basedir}/webapps
43 %global homedir %{_datadir}/%{name}
44 %global bindir %{homedir}/bin
45 %global confdir %{_sysconfdir}/%{name}
46 %global libdir %{_javadir}/%{name}
47 %global logdir %{_var}/log/%{name}
48 %global cachedir %{_var}/cache/%{name}
49 %global tempdir %{cachedir}/temp
50 %global workdir %{cachedir}/work
51 %global _initrddir %{_sysconfdir}/init.d
52 %global _systemddir /lib/systemd/system
53
54 Name: tomcat
55 Epoch: 0
56 Version: %{major_version}.%{minor_version}.%{micro_version}
57 Release: %mkrel 2
58 Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API
59
60 Group: Development/Java
61 License: ASL 2.0
62 URL: http://tomcat.apache.org/
63 Source0: http://www.apache.org/dist/tomcat/tomcat-%{major_version}/v%{version}/src/%{packdname}.tar.gz
64 Source1: %{name}-%{major_version}.%{minor_version}.conf
65 Source2: %{name}-%{major_version}.%{minor_version}.init
66 Source3: %{name}-%{major_version}.%{minor_version}.sysconfig
67 Source4: %{name}-%{major_version}.%{minor_version}.wrapper
68 Source5: %{name}-%{major_version}.%{minor_version}.logrotate
69 Source6: %{name}-%{major_version}.%{minor_version}-digest.script
70 Source7: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script
71 Source8: servlet-api-OSGi-MANIFEST.MF
72 Source9: jsp-api-OSGi-MANIFEST.MF
73 Source10: %{name}-%{major_version}.%{minor_version}-log4j.properties
74 Source11: %{name}-%{major_version}.%{minor_version}.service
75 Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch
76 Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch
77
78 BuildArch: noarch
79
80 BuildRequires: ant
81 BuildRequires: ant-nodeps
82 BuildRequires: ecj
83 BuildRequires: findutils
84 BuildRequires: apache-commons-collections
85 BuildRequires: apache-commons-daemon
86 BuildRequires: apache-commons-dbcp
87 BuildRequires: apache-commons-pool
88 BuildRequires: jakarta-taglibs-standard
89 BuildRequires: java-devel = 0:1.6.0
90 BuildRequires: jpackage-utils >= 0:1.7.0
91 BuildRequires: junit
92 BuildRequires: log4j
93 BuildRequires: geronimo-jaxrpc
94 BuildRequires: wsdl4j
95 BuildRequires: zip
96 Requires: apache-commons-daemon
97 Requires: apache-commons-logging
98 Requires: apache-commons-collections
99 Requires: apache-commons-dbcp
100 Requires: apache-commons-pool
101 Requires: java = 0:1.6.0
102 Requires: procps
103 Requires: %{name}-lib = %{epoch}:%{version}-%{release}
104 Requires(pre): shadow-utils
105 Requires(post): chkconfig
106 Requires(preun): chkconfig
107 #Requires(post): redhat-lsb
108 #Requires(preun): redhat-lsb
109 Requires(post): jpackage-utils
110 Requires(postun): jpackage-utils
111
112 %description
113 Tomcat is the servlet container that is used in the official Reference
114 Implementation for the Java Servlet and JavaServer Pages technologies.
115 The Java Servlet and JavaServer Pages specifications are developed by
116 Sun under the Java Community Process.
117
118 Tomcat is developed in an open and participatory environment and
119 released under the Apache Software License version 2.0. Tomcat is intended
120 to be a collaboration of the best-of-breed developers from around the world.
121
122 %package admin-webapps
123 Group: Development/Java
124 Summary: The host-manager and manager web applications for Apache Tomcat
125 Requires: %{name} = %{epoch}:%{version}-%{release}
126
127 %description admin-webapps
128 The host-manager and manager web applications for Apache Tomcat.
129
130 %package docs-webapp
131 Group: Development/Java
132 Summary: The docs web application for Apache Tomcat
133 Requires: %{name} = %{epoch}:%{version}-%{release}
134
135 %description docs-webapp
136 The docs web application for Apache Tomcat.
137
138 %package javadoc
139 Group: Development/Java
140 Summary: Javadoc generated documentation for Apache Tomcat
141 Requires: jpackage-utils
142
143 %description javadoc
144 Javadoc generated documentation for Apache Tomcat.
145
146 %package jsp-%{jspspec}-api
147 Group: Development/Java
148 Summary: Apache Tomcat JSP API implementation classes
149 Provides: jsp = %{jspspec}
150 Provides: jsp22
151 Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release}
152 Requires(post): chkconfig
153 Requires(postun): chkconfig
154
155 %description jsp-%{jspspec}-api
156 Apache Tomcat JSP API implementation classes.
157
158
159 %package lib
160 Group: Development/Java
161 Summary: Libraries needed to run the Tomcat Web container
162 Requires: %{name}-jsp-%{jspspec}-api = %{epoch}:%{version}-%{release}
163 Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release}
164 Requires: %{name}-el-%{elspec}-api = %{epoch}:%{version}-%{release}
165 Requires: ecj
166 Requires: apache-commons-collections
167 Requires: apache-commons-dbcp
168 Requires: apache-commons-pool
169 Requires(preun): coreutils
170
171 %description lib
172 Libraries needed to run the Tomcat Web container.
173
174 %package servlet-%{servletspec}-api
175 Group: Development/Java
176 Summary: Apache Tomcat Servlet API implementation classes
177 Provides: servlet = %{servletspec}
178 Provides: servlet6
179 Provides: servlet3
180 Requires(post): chkconfig
181 Requires(postun): chkconfig
182
183 %description servlet-%{servletspec}-api
184 Apache Tomcat Servlet API implementation classes.
185
186 %package el-%{elspec}-api
187 Group: Development/Java
188 Summary: Expression Language v1.0 API
189 Provides: el_1_0_api = %{epoch}:%{version}-%{release}
190 Provides: el_api = %{elspec}
191 Requires(post): chkconfig
192 Requires(postun): chkconfig
193
194 %description el-%{elspec}-api
195 Expression Language 1.0.
196
197 %package webapps
198 Group: Development/Java
199 Summary: The ROOT and examples web applications for Apache Tomcat
200 Requires: %{name} = %{epoch}:%{version}-%{release}
201 Requires: jakarta-taglibs-standard >= 0:1.1
202
203 %description webapps
204 The ROOT and examples web applications for Apache Tomcat.
205
206 %prep
207 %setup -q -n %{packdname}
208 # remove pre-built binaries and windows files
209 find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name "*.gz" -o \
210 -name "*.jar" -o -name "*.war" -o -name "*.zip" \) -delete
211
212 %patch0 -p0
213 %patch1 -p0
214 # %patch2 -p0
215 %{__ln_s} $(build-classpath jakarta-taglibs-core) webapps/examples/WEB-INF/lib/jstl.jar
216 %{__ln_s} $(build-classpath jakarta-taglibs-standard) webapps/examples/WEB-INF/lib/standard.jar
217
218 %build
219 export OPT_JAR_LIST="xalan-j2-serializer"
220 # we don't care about the tarballs and we're going to replace
221 # tomcat-dbcp.jar with apache-commons-{collections,dbcp,pool}-tomcat5.jar
222 # so just create a dummy file for later removal
223 touch HACK
224 %{__mkdir_p} HACKDIR
225 touch HACKDIR/build.xml
226 # who needs a build.properties file anyway
227 %{ant} -Dbase.path="." \
228 -Dbuild.compiler="modern" \
229 -Dcommons-collections.jar="$(build-classpath apache-commons-collections)" \
230 -Dcommons-daemon.jar="$(build-classpath apache-commons-daemon)" \
231 -Dcommons-daemon.native.src.tgz="HACK" \
232 -Djasper-jdt.jar="$(build-classpath ecj)" \
233 -Djdt.jar="$(build-classpath ecj)" \
234 -Dtomcat-dbcp.jar="$(build-classpath apache-commons-dbcp)" \
235 -Dtomcat-native.tar.gz="HACK" \
236 -Dtomcat-native.dll.win32="HACK" \
237 -Dtomcat-native.dll.x64="HACK" \
238 -Dtomcat-native.dll.i64="HACK" \
239 -Dcommons-daemon.native.win.mgr.exe="HACK" \
240 -Dnsis.exe="HACK" \
241 -Djaxrpc-lib.jar="$(build-classpath jaxrpc)" \
242 -Dwsdl4j-lib.jar="$(build-classpath wsdl4j)" \
243 -Dcommons-pool.home="HACKDIR" \
244 -Dcommons-dbcp.home="HACKDIR" \
245 -Dno.build.dbcp=true \
246 -Dversion="%{version}" \
247 -Dversion.build="%{micro_version}" \
248 deploy dist-prepare dist-source javadoc
249
250 # remove some jars that we'll replace with symlinks later
251 %{__rm} output/build/bin/commons-daemon.jar \
252 output/build/lib/ecj.jar
253 # remove the cruft we created
254 %{__rm} output/build/bin/tomcat-native.tar.gz
255 pushd output/dist/src/webapps/docs/appdev/sample/src
256 %{__mkdir_p} ../web/WEB-INF/classes
257 %{javac} -cp ../../../../../../../../output/build/lib/servlet-api.jar -d ../web/WEB-INF/classes mypackage/Hello.java
258 pushd ../web
259 %{jar} cf ../../../../../../../../output/build/webapps/docs/appdev/sample/sample.war *
260 popd
261 popd
262
263 # inject OSGi manifests
264 mkdir -p META-INF
265 cp -p %{SOURCE8} META-INF/MANIFEST.MF
266 touch META-INF/MANIFEST.MF
267 zip -u output/build/lib/servlet-api.jar META-INF/MANIFEST.MF
268 cp -p %{SOURCE9} META-INF/MANIFEST.MF
269 touch META-INF/MANIFEST.MF
270 zip -u output/build/lib/jsp-api.jar META-INF/MANIFEST.MF
271
272 %install
273 # build initial path structure
274 %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_bindir}
275 %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sbindir}
276 %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_javadocdir}/%{name}
277 %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_initrddir}
278 %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_systemddir}
279 %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d
280 %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
281 %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{appdir}
282 %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{bindir}
283 %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir}
284 %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{confdir}/Catalina/localhost
285 %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{libdir}
286 %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{logdir}
287 /bin/touch ${RPM_BUILD_ROOT}%{logdir}/catalina.out
288 /bin/echo "%{name}-%{major_version}.%{minor_version}.%{micro_version} RPM installed" >> ${RPM_BUILD_ROOT}%{logdir}/catalina.out
289 %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{homedir}
290 %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{tempdir}
291 %{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{workdir}
292
293 # move things into place
294 # First copy supporting libs to tomcat lib
295 pushd output/build
296 %{__cp} -a bin/*.{jar,xml} ${RPM_BUILD_ROOT}%{bindir}
297 %{__cp} %{SOURCE10} conf/log4j.properties
298 %{__cp} -a conf/*.{policy,properties,xml} ${RPM_BUILD_ROOT}%{confdir}
299 %{__cp} -a lib/*.jar ${RPM_BUILD_ROOT}%{libdir}
300 %{__cp} -a webapps/* ${RPM_BUILD_ROOT}%{appdir}
301 popd
302 # javadoc
303 %{__cp} -a output/dist/webapps/docs/api/* ${RPM_BUILD_ROOT}%{_javadocdir}/%{name}
304
305 %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
306 -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
307 -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE1} \
308 > ${RPM_BUILD_ROOT}%{confdir}/%{name}.conf
309 %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
310 -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
311 -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE3} \
312 > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name}
313 %{__install} -m 0644 %{SOURCE2} \
314 ${RPM_BUILD_ROOT}%{_initrddir}/%{name}
315 %{__install} -m 0644 %{SOURCE4} \
316 ${RPM_BUILD_ROOT}%{_sbindir}/%{name}
317 %{__install} -m 0644 %{SOURCE11} \
318 ${RPM_BUILD_ROOT}%{_systemddir}/%{name}.service
319 %{__ln_s} %{name} ${RPM_BUILD_ROOT}%{_sbindir}/d%{name}
320 %{__sed} -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \
321 > ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name}
322 %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
323 -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
324 -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \
325 > ${RPM_BUILD_ROOT}%{_bindir}/%{name}-digest
326 %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
327 -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
328 -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE7} \
329 > ${RPM_BUILD_ROOT}%{_bindir}/%{name}-tool-wrapper
330 # create jsp and servlet API symlinks
331 pushd ${RPM_BUILD_ROOT}%{_javadir}
332 %{__mv} %{name}/jsp-api.jar %{name}-jsp-%{jspspec}-api.jar
333 %{__ln_s} %{name}-jsp-%{jspspec}-api.jar %{name}-jsp-api.jar
334 %{__mv} %{name}/servlet-api.jar %{name}-servlet-%{servletspec}-api.jar
335 %{__ln_s} %{name}-servlet-%{servletspec}-api.jar %{name}-servlet-api.jar
336 %{__mv} %{name}/el-api.jar %{name}-el-%{elspec}-api.jar
337 %{__ln_s} %{name}-el-%{elspec}-api.jar %{name}-el-api.jar
338 popd
339
340 pushd output/build
341 %{_bindir}/build-jar-repository lib apache-commons-collections \
342 apache-commons-dbcp apache-commons-pool ecj 2>&1
343 # need to use -p here with b-j-r otherwise the examples webapp fails to
344 # load with a java.io.IOException
345 %{_bindir}/build-jar-repository -p webapps/examples/WEB-INF/lib \
346 taglibs-core.jar taglibs-standard.jar 2>&1
347 popd
348
349 pushd ${RPM_BUILD_ROOT}%{libdir}
350 # symlink JSP and servlet API jars
351 %{__ln_s} ../%{name}-jsp-%{jspspec}-api.jar .
352 %{__ln_s} ../%{name}-servlet-%{servletspec}-api.jar .
353 %{__ln_s} ../%{name}-el-%{elspec}-api.jar .
354 %{__ln_s} $(build-classpath apache-commons-collections) commons-collections.jar
355 %{__ln_s} $(build-classpath apache-commons-dbcp) commons-dbcp.jar
356 %{__ln_s} $(build-classpath log4j) log4j.jar
357 %{__ln_s} $(build-classpath ecj) jasper-jdt.jar
358
359 # Link the juli jar here from /usr/share/java/tomcat
360 %{__ln_s} %{bindir}/tomcat-juli.jar .
361 popd
362
363 # symlink to the FHS locations where we've installed things
364 pushd ${RPM_BUILD_ROOT}%{homedir}
365 %{__ln_s} %{appdir} webapps
366 %{__ln_s} %{confdir} conf
367 %{__ln_s} %{libdir} lib
368 %{__ln_s} %{logdir} logs
369 %{__ln_s} %{tempdir} temp
370 %{__ln_s} %{workdir} work
371 popd
372
373 # install sample webapp
374 %{__mkdir_p} ${RPM_BUILD_ROOT}%{appdir}/sample
375 pushd ${RPM_BUILD_ROOT}%{appdir}/sample
376 %{jar} xf ${RPM_BUILD_ROOT}%{appdir}/docs/appdev/sample/sample.war
377 popd
378 %{__rm} ${RPM_BUILD_ROOT}%{appdir}/docs/appdev/sample/sample.war
379
380
381 # Generate a depmap fragment javax.servlet:servlet-api pointing to
382 # tomcat-servlet-3.0-api for backwards compatibility
383 %add_to_maven_depmap javax.servlet servlet-api %{servletspec} JPP %{name}-servlet-%{servletspec}-api
384 # also provide jetty depmap (originally in jetty package, but it's cleaner to have it here)
385 %add_to_maven_depmap org.mortbay.jetty servlet-api %{servletspec} JPP %{name}-servlet-%{servletspec}-api
386 mv %{buildroot}%{_mavendepmapfragdir}/%{name} %{buildroot}%{_mavendepmapfragdir}/%{name}-servlet-api
387
388 # Install the maven metadata
389 %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_mavenpomdir}
390 pushd output/dist/src/res/maven
391 for pom in *.pom; do
392 # fix-up version in all pom files
393 sed -i 's/@MAVEN.DEPLOY.VERSION@/%{version}/g' $pom
394 done
395
396 # we won't install dbcp, juli-adapters and juli-extras pom files
397 for pom in tomcat-annotations-api.pom tomcat-catalina.pom tomcat-jasper-el.pom tomcat-jasper.pom \
398 tomcat-catalina-ha.pom tomcat-el-api.pom; do
399 %{__cp} -a $pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-$pom
400 base=`basename $pom .pom`
401 %add_to_maven_depmap org.apache.tomcat $base %{version} JPP/%{name} $base
402 done
403
404 # servlet-api jsp-api and el-api are not in tomcat subdir, since they are widely re-used elsewhere
405 for pom in tomcat-jsp-api.pom tomcat-servlet-api.pom tomcat-el-api.pom;do
406 %{__cp} -a $pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP-%{name}-$pom
407 base=`basename $pom .pom`
408 %add_to_maven_depmap org.apache.tomcat $base %{version} JPP %{name}-$base
409 done
410
411 # two special pom where jar files have different names
412 %{__cp} -a tomcat-tribes.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom
413 %add_to_maven_depmap org.apache.tomcat tribes %{version} JPP/%{name} catalina-tribes
414
415 %{__cp} -a tomcat-juli.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom
416 %add_to_maven_depmap org.apache.tomcat juli %{version} JPP/%{name} tomcat-juli
417
418
419 %pre
420 # add the tomcat user and group
421 %{_sbindir}/groupadd -g %{tcuid} -r tomcat 2>/dev/null || :
422 %{_sbindir}/useradd -c "Apache Tomcat" -u %{tcuid} -g tomcat \
423 -s /bin/nologin -r -d %{homedir} tomcat 2>/dev/null || :
424
425 %post
426 # install but don't activate
427 /sbin/chkconfig --add %{name}
428 %update_maven_depmap
429
430 %post jsp-%{jspspec}-api
431 %{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \
432 %{_javadir}/%{name}-jsp-%{jspspec}-api.jar 20100
433
434 %post servlet-%{servletspec}-api
435 %{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet \
436 %{_javadir}/%{name}-servlet-%{servletspec}-api.jar 20500
437 %update_maven_depmap
438
439 %post el-%{elspec}-api
440 %{_sbindir}/update-alternatives --install %{_javadir}/elspec.jar elspec \
441 %{_javadir}/%{name}-el-%{elspec}-api.jar 20250
442
443 %preun
444 # clean tempdir and workdir on removal or upgrade
445 %{__rm} -rf %{workdir}/* %{tempdir}/*
446 if [ "$1" = "0" ]; then
447 %{_initrddir}/%{name} stop >/dev/null 2>&1
448 /sbin/chkconfig --del %{name}
449 fi
450
451
452 %postun
453 %update_maven_depmap
454
455 %postun jsp-%{jspspec}-api
456 if [ "$1" = "0" ]; then
457 %{_sbindir}/update-alternatives --remove jsp \
458 %{_javadir}/%{name}-jsp-%{jspspec}-api.jar
459 fi
460
461 %postun servlet-%{servletspec}-api
462 if [ "$1" = "0" ]; then
463 %{_sbindir}/update-alternatives --remove servlet \
464 %{_javadir}/%{name}-servlet-%{servletspec}-api.jar
465 %update_maven_depmap
466 fi
467
468 %postun el-%{elspec}-api
469 if [ "$1" = "0" ]; then
470 %{_sbindir}/update-alternatives --remove elspec \
471 %{_javadir}/%{name}-el-%{elspec}-api.jar
472 fi
473
474 %files
475 %defattr(0664,root,tomcat,0755)
476 %doc {LICENSE,NOTICE,RELEASE*}
477 %attr(0755,root,root) %{_bindir}/%{name}-digest
478 %attr(0755,root,root) %{_bindir}/%{name}-tool-wrapper
479 %attr(0755,root,root) %{_sbindir}/d%{name}
480 %attr(0755,root,root) %{_sbindir}/%{name}
481 %attr(0755,root,root) %{_initrddir}/%{name}
482 %attr(0644,root,root) %{_systemddir}/%{name}.service
483 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
484 %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
485 %attr(0765,root,tomcat) %dir %{basedir}
486 %attr(0755,root,tomcat) %dir %{confdir}
487 %defattr(0664,root,tomcat,0770)
488 %attr(0770,root,tomcat) %dir %{logdir}
489 %attr(0660,tomcat,tomcat) %{logdir}/catalina.out
490 %attr(0770,root,tomcat) %dir %{cachedir}
491 %attr(0770,root,tomcat) %dir %{tempdir}
492 %attr(0770,root,tomcat) %dir %{workdir}
493 %defattr(0664,root,tomcat,0775)
494 %attr(0775,root,tomcat) %dir %{appdir}
495 %attr(0775,root,tomcat) %dir %{confdir}/Catalina
496 %attr(0775,root,tomcat) %dir %{confdir}/Catalina/localhost
497 %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/%{name}.conf
498 %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/*.policy
499 %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/*.properties
500 %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/context.xml
501 %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/server.xml
502 %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/log4j.properties
503 %attr(0660,tomcat,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml
504 %attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/web.xml
505 %dir %{homedir}
506 %{bindir}/bootstrap.jar
507 %{bindir}/catalina-tasks.xml
508 %{bindir}/tomcat-juli.jar
509 %{libdir}/tomcat-juli.jar
510 %{homedir}/lib
511 %{homedir}/temp
512 %{homedir}/webapps
513 %{homedir}/work
514 %{homedir}/logs
515 %{homedir}/conf
516 %{_mavendepmapfragdir}/%{name}
517 %{_mavenpomdir}/*.pom
518 # Exclude the POMs that are in sub-packages
519 %exclude %{_mavenpomdir}/*api*
520
521 %files admin-webapps
522 %defattr(0664,root,tomcat,0755)
523 %{appdir}/host-manager
524 %{appdir}/manager
525
526 %files docs-webapp
527 %defattr(-,root,root,-)
528 %{appdir}/docs
529
530 %files javadoc
531 %defattr(-,root,root,-)
532 %{_javadocdir}/%{name}
533
534 %files jsp-%{jspspec}-api
535 %defattr(-,root,root,-)
536 %{_javadir}/%{name}-jsp-%{jspspec}*.jar
537 %{_javadir}/%{name}-jsp-api.jar
538 %{_mavenpomdir}/JPP-%{name}-tomcat-jsp-api.pom
539
540 %files lib
541 %defattr(-,root,root,-)
542 %{libdir}
543 %exclude %{libdir}/tomcat-juli.jar
544 %exclude %{libdir}/%{name}-el-%{elspec}-api.jar
545
546 %files servlet-%{servletspec}-api
547 %defattr(-,root,root,-)
548 %doc LICENSE
549 %{_javadir}/%{name}-servlet-%{servletspec}*.jar
550 %{_javadir}/%{name}-servlet-api.jar
551 %{_mavendepmapfragdir}/%{name}-servlet-api
552 %{_mavenpomdir}/JPP-%{name}-tomcat-servlet-api.pom
553
554 %files el-%{elspec}-api
555 %defattr(-,root,root,-)
556 %doc LICENSE
557 %{_javadir}/%{name}-el-%{elspec}-api.jar
558 %{_javadir}/%{name}-el-api.jar
559 %{libdir}/%{name}-el-%{elspec}-api.jar
560 %{_mavenpomdir}/JPP-%{name}-tomcat-el-api.pom
561
562 %files webapps
563 %defattr(0644,tomcat,tomcat,0755)
564 %{appdir}/ROOT
565 %{appdir}/examples
566 %{appdir}/sample
567

  ViewVC Help
Powered by ViewVC 1.1.28