2012-06-16 07:18:01 +02:00
|
|
|
#
|
|
|
|
# spec file for package tomcat
|
|
|
|
#
|
2014-04-14 14:54:43 +02:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2012-06-16 07:18:01 +02:00
|
|
|
# Copyright (c) 2000-2009, JPackage Project
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2013-04-18 14:44:10 +02:00
|
|
|
%global with_systemd 0%{?suse_version} > 1210
|
2012-06-16 07:18:01 +02:00
|
|
|
%define jspspec 2.2
|
|
|
|
%define servletspec 3.0
|
|
|
|
%define elspec 2.2
|
|
|
|
%define major_version 7
|
|
|
|
%define minor_version 0
|
2014-05-24 11:59:26 +02:00
|
|
|
%define micro_version 54
|
2012-06-16 07:18:01 +02:00
|
|
|
%define packdname apache-tomcat-%{version}-src
|
|
|
|
%define tcuid 91
|
|
|
|
# FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/
|
|
|
|
%define appdir /srv/%{name}/webapps
|
|
|
|
%define bindir %{_datadir}/%{name}/bin
|
|
|
|
%define confdir %{_sysconfdir}/%{name}
|
|
|
|
%define homedir %{_datadir}/%{name}
|
|
|
|
%define libdir %{_javadir}/%{name}
|
|
|
|
%define logdir %{_localstatedir}/log/%{name}
|
|
|
|
%define cachedir %{_localstatedir}/cache/%{name}
|
|
|
|
%define tempdir %{cachedir}/temp
|
|
|
|
%define workdir %{cachedir}/work
|
|
|
|
%define _initrddir %{_sysconfdir}/init.d
|
|
|
|
Name: tomcat
|
|
|
|
Version: %{major_version}.%{minor_version}.%{micro_version}
|
|
|
|
Release: 0
|
|
|
|
Summary: Apache Servlet/JSP Engine, RI for Servlet 3.0/JSP 2.2 API
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: Productivity/Networking/Web/Servers
|
|
|
|
Url: http://tomcat.apache.org
|
|
|
|
Source0: http://www.apache.org/dist/tomcat/tomcat-%{major_version}/v%{version}/src/%{packdname}.tar.gz
|
|
|
|
Source1: %{name}-%{major_version}.%{minor_version}.conf
|
|
|
|
Source2: %{name}-%{major_version}.%{minor_version}.init
|
|
|
|
Source4: %{name}-%{major_version}.%{minor_version}.wrapper
|
|
|
|
Source5: %{name}-%{major_version}.%{minor_version}.logrotate
|
|
|
|
Source6: %{name}-%{major_version}.%{minor_version}-digest.script
|
|
|
|
Source7: %{name}-%{major_version}.%{minor_version}-tool-wrapper.script
|
|
|
|
Source8: servlet-api-OSGi-MANIFEST.MF
|
|
|
|
Source9: jsp-api-OSGi-MANIFEST.MF
|
|
|
|
Source10: %{name}-%{major_version}.%{minor_version}-log4j.properties
|
2012-07-19 10:58:29 +02:00
|
|
|
Source11: tomcat-7.0.service
|
2012-06-16 07:18:01 +02:00
|
|
|
Source12: el-api-OSGi-MANIFEST.MF
|
|
|
|
Source13: jasper-el-OSGi-MANIFEST.MF
|
|
|
|
Source14: jasper-OSGi-MANIFEST.MF
|
|
|
|
Source15: tomcat-api-OSGi-MANIFEST.MF
|
|
|
|
Source16: tomcat-juli-OSGi-MANIFEST.MF
|
2012-07-17 16:23:06 +02:00
|
|
|
Source17: tomcat-7.0-tomcat-sysd
|
2012-07-19 10:58:29 +02:00
|
|
|
Source20: tomcat-7.0-jsvc.service
|
2013-11-04 15:49:19 +01:00
|
|
|
Source30: dbcp-tomcat-build.xml
|
2012-06-16 07:18:01 +02:00
|
|
|
Source1000: tomcat-rpmlintrc
|
2012-09-11 10:50:06 +02:00
|
|
|
Source1001: http://www.apache.org/dist/tomcat/tomcat-%{major_version}/v%{version}/src/%{packdname}.tar.gz.asc
|
2012-12-18 10:32:34 +01:00
|
|
|
Source1002: %{name}.keyring
|
2012-06-16 07:18:01 +02:00
|
|
|
#PATCH-FIX-UPSTREAM: from jpackage.org package
|
|
|
|
Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch
|
|
|
|
#PATCH-FIX-UPSTREAM: from jpackage.org package
|
|
|
|
Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.patch
|
|
|
|
#PATCH-FIX-OPENSUSE: skip few windows specific parts of build
|
2014-04-14 14:54:43 +02:00
|
|
|
Patch2: tomcat-7.0.52-property-build.windows.patch
|
2014-05-20 13:53:20 +02:00
|
|
|
# PATCH-FIX-UPSTREAM: https://issues.apache.org/bugzilla/show_bug.cgi?id=56373
|
|
|
|
Patch3: tomcat-7.0.53-JDTCompiler-java.patch
|
|
|
|
BuildRequires: ant >= 1.8.1
|
|
|
|
BuildRequires: ant-antlr
|
2013-01-21 14:55:33 +01:00
|
|
|
BuildRequires: ecj >= 4.2.1
|
2012-06-16 07:18:01 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: findutils
|
|
|
|
BuildRequires: geronimo-jaf-1_0_2-api
|
2014-07-10 17:10:16 +02:00
|
|
|
BuildRequires: geronimo-jaxrpc-1_1-api
|
|
|
|
BuildRequires: geronimo-qname-1_1-api
|
|
|
|
BuildRequires: geronimo-saaj-1_1-api
|
2012-06-16 07:18:01 +02:00
|
|
|
BuildRequires: jakarta-commons-collections
|
|
|
|
BuildRequires: jakarta-commons-daemon
|
|
|
|
BuildRequires: jakarta-commons-dbcp
|
2013-11-04 15:49:19 +01:00
|
|
|
BuildRequires: jakarta-commons-dbcp-src
|
2012-06-16 07:18:01 +02:00
|
|
|
BuildRequires: jakarta-commons-pool
|
2013-11-04 15:49:19 +01:00
|
|
|
BuildRequires: jakarta-commons-pool-tomcat5
|
2012-06-16 07:18:01 +02:00
|
|
|
BuildRequires: jakarta-taglibs-standard >= 1.1
|
2013-11-04 15:49:19 +01:00
|
|
|
BuildRequires: java-devel >= 1.7.0
|
2013-07-23 16:35:12 +02:00
|
|
|
BuildRequires: javapackages-tools
|
2012-06-16 07:18:01 +02:00
|
|
|
BuildRequires: junit
|
2014-07-10 17:10:16 +02:00
|
|
|
BuildRequires: log4j
|
2012-06-16 07:18:01 +02:00
|
|
|
BuildRequires: sed
|
|
|
|
BuildRequires: unzip
|
|
|
|
BuildRequires: wsdl4j
|
2014-07-10 17:10:16 +02:00
|
|
|
BuildRequires: zip
|
2012-06-16 07:18:01 +02:00
|
|
|
Requires: %{name}-lib = %{version}-%{release}
|
|
|
|
Requires: jakarta-commons-daemon
|
|
|
|
Requires: jakarta-commons-dbcp
|
|
|
|
Requires: jakarta-commons-logging
|
|
|
|
Requires: jakarta-commons-pool
|
2013-01-02 16:11:21 +01:00
|
|
|
Requires: log4j
|
2012-06-16 07:18:01 +02:00
|
|
|
Requires(post): /sbin/chkconfig
|
2014-07-10 17:10:16 +02:00
|
|
|
Requires(pre): %{_sbindir}/groupadd
|
|
|
|
Requires(pre): %{_sbindir}/useradd
|
2012-06-16 07:18:01 +02:00
|
|
|
Requires(preun): /sbin/chkconfig
|
2014-07-10 17:10:16 +02:00
|
|
|
Recommends: libtcnative-1-0 >= 1.1.24
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildArch: noarch
|
|
|
|
%if 0%{?suse_version} > 1220
|
|
|
|
BuildRequires: gpg-offline
|
|
|
|
%endif
|
|
|
|
%if %{with_systemd}
|
|
|
|
BuildRequires: systemd
|
|
|
|
%systemd_requires
|
|
|
|
%else
|
|
|
|
Recommends: logrotate
|
|
|
|
%endif
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
Tomcat is the servlet container that is used in the official Reference
|
|
|
|
Implementation for the Java Servlet and JavaServer Pages technologies.
|
|
|
|
The Java Servlet and JavaServer Pages specifications are developed by
|
|
|
|
Sun under the Java Community Process.
|
|
|
|
|
|
|
|
Tomcat is developed in an open and participatory environment and
|
|
|
|
released under the Apache Software License version 2.0. Tomcat is
|
|
|
|
intended to be a collaboration of the best-of-breed developers from
|
|
|
|
around the world.
|
|
|
|
|
|
|
|
%package admin-webapps
|
|
|
|
Summary: The host-manager and manager web applications for Apache Tomcat
|
|
|
|
Group: Productivity/Networking/Web/Servers
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description admin-webapps
|
2014-07-11 11:18:33 +02:00
|
|
|
The host-manager and manager web based applications for Apache Tomcat.
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
%package docs-webapp
|
|
|
|
Summary: The docs web application for Apache Tomcat
|
|
|
|
Group: Productivity/Networking/Web/Servers
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description docs-webapp
|
2014-07-11 11:18:33 +02:00
|
|
|
The documentation of web application for Apache Tomcat.
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
%package el-2_2-api
|
|
|
|
Summary: Expression Language v2.2 API
|
|
|
|
Group: Development/Libraries/Java
|
2014-07-10 17:10:16 +02:00
|
|
|
Requires(post): %{_sbindir}/update-alternatives
|
|
|
|
Requires(preun): %{_sbindir}/update-alternatives
|
2012-06-16 07:18:01 +02:00
|
|
|
Provides: %{name}-el-%{elspec}-api = %{version}-%{release}
|
|
|
|
Provides: el_2_2_api = %{version}-%{release}
|
|
|
|
Provides: el_api = %{elspec}
|
|
|
|
|
|
|
|
%description el-2_2-api
|
2014-07-11 11:18:33 +02:00
|
|
|
Expression Language API version 2.2.
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: Javadoc generated documentation for Apache Tomcat
|
|
|
|
Group: Productivity/Networking/Web/Servers
|
|
|
|
|
|
|
|
%description javadoc
|
2014-07-11 11:18:33 +02:00
|
|
|
Javadoc generated documentation files for Apache Tomcat.
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
%package jsp-2_2-api
|
|
|
|
Summary: Apache Tomcat JSP API implementation classes
|
|
|
|
Group: Productivity/Networking/Web/Servers
|
|
|
|
Requires: %{name}-servlet-%{servletspec}-api = %{version}-%{release}
|
|
|
|
Requires(post): %{_sbindir}/update-alternatives
|
|
|
|
Requires(postun): %{_sbindir}/update-alternatives
|
2014-07-10 17:10:16 +02:00
|
|
|
Provides: %{name}-jsp-%{jspspec}-api
|
|
|
|
Provides: jsp = %{jspspec}
|
|
|
|
Provides: jsp22
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
%description jsp-2_2-api
|
2014-07-11 11:18:33 +02:00
|
|
|
Apache Tomcat JSP API implementation classes version 2.2
|
2012-06-16 07:18:01 +02:00
|
|
|
|
2013-04-18 14:44:10 +02:00
|
|
|
%if %{with_systemd}
|
2014-07-29 13:25:39 +02:00
|
|
|
|
2012-06-16 07:18:01 +02:00
|
|
|
%package jsvc
|
|
|
|
Summary: Apache jsvc wrapper for Apache Tomcat as separate service
|
|
|
|
Group: Productivity/Networking/Web/Servers
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
Requires: apache-commons-daemon-jsvc
|
|
|
|
|
|
|
|
%description jsvc
|
|
|
|
Systemd service and wrapper scripts to start tomcat with jsvc,
|
|
|
|
which allows tomcat to perform some privileged operations
|
|
|
|
(e.g. bind to a port < 1024) and then switch identity to a non-privileged user.
|
2012-07-19 10:58:29 +02:00
|
|
|
%endif
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
%package lib
|
|
|
|
Summary: Libraries needed to run the Tomcat Web container
|
|
|
|
Group: Productivity/Networking/Web/Servers
|
|
|
|
Requires: %{name}-el-%{elspec}-api = %{version}-%{release}
|
|
|
|
Requires: %{name}-jsp-%{jspspec}-api = %{version}-%{release}
|
|
|
|
Requires: %{name}-servlet-%{servletspec}-api = %{version}-%{release}
|
2013-01-21 14:55:33 +01:00
|
|
|
Requires(post): ecj >= 4.2.1
|
2013-11-04 15:49:19 +01:00
|
|
|
Requires(post): jakarta-commons-pool-tomcat5
|
2014-07-11 16:17:08 +02:00
|
|
|
Requires(preun): %{_bindir}/rm
|
2013-11-04 15:49:19 +01:00
|
|
|
Provides: jakarta-commons-dbcp-tomcat5 = 1.4
|
|
|
|
Obsoletes: jakarta-commons-dbcp-tomcat5 < 1.4
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
%description lib
|
2014-07-11 11:18:33 +02:00
|
|
|
Libraries required to successfully run the Tomcat Web container
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
%package servlet-3_0-api
|
|
|
|
Summary: Apache Tomcat Servlet API implementation classes
|
|
|
|
Group: Productivity/Networking/Web/Servers
|
2014-07-10 17:10:16 +02:00
|
|
|
Requires(post): %{_sbindir}/update-alternatives
|
|
|
|
Requires(postun): %{_sbindir}/update-alternatives
|
2012-06-16 07:18:01 +02:00
|
|
|
Provides: %{name}-servlet-%{servletspec}-api = %{version}-%{release}
|
|
|
|
Provides: servlet = %{servletspec}
|
|
|
|
Provides: servlet30
|
|
|
|
Provides: servlet7
|
|
|
|
|
|
|
|
%description servlet-3_0-api
|
2014-07-11 11:18:33 +02:00
|
|
|
Apache Tomcat Servlet API implementation classes version 3.0
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
%package webapps
|
2014-07-11 11:18:33 +02:00
|
|
|
Summary: ROOT and examples web applications for Apache Tomcat
|
2012-06-16 07:18:01 +02:00
|
|
|
Group: Productivity/Networking/Web/Servers
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
2014-07-11 11:18:33 +02:00
|
|
|
Requires: jakarta-taglibs-standard >= 1.1
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
%description webapps
|
|
|
|
The ROOT and examples web applications for Apache Tomcat
|
|
|
|
|
|
|
|
%prep
|
2013-01-21 14:55:33 +01:00
|
|
|
%if 0%{?suse_version} > 1220
|
2012-12-18 10:32:34 +01:00
|
|
|
%gpg_verify %{S:1001}
|
2012-12-18 10:34:59 +01:00
|
|
|
%endif
|
|
|
|
|
2012-06-16 07:18:01 +02:00
|
|
|
%setup -q -n %{packdname}
|
|
|
|
# remove pre-built binaries and windows files
|
|
|
|
find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name "*.gz" -o \
|
2014-07-10 17:10:16 +02:00
|
|
|
-name "*.jar" -o -name "*.war" -o -name "*.zip" \) | xargs -t rm -f
|
2012-06-16 07:18:01 +02:00
|
|
|
%patch0 -p1
|
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
2014-05-20 13:53:20 +02:00
|
|
|
%patch3
|
2014-07-10 17:10:16 +02:00
|
|
|
# remove date from docs
|
|
|
|
sed -i -e '/build-date/ d' webapps/docs/tomcat-docs.xsl
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
%build
|
2013-11-04 15:49:19 +01:00
|
|
|
#bnc847505: build all commons-dbcp-tomcat jars before tomcat
|
|
|
|
# so we broke the build cycle between commons-dbcp and tomcat
|
|
|
|
|
|
|
|
mkdir -p commons/dbcp
|
|
|
|
pushd commons/dbcp
|
|
|
|
cp %{SOURCE30} .
|
|
|
|
mkdir src
|
|
|
|
cp -r %{_usrsrc}/commons-dbcp/java src/
|
|
|
|
export CLASSPATH=$(build-classpath commons-pool-tomcat5)
|
|
|
|
ant -f dbcp-tomcat-build.xml
|
|
|
|
popd
|
|
|
|
|
2014-07-10 17:10:16 +02:00
|
|
|
ln -s $(build-classpath jakarta-taglibs-core) webapps/examples/WEB-INF/lib/jstl.jar
|
|
|
|
ln -s $(build-classpath jakarta-taglibs-standard) webapps/examples/WEB-INF/lib/standard.jar
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
export CLASSPATH=
|
|
|
|
export OPT_JAR_LIST="xalan-j2-serializer"
|
|
|
|
export ANT_OPTS=-Xmx500M
|
|
|
|
|
|
|
|
# we don't care about the tarballs and we're going to replace
|
|
|
|
# tomcat-dbcp.jar with jakarta-commons-{collections,dbcp,pool}-tomcat5.jar
|
|
|
|
# so just create a dummy file for later removal
|
|
|
|
touch HACK
|
2014-07-10 17:10:16 +02:00
|
|
|
mkdir -p HACKDIR
|
2012-06-16 07:18:01 +02:00
|
|
|
touch HACKDIR/build.xml
|
|
|
|
|
2014-07-10 16:47:50 +02:00
|
|
|
ant -Dbase.path="." \
|
2013-11-04 15:49:19 +01:00
|
|
|
-Djava.7.home="%{java_home}" \
|
2012-06-16 07:18:01 +02:00
|
|
|
-Dbuild.compiler="modern" \
|
|
|
|
-Dcommons-collections.jar="$(build-classpath commons-collections)" \
|
|
|
|
-Dcommons-daemon.jar="$(build-classpath commons-daemon)" \
|
|
|
|
-Dcommons-daemon.native.src.tgz="HACK" \
|
|
|
|
-Djasper-jdt.jar="$(build-classpath ecj)" \
|
|
|
|
-Djdt.jar="$(build-classpath ecj)" \
|
2013-09-05 16:01:11 +02:00
|
|
|
-Dtomcat-dbcp.jar="$(build-classpath commons-dbcp)" \
|
2012-06-16 07:18:01 +02:00
|
|
|
-Dtomcat-native.tar.gz="HACK" \
|
|
|
|
-Dtomcat-native.home="." \
|
|
|
|
-Dcommons-daemon.native.win.mgr.exe="HACK" \
|
|
|
|
-Dnsis.exe="HACK" \
|
|
|
|
-Djaxrpc-lib.jar="$(build-classpath jaxrpc)" \
|
|
|
|
-Dwsdl4j-lib.jar="$(build-classpath wsdl4j)" \
|
|
|
|
-Dcommons-pool.home="HACKDIR" \
|
|
|
|
-Dcommons-dbcp.home="HACKDIR" \
|
|
|
|
-Dno.build.dbcp=true \
|
|
|
|
-Dversion="%{version}" \
|
|
|
|
-Dversion.build="%{micro_version}" \
|
2013-11-04 15:49:19 +01:00
|
|
|
deploy dist-prepare dist-source javadoc package-java7
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
# remove some jars that we'll replace with symlinks later
|
2014-07-10 17:10:16 +02:00
|
|
|
rm output/build/bin/commons-daemon.jar \
|
2013-09-05 16:01:11 +02:00
|
|
|
output/build/lib/ecj.jar \
|
2013-11-04 15:49:19 +01:00
|
|
|
output/build/lib/*commons-dbcp.jar
|
2012-06-16 07:18:01 +02:00
|
|
|
# remove the cruft we created
|
2014-07-10 17:10:16 +02:00
|
|
|
rm output/build/bin/tomcat-native.tar.gz
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
pushd output/dist/src/webapps/docs/appdev/sample/src
|
2014-07-10 17:10:16 +02:00
|
|
|
mkdir -p ../web/WEB-INF/classes
|
|
|
|
javac -cp ../../../../../../../../output/build/lib/servlet-api.jar -d ../web/WEB-INF/classes mypackage/Hello.java
|
2012-06-16 07:18:01 +02:00
|
|
|
pushd ../web
|
2014-07-10 17:10:16 +02:00
|
|
|
jar cf ../../../../../../../../output/build/webapps/docs/appdev/sample/sample.war *
|
2012-06-16 07:18:01 +02:00
|
|
|
popd
|
|
|
|
popd
|
|
|
|
|
|
|
|
# inject OSGi manifests
|
|
|
|
mkdir -p META-INF
|
|
|
|
cp -p %{SOURCE8} META-INF/MANIFEST.MF
|
|
|
|
touch META-INF/MANIFEST.MF
|
|
|
|
zip -u output/build/lib/servlet-api.jar META-INF/MANIFEST.MF
|
|
|
|
cp -p %{SOURCE9} META-INF/MANIFEST.MF
|
|
|
|
touch META-INF/MANIFEST.MF
|
|
|
|
zip -u output/build/lib/jsp-api.jar META-INF/MANIFEST.MF
|
|
|
|
cp -p %{SOURCE12} META-INF/MANIFEST.MF
|
|
|
|
touch META-INF/MANIFEST.MF
|
|
|
|
zip -u output/build/lib/el-api.jar META-INF/MANIFEST.MF
|
|
|
|
cp -p %{SOURCE13} META-INF/MANIFEST.MF
|
|
|
|
touch META-INF/MANIFEST.MF
|
|
|
|
zip -u output/build/lib/jasper-el.jar META-INF/MANIFEST.MF
|
|
|
|
cp -p %{SOURCE14} META-INF/MANIFEST.MF
|
|
|
|
touch META-INF/MANIFEST.MF
|
|
|
|
zip -u output/build/lib/jasper.jar META-INF/MANIFEST.MF
|
|
|
|
cp -p %{SOURCE15} META-INF/MANIFEST.MF
|
|
|
|
touch META-INF/MANIFEST.MF
|
|
|
|
zip -u output/build/lib/tomcat-api.jar META-INF/MANIFEST.MF
|
|
|
|
cp -p %{SOURCE16} META-INF/MANIFEST.MF
|
|
|
|
touch META-INF/MANIFEST.MF
|
|
|
|
zip -u output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF
|
|
|
|
|
|
|
|
%install
|
2014-05-20 13:53:20 +02:00
|
|
|
%if 0%{?suse_version} == 1110
|
|
|
|
export NO_BRP_CHECK_BYTECODE_VERSION=true
|
|
|
|
%endif
|
2012-06-16 07:18:01 +02:00
|
|
|
# build initial path structure
|
2014-07-10 17:10:16 +02:00
|
|
|
install -d -m 0755 %{buildroot}%{_bindir}
|
|
|
|
install -d -m 0755 %{buildroot}%{_sbindir}
|
|
|
|
install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
|
2013-04-18 14:44:10 +02:00
|
|
|
|
|
|
|
%if %{with_systemd}
|
2014-07-10 17:10:16 +02:00
|
|
|
install -d -m 0755 %{buildroot}%{_unitdir}
|
2013-04-18 14:44:10 +02:00
|
|
|
%else
|
2014-07-10 17:10:16 +02:00
|
|
|
install -d -m 0755 %{buildroot}%{_initddir}
|
|
|
|
install -d -m 0755 %{buildroot}%{_sysconfdir}/logrotate.d
|
2012-06-16 07:18:01 +02:00
|
|
|
%endif
|
2013-04-18 14:44:10 +02:00
|
|
|
|
2014-07-10 17:10:16 +02:00
|
|
|
install -d -m 0755 %{buildroot}%{_localstatedir}/log/%{name}
|
|
|
|
install -d -m 0755 %{buildroot}%{appdir}
|
|
|
|
install -d -m 0755 %{buildroot}%{bindir}
|
|
|
|
install -d -m 0755 %{buildroot}%{confdir}
|
|
|
|
install -d -m 0755 %{buildroot}%{libdir}
|
|
|
|
install -d -m 0755 %{buildroot}%{logdir}
|
|
|
|
install -d -m 0755 %{buildroot}%{homedir}
|
|
|
|
install -d -m 0755 %{buildroot}%{tempdir}
|
|
|
|
install -d -m 0775 %{buildroot}%{workdir}
|
|
|
|
install -d -m 0755 %{buildroot}%{cachedir}/Catalina/localhost
|
|
|
|
install -d -m 0755 %{buildroot}/%{_sbindir}
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
# move things into place
|
|
|
|
# First copy supporting libs to tomcat lib
|
|
|
|
pushd output/build
|
2014-07-10 17:10:16 +02:00
|
|
|
cp -a bin/*.{jar,xml} %{buildroot}%{bindir}
|
|
|
|
cp %{SOURCE10} conf/log4j.properties
|
|
|
|
cp -a conf/*.{policy,properties,xml} %{buildroot}%{confdir}
|
|
|
|
cp -a lib/*.jar %{buildroot}%{libdir}
|
|
|
|
cp -a webapps/* %{buildroot}%{appdir}
|
2012-06-16 07:18:01 +02:00
|
|
|
popd
|
2013-11-04 15:49:19 +01:00
|
|
|
# bnc#847505: add missing tomcat-dbcp.jar
|
2014-07-10 17:10:16 +02:00
|
|
|
cp -a commons/dbcp/dbcp-tomcat5/commons-dbcp-tomcat5.jar %{buildroot}/%{libdir}/tomcat-dbcp.jar
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
# javadoc
|
2014-07-10 17:10:16 +02:00
|
|
|
cp -a output/dist/webapps/docs/api/* %{buildroot}%{_javadocdir}/%{name}
|
2012-06-16 07:18:01 +02:00
|
|
|
|
2014-07-10 17:10:16 +02:00
|
|
|
sed -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
|
2012-06-16 07:18:01 +02:00
|
|
|
-e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
|
2014-07-10 17:10:16 +02:00
|
|
|
-e "s|\@\@\@JAVAHOME\@\@\@|%{_sysconfdir}/alternatives/jre|g" \
|
2012-06-16 07:18:01 +02:00
|
|
|
-e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE1} \
|
2013-04-18 14:44:10 +02:00
|
|
|
> %{buildroot}%{confdir}/%{name}.conf
|
|
|
|
|
|
|
|
%if %{with_systemd}
|
2014-07-10 17:10:16 +02:00
|
|
|
install -m 0644 %{SOURCE11} \
|
2013-04-18 14:44:10 +02:00
|
|
|
%{buildroot}%{_unitdir}/%{name}.service
|
2014-07-10 17:10:16 +02:00
|
|
|
install -m 0644 %{SOURCE17} \
|
2013-04-18 14:44:10 +02:00
|
|
|
%{buildroot}%{_sbindir}/%{name}-sysd
|
2014-07-10 17:10:16 +02:00
|
|
|
install -m 0644 %{SOURCE20} \
|
2013-04-18 14:44:10 +02:00
|
|
|
%{buildroot}%{_unitdir}/%{name}-jsvc.service
|
|
|
|
(cd %{buildroot}%{_sbindir}; ln -s %{name}-sysd %{name}-jsvc-sysd)
|
2014-07-11 11:18:33 +02:00
|
|
|
ln -sf %{_sbindir}/service %{buildroot}/%{_sbindir}/rc%{name}
|
|
|
|
ln -sf %{_sbindir}/service %{buildroot}/%{_sbindir}/rc%{name}-jsvc
|
2013-04-18 14:44:10 +02:00
|
|
|
%else
|
2014-07-10 17:10:16 +02:00
|
|
|
install -m 0755 %{SOURCE2} \
|
|
|
|
%{buildroot}%{_initddir}/%{name}
|
|
|
|
ln -sf %{_initddir}/%{name} %{buildroot}/%{_sbindir}/rc%{name}
|
2012-06-16 07:18:01 +02:00
|
|
|
%endif
|
2013-04-18 14:44:10 +02:00
|
|
|
|
2014-07-10 17:10:16 +02:00
|
|
|
install -m 0755 %{SOURCE4} \
|
2013-04-18 14:44:10 +02:00
|
|
|
%{buildroot}%{_sbindir}/d%{name}
|
2013-04-19 13:53:03 +02:00
|
|
|
%if ! %{with_systemd}
|
2014-07-10 17:10:16 +02:00
|
|
|
sed -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \
|
2013-04-18 14:44:10 +02:00
|
|
|
> %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
2013-04-19 13:53:03 +02:00
|
|
|
%endif
|
2014-07-10 17:10:16 +02:00
|
|
|
sed -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
|
2012-06-16 07:18:01 +02:00
|
|
|
-e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
|
|
|
|
-e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \
|
2013-04-18 14:44:10 +02:00
|
|
|
> %{buildroot}%{_bindir}/%{name}-digest
|
2014-07-10 17:10:16 +02:00
|
|
|
sed -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
|
2012-06-16 07:18:01 +02:00
|
|
|
-e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
|
|
|
|
-e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE7} \
|
2013-04-18 14:44:10 +02:00
|
|
|
> %{buildroot}%{_bindir}/%{name}-tool-wrapper
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
# create jsp and servlet and el API symlinks
|
2013-04-18 14:44:10 +02:00
|
|
|
pushd %{buildroot}%{_javadir}
|
2014-07-10 17:10:16 +02:00
|
|
|
mv %{name}/jsp-api.jar %{name}-jsp-%{jspspec}-api.jar
|
|
|
|
ln -s %{name}-jsp-%{jspspec}-api.jar %{name}-jsp-api.jar
|
|
|
|
mv %{name}/servlet-api.jar %{name}-servlet-%{servletspec}-api.jar
|
|
|
|
ln -s %{name}-servlet-%{servletspec}-api.jar %{name}-servlet-api.jar
|
|
|
|
mv %{name}/el-api.jar %{name}-el-%{elspec}-api.jar
|
|
|
|
ln -s %{name}-el-%{elspec}-api.jar %{name}-el-api.jar
|
2012-06-16 07:18:01 +02:00
|
|
|
popd
|
|
|
|
|
|
|
|
pushd output/build
|
|
|
|
%{_bindir}/build-jar-repository lib commons-collections \
|
|
|
|
commons-dbcp commons-pool ecj 2>&1
|
|
|
|
# need to use -p here with b-j-r otherwise the examples webapp fails to
|
|
|
|
# load with a java.io.IOException
|
|
|
|
%{_bindir}/build-jar-repository -p webapps/examples/WEB-INF/lib \
|
|
|
|
taglibs-core.jar taglibs-standard.jar 2>&1
|
|
|
|
popd
|
|
|
|
|
2013-04-18 14:44:10 +02:00
|
|
|
pushd %{buildroot}%{libdir}
|
2012-06-16 07:18:01 +02:00
|
|
|
# symlink JSP and servlet and el API jars
|
2014-07-10 17:10:16 +02:00
|
|
|
ln -s ../%{name}-jsp-%{jspspec}-api.jar .
|
|
|
|
ln -s ../%{name}-servlet-%{servletspec}-api.jar .
|
|
|
|
ln -s ../%{name}-el-%{elspec}-api.jar .
|
|
|
|
ln -s $(build-classpath commons-collections) commons-collections.jar
|
|
|
|
ln -s $(build-classpath commons-dbcp) commons-dbcp.jar
|
|
|
|
ln -s $(build-classpath commons-pool) commons-pool.jar
|
|
|
|
ln -s $(build-classpath commons-pool-tomcat5) commons-pool-tomcat5.jar
|
|
|
|
ln -s $(build-classpath log4j) log4j.jar
|
|
|
|
ln -s $(build-classpath ecj) jasper-jdt.jar
|
|
|
|
|
2014-07-11 11:18:33 +02:00
|
|
|
# Temporary copy the juli jar here from %%{_datadir}/java/tomcat (for maven depmap)
|
2014-07-10 17:10:16 +02:00
|
|
|
cp -a %{buildroot}%{bindir}/tomcat-juli.jar ./
|
2012-06-16 07:18:01 +02:00
|
|
|
popd
|
|
|
|
|
|
|
|
# symlink to the FHS locations where we've installed things
|
2013-04-18 14:44:10 +02:00
|
|
|
pushd %{buildroot}%{homedir}
|
2014-07-10 17:10:16 +02:00
|
|
|
ln -s %{appdir} webapps
|
|
|
|
ln -s %{confdir} conf
|
|
|
|
ln -s %{libdir} lib
|
|
|
|
ln -s %{logdir} logs
|
|
|
|
ln -s %{tempdir} temp
|
|
|
|
ln -s %{workdir} work
|
2012-06-16 07:18:01 +02:00
|
|
|
popd
|
|
|
|
|
|
|
|
# install sample webapp
|
2014-07-10 17:10:16 +02:00
|
|
|
mkdir -p %{buildroot}%{appdir}/sample
|
2013-04-18 14:44:10 +02:00
|
|
|
pushd %{buildroot}%{appdir}/sample
|
|
|
|
%{jar} xf %{buildroot}%{appdir}/docs/appdev/sample/sample.war
|
2012-06-16 07:18:01 +02:00
|
|
|
popd
|
2013-11-04 15:49:19 +01:00
|
|
|
|
|
|
|
# Allow linking for example webapp
|
2014-07-10 17:10:16 +02:00
|
|
|
mkdir -p %{buildroot}%{appdir}/examples/META-INF
|
|
|
|
pushd %{buildroot}%{appdir}/examples/META-INF
|
2013-11-04 15:49:19 +01:00
|
|
|
echo '<?xml version="1.0" encoding="UTF-8"?>'>context.xml
|
|
|
|
echo '<Context allowLinking="true"/>'>>context.xml
|
|
|
|
popd
|
|
|
|
|
2014-07-10 17:10:16 +02:00
|
|
|
pushd %{buildroot}%{appdir}/examples/WEB-INF/lib
|
|
|
|
ln -s -f $(build-classpath jakarta-taglibs-core) jstl.jar
|
|
|
|
ln -s -f $(build-classpath jakarta-taglibs-standard) standard.jar
|
2013-11-04 15:49:19 +01:00
|
|
|
popd
|
|
|
|
|
2014-07-10 17:10:16 +02:00
|
|
|
rm %{buildroot}%{appdir}/docs/appdev/sample/sample.war
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
# Install the maven metadata
|
2014-07-10 17:10:16 +02:00
|
|
|
install -d -m 0755 %{buildroot}%{_mavenpomdir}
|
2012-06-16 07:18:01 +02:00
|
|
|
pushd output/dist/src/res/maven
|
|
|
|
for pom in *.pom; do
|
|
|
|
# fix-up version in all pom files
|
|
|
|
sed -i 's/@MAVEN.DEPLOY.VERSION@/%{version}/g' $pom
|
|
|
|
done
|
|
|
|
|
|
|
|
# we won't install dbcp, juli-adapters and juli-extras pom files
|
|
|
|
for libname in annotations-api catalina jasper-el jasper catalina-ha; do
|
2014-07-10 17:10:16 +02:00
|
|
|
cp -a %{name}-$libname.pom %{buildroot}%{_mavenpomdir}/JPP.%{name}-$libname.pom
|
2012-06-16 07:18:01 +02:00
|
|
|
%add_maven_depmap JPP.%{name}-$libname.pom %{name}/$libname.jar
|
|
|
|
done
|
|
|
|
|
|
|
|
# servlet-api jsp-api and el-api are not in tomcat subdir, since they are widely re-used elsewhere
|
2014-07-10 17:10:16 +02:00
|
|
|
cp -a tomcat-jsp-api.pom %{buildroot}%{_mavenpomdir}/JPP-tomcat-jsp-api.pom
|
2012-06-16 07:18:01 +02:00
|
|
|
%add_maven_depmap JPP-tomcat-jsp-api.pom tomcat-jsp-api.jar -f "tomcat-jsp-api" -a "javax.servlet.jsp:javax.servlet.jsp-api,javax.servlet:jsp-api"
|
|
|
|
|
2014-07-10 17:10:16 +02:00
|
|
|
cp -a tomcat-el-api.pom %{buildroot}%{_mavenpomdir}/JPP-tomcat-el-api.pom
|
2012-06-16 07:18:01 +02:00
|
|
|
%add_maven_depmap JPP-tomcat-el-api.pom tomcat-el-api.jar -f "tomcat-el-api" -a "javax.el:javax.el-api,javax.el:el-api"
|
|
|
|
|
2014-07-10 17:10:16 +02:00
|
|
|
cp -a tomcat-servlet-api.pom %{buildroot}%{_mavenpomdir}/JPP-tomcat-servlet-api.pom
|
2012-06-16 07:18:01 +02:00
|
|
|
# Generate a depmap fragment javax.servlet:servlet-api pointing to
|
|
|
|
# tomcat-servlet-3.0-api for backwards compatibility
|
|
|
|
# also provide jetty depmap (originally in jetty package, but it's cleaner to have it here
|
|
|
|
%add_maven_depmap JPP-tomcat-servlet-api.pom tomcat-servlet-api.jar -f "tomcat-servlet-api" -a "javax.servlet:servlet-api,javax.servlet:javax.servlet-api,org.mortbay.jetty:servlet-api"
|
|
|
|
|
|
|
|
# two special pom where jar files have different names
|
2014-07-10 17:10:16 +02:00
|
|
|
cp -a tomcat-tribes.pom %{buildroot}%{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom
|
2012-06-16 07:18:01 +02:00
|
|
|
%add_maven_depmap JPP.%{name}-catalina-tribes.pom %{name}/catalina-tribes.jar
|
|
|
|
|
2014-07-10 17:10:16 +02:00
|
|
|
cp -a tomcat-coyote.pom %{buildroot}%{_mavenpomdir}/JPP.%{name}-tomcat-coyote.pom
|
2013-11-04 15:49:19 +01:00
|
|
|
%add_maven_depmap JPP.%{name}-tomcat-coyote.pom %{name}/tomcat-coyote.jar
|
|
|
|
|
2014-07-10 17:10:16 +02:00
|
|
|
cp -a tomcat-juli.pom %{buildroot}%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom
|
2012-06-16 07:18:01 +02:00
|
|
|
%add_maven_depmap JPP.%{name}-tomcat-juli.pom %{name}/tomcat-juli.jar
|
|
|
|
|
2014-07-10 17:10:16 +02:00
|
|
|
cp -a tomcat-api.pom %{buildroot}%{_mavenpomdir}/JPP.%{name}-tomcat-api.pom
|
2012-06-16 07:18:01 +02:00
|
|
|
%add_maven_depmap JPP.%{name}-tomcat-api.pom %{name}/tomcat-api.jar
|
|
|
|
|
2014-07-10 17:10:16 +02:00
|
|
|
cp -a tomcat-util.pom %{buildroot}%{_mavenpomdir}/JPP.%{name}-tomcat-util.pom
|
2012-06-16 07:18:01 +02:00
|
|
|
%add_maven_depmap JPP.%{name}-tomcat-util.pom %{name}/tomcat-util.jar
|
|
|
|
|
|
|
|
# replace temporary copy with link
|
2014-07-10 17:10:16 +02:00
|
|
|
ln -s -f %{bindir}/tomcat-juli.jar %{buildroot}%{libdir}/
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
# bnc#424675
|
2014-07-10 17:10:16 +02:00
|
|
|
ln -s %{cachedir}/Catalina %{buildroot}/%{confdir}
|
|
|
|
rm -rf %{buildroot}/%{confdir}/Catalina
|
|
|
|
ln -s %{cachedir}/Catalina %{buildroot}/%{confdir}/
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
# bnc#418664
|
2013-04-18 14:44:10 +02:00
|
|
|
install -d -m 0755 %{buildroot}/%{_sysconfdir}/ant.d/
|
|
|
|
echo "%{name}/catalina-ant" > %{buildroot}/%{_sysconfdir}/ant.d/catalina-ant
|
2014-07-10 17:10:16 +02:00
|
|
|
%fdupes %{buildroot} /srv/%{name}
|
2012-06-16 07:18:01 +02:00
|
|
|
#bnc#565901
|
|
|
|
ln -sf %{_sbindir}/d%{name} %{buildroot}/%{bindir}/catalina.sh
|
|
|
|
|
2014-07-11 11:18:33 +02:00
|
|
|
# Install update-alternatives content
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
2014-07-28 08:50:13 +02:00
|
|
|
ln -sf %{_sysconfdir}/alternatives/el_api.jar %{buildroot}%{_javadir}/el_api.jar
|
|
|
|
ln -sf %{_sysconfdir}/alternatives/el_1_0_api.jar %{buildroot}%{_javadir}/el_1_0_api.jar
|
|
|
|
ln -sf %{_sysconfdir}/alternatives/jsp.jar %{buildroot}%{_javadir}/jsp.jar
|
|
|
|
ln -sf %{_sysconfdir}/alternatives/servlet.jar %{buildroot}%{_javadir}/servlet.jar
|
2014-07-11 11:18:33 +02:00
|
|
|
|
2012-06-16 07:18:01 +02:00
|
|
|
%pre
|
|
|
|
# add the tomcat user and group
|
|
|
|
%{_sbindir}/groupadd -r tomcat 2>/dev/null || :
|
|
|
|
%{_sbindir}/useradd -c "Apache Tomcat" -g tomcat \
|
|
|
|
-s /bin/sh -r -d %{homedir} tomcat 2>/dev/null || :
|
2013-04-18 14:44:10 +02:00
|
|
|
%if %{with_systemd}
|
2012-06-16 07:18:01 +02:00
|
|
|
%service_add_pre %{name}.service
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%post
|
2013-04-18 14:44:10 +02:00
|
|
|
%if %{with_systemd}
|
2012-06-16 07:18:01 +02:00
|
|
|
%service_add_post %{name}.service
|
2013-04-18 14:44:10 +02:00
|
|
|
%else
|
2014-05-20 13:53:20 +02:00
|
|
|
%{fillup_only %{name}}
|
2012-06-16 07:18:01 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%preun
|
2013-04-18 14:44:10 +02:00
|
|
|
%if %{with_systemd}
|
2012-06-16 07:18:01 +02:00
|
|
|
%service_del_preun %{name}.service
|
2014-07-11 11:18:33 +02:00
|
|
|
%else
|
|
|
|
%stop_on_removal %{name}
|
2012-06-16 07:18:01 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%postun
|
2013-04-18 14:44:10 +02:00
|
|
|
%if %{with_systemd}
|
|
|
|
%service_del_postun %{name}.service
|
|
|
|
%else
|
2012-06-16 07:18:01 +02:00
|
|
|
%insserv_cleanup
|
|
|
|
%restart_on_update %{name}
|
|
|
|
%endif
|
|
|
|
|
2014-05-20 13:53:20 +02:00
|
|
|
%if %{with_systemd}
|
2014-07-29 13:25:39 +02:00
|
|
|
|
2013-04-19 13:53:03 +02:00
|
|
|
%pre jsvc
|
2013-04-18 14:44:10 +02:00
|
|
|
%service_add_pre %{name}-jsvc.service
|
|
|
|
|
2013-04-19 13:53:03 +02:00
|
|
|
%post jsvc
|
2013-04-18 14:44:10 +02:00
|
|
|
%service_add_post %{name}-jsvc.service
|
|
|
|
|
2013-04-19 13:53:03 +02:00
|
|
|
%preun jsvc
|
2013-04-18 14:44:10 +02:00
|
|
|
%service_del_preun %{name}-jsvc.service
|
|
|
|
|
2013-04-19 13:53:03 +02:00
|
|
|
%postun jsvc
|
2013-04-18 14:44:10 +02:00
|
|
|
%service_del_postun %{name}-jsvc.service
|
2014-05-20 13:53:20 +02:00
|
|
|
%endif
|
|
|
|
|
2012-06-16 07:18:01 +02:00
|
|
|
%post el-2_2-api
|
|
|
|
%{_sbindir}/update-alternatives --install %{_javadir}/el_api.jar el_api %{_javadir}/%{name}-el-%{elspec}-api.jar 20300
|
|
|
|
%{_sbindir}/update-alternatives --install %{_javadir}/el_1_0_api.jar el_1_0_api %{_javadir}/%{name}-el-%{elspec}-api.jar 20300
|
|
|
|
|
|
|
|
%preun el-2_2-api
|
2014-07-11 11:18:33 +02:00
|
|
|
if [ $1 -eq 0 ] ; then
|
2012-06-16 07:18:01 +02:00
|
|
|
%{_sbindir}/update-alternatives --remove el_api %{_javadir}/%{name}-el-%{elspec}-api.jar
|
|
|
|
%{_sbindir}/update-alternatives --remove el_1_0_api %{_javadir}/%{name}-el-%{elspec}-api.jar
|
|
|
|
fi
|
|
|
|
|
|
|
|
%post jsp-2_2-api
|
|
|
|
%{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \
|
|
|
|
%{_javadir}/%{name}-jsp-%{jspspec}-api.jar 20200
|
|
|
|
|
|
|
|
%postun jsp-2_2-api
|
2014-07-11 11:18:33 +02:00
|
|
|
if [ $1 -eq 0 ] ; then
|
2012-06-16 07:18:01 +02:00
|
|
|
%{_sbindir}/update-alternatives --remove jsp \
|
|
|
|
%{_javadir}/%{name}-jsp-%{jspspec}-api.jar
|
|
|
|
fi
|
|
|
|
|
|
|
|
%post servlet-3_0-api
|
|
|
|
%{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet \
|
|
|
|
%{_javadir}/%{name}-servlet-%{servletspec}-api.jar 30000
|
|
|
|
|
|
|
|
%postun servlet-3_0-api
|
2014-07-11 11:18:33 +02:00
|
|
|
if [ $1 -eq 0 ] ; then
|
2012-06-16 07:18:01 +02:00
|
|
|
%{_sbindir}/update-alternatives --remove servlet \
|
|
|
|
%{_javadir}/%{name}-servlet-%{servletspec}-api.jar
|
|
|
|
fi
|
|
|
|
|
|
|
|
%post lib
|
2013-11-04 15:49:19 +01:00
|
|
|
# those links are no longer needed
|
2014-07-10 17:10:16 +02:00
|
|
|
rm -f \
|
2013-11-04 15:49:19 +01:00
|
|
|
%{libdir}/\[commons-collections-tomcat5\].jar \
|
|
|
|
%{libdir}/\[commons-dbcp-tomcat5\].jar \
|
|
|
|
%{libdir}/\[commons-pool-tomcat5\].jar \
|
|
|
|
%{libdir}/\[ecj\].jar >/dev/null 2>&1
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
%files
|
2014-07-29 13:25:39 +02:00
|
|
|
%defattr(-,root,root)
|
2012-06-16 07:18:01 +02:00
|
|
|
%doc {LICENSE,NOTICE,RELEASE*}
|
|
|
|
%attr(0755,root,root) %{_bindir}/%{name}-digest
|
|
|
|
%attr(0755,root,root) %{_bindir}/%{name}-tool-wrapper
|
|
|
|
%attr(0755,root,root) %{_sbindir}/d%{name}
|
2013-04-18 14:44:10 +02:00
|
|
|
%if %{with_systemd}
|
2012-06-16 07:18:01 +02:00
|
|
|
%attr(0644,root,root) %{_unitdir}/%{name}.service
|
|
|
|
%attr(0755,root,root) %{_sbindir}/%{name}-sysd
|
2013-04-18 14:44:10 +02:00
|
|
|
%else
|
2014-07-10 17:10:16 +02:00
|
|
|
%attr(0755,root,root) %{_initddir}/%{name}
|
2013-04-18 14:44:10 +02:00
|
|
|
%endif
|
2012-06-16 07:18:01 +02:00
|
|
|
#bnc#565901
|
2013-07-23 16:35:12 +02:00
|
|
|
%{bindir}/catalina.sh
|
2013-04-19 13:53:03 +02:00
|
|
|
%if ! %{with_systemd}
|
2012-06-16 07:18:01 +02:00
|
|
|
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
2013-04-19 13:53:03 +02:00
|
|
|
%endif
|
2012-06-16 07:18:01 +02:00
|
|
|
# bnc#726307
|
|
|
|
%attr(0775,root,tomcat) %dir %{confdir}
|
2013-07-23 16:35:12 +02:00
|
|
|
%{confdir}/Catalina
|
2012-06-16 07:18:01 +02:00
|
|
|
%config(noreplace) %{confdir}/%{name}.conf
|
|
|
|
%config(noreplace) %{confdir}/*.policy
|
|
|
|
%config(noreplace) %{confdir}/*.properties
|
|
|
|
%config(noreplace) %{confdir}/context.xml
|
|
|
|
%config(noreplace) %{confdir}/server.xml
|
|
|
|
%config(noreplace) %{confdir}/web.xml
|
|
|
|
%verify (not user group) %attr(0660,tomcat,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml
|
|
|
|
%dir %{homedir}
|
|
|
|
%dir %{bindir}
|
|
|
|
%{bindir}/bootstrap.jar
|
|
|
|
%{bindir}/catalina-tasks.xml
|
|
|
|
%{homedir}/lib
|
|
|
|
%{homedir}/temp
|
|
|
|
%{homedir}/webapps
|
|
|
|
%{homedir}/work
|
|
|
|
%{homedir}/logs
|
|
|
|
%{homedir}/conf
|
|
|
|
%dir /srv/%{name}
|
|
|
|
%{_sbindir}/rc%{name}
|
|
|
|
%{confdir}/Catalina
|
|
|
|
# tomcat group writtable dirs - bnc#625415
|
2014-07-10 17:10:16 +02:00
|
|
|
%defattr(0664,root,tomcat,0775)
|
2012-06-16 07:18:01 +02:00
|
|
|
%verify (not user group) %dir %{appdir}
|
|
|
|
%verify (not user group) %{logdir}
|
|
|
|
%verify (not user group) %{cachedir}
|
|
|
|
|
|
|
|
%files admin-webapps
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%{appdir}/host-manager
|
|
|
|
%{appdir}/manager
|
|
|
|
|
|
|
|
%files docs-webapp
|
2014-07-29 13:25:39 +02:00
|
|
|
%defattr(-,root,root)
|
2012-06-16 07:18:01 +02:00
|
|
|
%doc %{appdir}/docs
|
|
|
|
|
|
|
|
%files el-2_2-api
|
2014-07-29 13:25:39 +02:00
|
|
|
%defattr(-,root,root)
|
2012-06-16 07:18:01 +02:00
|
|
|
%{_javadir}/%{name}-el-%{elspec}-api.jar
|
|
|
|
%{_javadir}/%{name}-el-api.jar
|
|
|
|
%{libdir}/%{name}-el-%{elspec}-api.jar
|
|
|
|
%{_mavenpomdir}/JPP-%{name}-el-api.pom
|
|
|
|
%{_mavendepmapfragdir}/%{name}-tomcat-el-api
|
2014-07-19 11:35:46 +02:00
|
|
|
%{_javadir}/el_1_0_api.jar
|
|
|
|
%{_javadir}/el_api.jar
|
2014-07-11 11:18:33 +02:00
|
|
|
%ghost %{_sysconfdir}/alternatives/el_1_0_api.jar
|
|
|
|
%ghost %{_sysconfdir}/alternatives/el_api.jar
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
%files javadoc
|
2014-07-29 13:25:39 +02:00
|
|
|
%defattr(-,root,root)
|
2012-06-16 07:18:01 +02:00
|
|
|
%doc %{_javadocdir}/%{name}
|
|
|
|
|
|
|
|
%files jsp-2_2-api
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%{_javadir}/%{name}-jsp-%{jspspec}-api.jar
|
|
|
|
%{_javadir}/%{name}-jsp-api.jar
|
2014-07-19 11:35:46 +02:00
|
|
|
%{_javadir}/jsp.jar
|
2014-07-11 11:18:33 +02:00
|
|
|
%ghost %{_sysconfdir}/alternatives/jsp.jar
|
2012-06-16 07:18:01 +02:00
|
|
|
%{_mavenpomdir}/JPP-%{name}-jsp-api.pom
|
|
|
|
%{_mavendepmapfragdir}/%{name}-tomcat-jsp-api
|
|
|
|
|
|
|
|
%files lib
|
2014-07-29 13:25:39 +02:00
|
|
|
%defattr(-,root,root)
|
2012-06-16 07:18:01 +02:00
|
|
|
%{libdir}
|
|
|
|
%dir %{bindir}
|
|
|
|
%{bindir}/tomcat-juli.jar
|
|
|
|
%{_mavendepmapfragdir}/%{name}
|
|
|
|
%{_mavenpomdir}/JPP.%{name}-annotations-api.pom
|
|
|
|
%{_mavenpomdir}/JPP.%{name}-catalina-ha.pom
|
|
|
|
%{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom
|
|
|
|
%{_mavenpomdir}/JPP.%{name}-catalina.pom
|
|
|
|
%{_mavenpomdir}/JPP.%{name}-jasper-el.pom
|
|
|
|
%{_mavenpomdir}/JPP.%{name}-jasper.pom
|
|
|
|
%{_mavenpomdir}/JPP.%{name}-tomcat-api.pom
|
|
|
|
%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom
|
2013-11-04 15:49:19 +01:00
|
|
|
%{_mavenpomdir}/JPP.%{name}-tomcat-coyote.pom
|
2012-06-16 07:18:01 +02:00
|
|
|
%{_mavenpomdir}/JPP.%{name}-tomcat-util.pom
|
|
|
|
%exclude %{libdir}/%{name}-el-%{elspec}-api.jar
|
|
|
|
# bnc#418664
|
2013-04-19 15:06:53 +02:00
|
|
|
%dir %{_sysconfdir}/ant.d
|
|
|
|
%config(noreplace) %{_sysconfdir}/ant.d/catalina-ant
|
2012-06-16 07:18:01 +02:00
|
|
|
|
|
|
|
%files servlet-3_0-api
|
2014-07-29 13:25:39 +02:00
|
|
|
%defattr(-,root,root)
|
2012-06-16 07:18:01 +02:00
|
|
|
%doc LICENSE
|
|
|
|
%{_javadir}/%{name}-servlet-%{servletspec}-api.jar
|
|
|
|
%{_javadir}/%{name}-servlet-api.jar
|
2014-07-25 11:25:01 +02:00
|
|
|
%{_javadir}/servlet.jar
|
2014-07-11 11:18:33 +02:00
|
|
|
%ghost %{_sysconfdir}/alternatives/servlet.jar
|
2012-06-16 07:18:01 +02:00
|
|
|
%{_mavendepmapfragdir}/%{name}-tomcat-servlet-api
|
|
|
|
%{_mavenpomdir}/JPP-%{name}-servlet-api.pom
|
|
|
|
|
|
|
|
%files webapps
|
2014-07-29 13:25:39 +02:00
|
|
|
%defattr(-,root,root)
|
2012-06-16 07:18:01 +02:00
|
|
|
#bnc#520532
|
|
|
|
%config(noreplace) %{appdir}/ROOT
|
|
|
|
%{appdir}/examples
|
|
|
|
%{appdir}/sample
|
|
|
|
|
2013-04-18 14:44:10 +02:00
|
|
|
%if %{with_systemd}
|
2014-07-29 13:25:39 +02:00
|
|
|
|
2012-06-16 07:18:01 +02:00
|
|
|
%files jsvc
|
|
|
|
%defattr(755,root,root,0755)
|
|
|
|
%{_sbindir}/%{name}-jsvc-sysd
|
2014-07-10 17:10:16 +02:00
|
|
|
%{_sbindir}/rc%{name}-jsvc
|
2012-06-16 07:18:01 +02:00
|
|
|
%attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%changelog
|