forked from pool/tomcat
- Cleanup with spec-cleaner and format few things a bit.
OBS-URL: https://build.opensuse.org/package/show/Java:packages/tomcat?expand=0&rev=48
This commit is contained in:
parent
d82dd1d1df
commit
a106a5ac9d
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jul 10 14:57:29 UTC 2014 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Cleanup with spec-cleaner and format few things a bit.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jul 10 14:47:30 UTC 2014 - tchvatal@suse.com
|
Thu Jul 10 14:47:30 UTC 2014 - tchvatal@suse.com
|
||||||
|
|
||||||
|
277
tomcat.spec
277
tomcat.spec
@ -3,7 +3,6 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
# Copyright (c) 2000-2009, JPackage Project
|
# Copyright (c) 2000-2009, JPackage Project
|
||||||
# All rights reserved.
|
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -19,15 +18,12 @@
|
|||||||
|
|
||||||
|
|
||||||
%global with_systemd 0%{?suse_version} > 1210
|
%global with_systemd 0%{?suse_version} > 1210
|
||||||
|
|
||||||
%define jspspec 2.2
|
%define jspspec 2.2
|
||||||
%define servletspec 3.0
|
%define servletspec 3.0
|
||||||
%define elspec 2.2
|
%define elspec 2.2
|
||||||
|
|
||||||
%define major_version 7
|
%define major_version 7
|
||||||
%define minor_version 0
|
%define minor_version 0
|
||||||
%define micro_version 54
|
%define micro_version 54
|
||||||
|
|
||||||
%define packdname apache-tomcat-%{version}-src
|
%define packdname apache-tomcat-%{version}-src
|
||||||
%define tcuid 91
|
%define tcuid 91
|
||||||
# FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/
|
# FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/
|
||||||
@ -41,7 +37,6 @@
|
|||||||
%define tempdir %{cachedir}/temp
|
%define tempdir %{cachedir}/temp
|
||||||
%define workdir %{cachedir}/work
|
%define workdir %{cachedir}/work
|
||||||
%define _initrddir %{_sysconfdir}/init.d
|
%define _initrddir %{_sysconfdir}/init.d
|
||||||
|
|
||||||
Name: tomcat
|
Name: tomcat
|
||||||
Version: %{major_version}.%{minor_version}.%{micro_version}
|
Version: %{major_version}.%{minor_version}.%{micro_version}
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -49,7 +44,6 @@ Summary: Apache Servlet/JSP Engine, RI for Servlet 3.0/JSP 2.2 API
|
|||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Group: Productivity/Networking/Web/Servers
|
Group: Productivity/Networking/Web/Servers
|
||||||
Url: http://tomcat.apache.org
|
Url: http://tomcat.apache.org
|
||||||
|
|
||||||
Source0: http://www.apache.org/dist/tomcat/tomcat-%{major_version}/v%{version}/src/%{packdname}.tar.gz
|
Source0: http://www.apache.org/dist/tomcat/tomcat-%{major_version}/v%{version}/src/%{packdname}.tar.gz
|
||||||
Source1: %{name}-%{major_version}.%{minor_version}.conf
|
Source1: %{name}-%{major_version}.%{minor_version}.conf
|
||||||
Source2: %{name}-%{major_version}.%{minor_version}.init
|
Source2: %{name}-%{major_version}.%{minor_version}.init
|
||||||
@ -74,7 +68,6 @@ Source30: dbcp-tomcat-build.xml
|
|||||||
Source1000: tomcat-rpmlintrc
|
Source1000: tomcat-rpmlintrc
|
||||||
Source1001: http://www.apache.org/dist/tomcat/tomcat-%{major_version}/v%{version}/src/%{packdname}.tar.gz.asc
|
Source1001: http://www.apache.org/dist/tomcat/tomcat-%{major_version}/v%{version}/src/%{packdname}.tar.gz.asc
|
||||||
Source1002: %{name}.keyring
|
Source1002: %{name}.keyring
|
||||||
|
|
||||||
#PATCH-FIX-UPSTREAM: from jpackage.org package
|
#PATCH-FIX-UPSTREAM: from jpackage.org package
|
||||||
Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch
|
Patch0: %{name}-%{major_version}.%{minor_version}-bootstrap-MANIFEST.MF.patch
|
||||||
#PATCH-FIX-UPSTREAM: from jpackage.org package
|
#PATCH-FIX-UPSTREAM: from jpackage.org package
|
||||||
@ -83,19 +76,15 @@ Patch1: %{name}-%{major_version}.%{minor_version}-tomcat-users-webapp.pa
|
|||||||
Patch2: tomcat-7.0.52-property-build.windows.patch
|
Patch2: tomcat-7.0.52-property-build.windows.patch
|
||||||
# PATCH-FIX-UPSTREAM: https://issues.apache.org/bugzilla/show_bug.cgi?id=56373
|
# PATCH-FIX-UPSTREAM: https://issues.apache.org/bugzilla/show_bug.cgi?id=56373
|
||||||
Patch3: tomcat-7.0.53-JDTCompiler-java.patch
|
Patch3: tomcat-7.0.53-JDTCompiler-java.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
BuildRequires: ant >= 1.8.1
|
BuildRequires: ant >= 1.8.1
|
||||||
BuildRequires: ant-antlr
|
BuildRequires: ant-antlr
|
||||||
BuildRequires: ecj >= 4.2.1
|
BuildRequires: ecj >= 4.2.1
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: findutils
|
BuildRequires: findutils
|
||||||
BuildRequires: geronimo-jaf-1_0_2-api
|
BuildRequires: geronimo-jaf-1_0_2-api
|
||||||
%if 0%{?suse_version} > 1220
|
BuildRequires: geronimo-jaxrpc-1_1-api
|
||||||
BuildRequires: gpg-offline
|
BuildRequires: geronimo-qname-1_1-api
|
||||||
%endif
|
BuildRequires: geronimo-saaj-1_1-api
|
||||||
BuildRequires: jakarta-commons-collections
|
BuildRequires: jakarta-commons-collections
|
||||||
BuildRequires: jakarta-commons-daemon
|
BuildRequires: jakarta-commons-daemon
|
||||||
BuildRequires: jakarta-commons-dbcp
|
BuildRequires: jakarta-commons-dbcp
|
||||||
@ -105,29 +94,12 @@ BuildRequires: jakarta-commons-pool-tomcat5
|
|||||||
BuildRequires: jakarta-taglibs-standard >= 1.1
|
BuildRequires: jakarta-taglibs-standard >= 1.1
|
||||||
BuildRequires: java-devel >= 1.7.0
|
BuildRequires: java-devel >= 1.7.0
|
||||||
BuildRequires: javapackages-tools
|
BuildRequires: javapackages-tools
|
||||||
BuildRequires: javapackages-tools
|
|
||||||
BuildRequires: junit
|
BuildRequires: junit
|
||||||
|
BuildRequires: log4j
|
||||||
BuildRequires: sed
|
BuildRequires: sed
|
||||||
BuildRequires: unzip
|
BuildRequires: unzip
|
||||||
BuildRequires: zip
|
|
||||||
#BuildRequires: geronimo-j2ee-1_4-apis
|
|
||||||
BuildRequires: geronimo-jaxrpc-1_1-api
|
|
||||||
BuildRequires: geronimo-qname-1_1-api
|
|
||||||
BuildRequires: geronimo-saaj-1_1-api
|
|
||||||
BuildRequires: log4j
|
|
||||||
BuildRequires: wsdl4j
|
BuildRequires: wsdl4j
|
||||||
%if %{with_systemd}
|
BuildRequires: zip
|
||||||
BuildRequires: systemd
|
|
||||||
%{systemd_requires}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Recommends: libtcnative-1-0 >= 1.1.24
|
|
||||||
%if ! %{with_systemd}
|
|
||||||
Recommends: logrotate
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Requires(pre): %{_sbindir}/groupadd
|
|
||||||
Requires(pre): %{_sbindir}/useradd
|
|
||||||
Requires: %{name}-lib = %{version}-%{release}
|
Requires: %{name}-lib = %{version}-%{release}
|
||||||
Requires: jakarta-commons-daemon
|
Requires: jakarta-commons-daemon
|
||||||
Requires: jakarta-commons-dbcp
|
Requires: jakarta-commons-dbcp
|
||||||
@ -135,7 +107,21 @@ Requires: jakarta-commons-logging
|
|||||||
Requires: jakarta-commons-pool
|
Requires: jakarta-commons-pool
|
||||||
Requires: log4j
|
Requires: log4j
|
||||||
Requires(post): /sbin/chkconfig
|
Requires(post): /sbin/chkconfig
|
||||||
|
Requires(pre): %{_sbindir}/groupadd
|
||||||
|
Requires(pre): %{_sbindir}/useradd
|
||||||
Requires(preun): /sbin/chkconfig
|
Requires(preun): /sbin/chkconfig
|
||||||
|
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
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Tomcat is the servlet container that is used in the official Reference
|
Tomcat is the servlet container that is used in the official Reference
|
||||||
@ -148,8 +134,6 @@ released under the Apache Software License version 2.0. Tomcat is
|
|||||||
intended to be a collaboration of the best-of-breed developers from
|
intended to be a collaboration of the best-of-breed developers from
|
||||||
around the world.
|
around the world.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%package admin-webapps
|
%package admin-webapps
|
||||||
Summary: The host-manager and manager web applications for Apache Tomcat
|
Summary: The host-manager and manager web applications for Apache Tomcat
|
||||||
Group: Productivity/Networking/Web/Servers
|
Group: Productivity/Networking/Web/Servers
|
||||||
@ -158,8 +142,6 @@ Requires: %{name} = %{version}-%{release}
|
|||||||
%description admin-webapps
|
%description admin-webapps
|
||||||
The host-manager and manager web applications for Apache Tomcat.
|
The host-manager and manager web applications for Apache Tomcat.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%package docs-webapp
|
%package docs-webapp
|
||||||
Summary: The docs web application for Apache Tomcat
|
Summary: The docs web application for Apache Tomcat
|
||||||
Group: Productivity/Networking/Web/Servers
|
Group: Productivity/Networking/Web/Servers
|
||||||
@ -171,16 +153,15 @@ The docs web application for Apache Tomcat.
|
|||||||
%package el-2_2-api
|
%package el-2_2-api
|
||||||
Summary: Expression Language v2.2 API
|
Summary: Expression Language v2.2 API
|
||||||
Group: Development/Libraries/Java
|
Group: Development/Libraries/Java
|
||||||
|
Requires(post): %{_sbindir}/update-alternatives
|
||||||
|
Requires(preun): %{_sbindir}/update-alternatives
|
||||||
Provides: %{name}-el-%{elspec}-api = %{version}-%{release}
|
Provides: %{name}-el-%{elspec}-api = %{version}-%{release}
|
||||||
Provides: el_2_2_api = %{version}-%{release}
|
Provides: el_2_2_api = %{version}-%{release}
|
||||||
Provides: el_api = %{elspec}
|
Provides: el_api = %{elspec}
|
||||||
Requires(preun):%{_sbindir}/update-alternatives
|
|
||||||
Requires(post): %{_sbindir}/update-alternatives
|
|
||||||
|
|
||||||
%description el-2_2-api
|
%description el-2_2-api
|
||||||
Expression Language 2.2.
|
Expression Language 2.2.
|
||||||
|
|
||||||
|
|
||||||
%package javadoc
|
%package javadoc
|
||||||
Summary: Javadoc generated documentation for Apache Tomcat
|
Summary: Javadoc generated documentation for Apache Tomcat
|
||||||
Group: Productivity/Networking/Web/Servers
|
Group: Productivity/Networking/Web/Servers
|
||||||
@ -188,17 +169,15 @@ Group: Productivity/Networking/Web/Servers
|
|||||||
%description javadoc
|
%description javadoc
|
||||||
Javadoc generated documentation for Apache Tomcat.
|
Javadoc generated documentation for Apache Tomcat.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%package jsp-2_2-api
|
%package jsp-2_2-api
|
||||||
Summary: Apache Tomcat JSP API implementation classes
|
Summary: Apache Tomcat JSP API implementation classes
|
||||||
Group: Productivity/Networking/Web/Servers
|
Group: Productivity/Networking/Web/Servers
|
||||||
Provides: %{name}-jsp-%{jspspec}-api
|
|
||||||
Provides: jsp = %{jspspec}
|
|
||||||
Provides: jsp22
|
|
||||||
Requires: %{name}-servlet-%{servletspec}-api = %{version}-%{release}
|
Requires: %{name}-servlet-%{servletspec}-api = %{version}-%{release}
|
||||||
Requires(post): %{_sbindir}/update-alternatives
|
Requires(post): %{_sbindir}/update-alternatives
|
||||||
Requires(postun): %{_sbindir}/update-alternatives
|
Requires(postun): %{_sbindir}/update-alternatives
|
||||||
|
Provides: %{name}-jsp-%{jspspec}-api
|
||||||
|
Provides: jsp = %{jspspec}
|
||||||
|
Provides: jsp22
|
||||||
|
|
||||||
%description jsp-2_2-api
|
%description jsp-2_2-api
|
||||||
Apache Tomcat JSP API implementation classes
|
Apache Tomcat JSP API implementation classes
|
||||||
@ -223,32 +202,27 @@ Requires: %{name}-el-%{elspec}-api = %{version}-%{release}
|
|||||||
Requires: %{name}-jsp-%{jspspec}-api = %{version}-%{release}
|
Requires: %{name}-jsp-%{jspspec}-api = %{version}-%{release}
|
||||||
Requires: %{name}-servlet-%{servletspec}-api = %{version}-%{release}
|
Requires: %{name}-servlet-%{servletspec}-api = %{version}-%{release}
|
||||||
Requires(post): ecj >= 4.2.1
|
Requires(post): ecj >= 4.2.1
|
||||||
#Requires(post): jakarta-commons-dbcp-tomcat5
|
|
||||||
Requires(post): jakarta-commons-pool-tomcat5
|
Requires(post): jakarta-commons-pool-tomcat5
|
||||||
Requires(preun):%{__rm}
|
Requires(preun): rm
|
||||||
Provides: jakarta-commons-dbcp-tomcat5 = 1.4
|
Provides: jakarta-commons-dbcp-tomcat5 = 1.4
|
||||||
Obsoletes: jakarta-commons-dbcp-tomcat5 < 1.4
|
Obsoletes: jakarta-commons-dbcp-tomcat5 < 1.4
|
||||||
|
|
||||||
%description lib
|
%description lib
|
||||||
Libraries needed to run the Tomcat Web container
|
Libraries needed to run the Tomcat Web container
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%package servlet-3_0-api
|
%package servlet-3_0-api
|
||||||
Summary: Apache Tomcat Servlet API implementation classes
|
Summary: Apache Tomcat Servlet API implementation classes
|
||||||
Group: Productivity/Networking/Web/Servers
|
Group: Productivity/Networking/Web/Servers
|
||||||
|
Requires(post): %{_sbindir}/update-alternatives
|
||||||
|
Requires(postun): %{_sbindir}/update-alternatives
|
||||||
Provides: %{name}-servlet-%{servletspec}-api = %{version}-%{release}
|
Provides: %{name}-servlet-%{servletspec}-api = %{version}-%{release}
|
||||||
Provides: servlet = %{servletspec}
|
Provides: servlet = %{servletspec}
|
||||||
Provides: servlet30
|
Provides: servlet30
|
||||||
Provides: servlet7
|
Provides: servlet7
|
||||||
Requires(post): %{_sbindir}/update-alternatives
|
|
||||||
Requires(postun): %{_sbindir}/update-alternatives
|
|
||||||
|
|
||||||
%description servlet-3_0-api
|
%description servlet-3_0-api
|
||||||
Apache Tomcat Servlet API implementation classes
|
Apache Tomcat Servlet API implementation classes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%package webapps
|
%package webapps
|
||||||
Summary: The ROOT and examples web applications for Apache Tomcat
|
Summary: The ROOT and examples web applications for Apache Tomcat
|
||||||
Group: Productivity/Networking/Web/Servers
|
Group: Productivity/Networking/Web/Servers
|
||||||
@ -259,7 +233,6 @@ Requires(post): jakarta-taglibs-standard >= 1.1
|
|||||||
The ROOT and examples web applications for Apache Tomcat
|
The ROOT and examples web applications for Apache Tomcat
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
|
|
||||||
%if 0%{?suse_version} > 1220
|
%if 0%{?suse_version} > 1220
|
||||||
%gpg_verify %{S:1001}
|
%gpg_verify %{S:1001}
|
||||||
%endif
|
%endif
|
||||||
@ -267,11 +240,13 @@ The ROOT and examples web applications for Apache Tomcat
|
|||||||
%setup -q -n %{packdname}
|
%setup -q -n %{packdname}
|
||||||
# remove pre-built binaries and windows files
|
# remove pre-built binaries and windows files
|
||||||
find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name "*.gz" -o \
|
find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name "*.gz" -o \
|
||||||
-name "*.jar" -o -name "*.war" -o -name "*.zip" \) | xargs -t %{__rm} -f
|
-name "*.jar" -o -name "*.war" -o -name "*.zip" \) | xargs -t rm -f
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3
|
%patch3
|
||||||
|
# remove date from docs
|
||||||
|
sed -i -e '/build-date/ d' webapps/docs/tomcat-docs.xsl
|
||||||
|
|
||||||
%build
|
%build
|
||||||
#bnc847505: build all commons-dbcp-tomcat jars before tomcat
|
#bnc847505: build all commons-dbcp-tomcat jars before tomcat
|
||||||
@ -286,8 +261,8 @@ export CLASSPATH=$(build-classpath commons-pool-tomcat5)
|
|||||||
ant -f dbcp-tomcat-build.xml
|
ant -f dbcp-tomcat-build.xml
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%{__ln_s} $(build-classpath jakarta-taglibs-core) webapps/examples/WEB-INF/lib/jstl.jar
|
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
|
ln -s $(build-classpath jakarta-taglibs-standard) webapps/examples/WEB-INF/lib/standard.jar
|
||||||
|
|
||||||
export CLASSPATH=
|
export CLASSPATH=
|
||||||
export OPT_JAR_LIST="xalan-j2-serializer"
|
export OPT_JAR_LIST="xalan-j2-serializer"
|
||||||
@ -297,7 +272,7 @@ export ANT_OPTS=-Xmx500M
|
|||||||
# tomcat-dbcp.jar with jakarta-commons-{collections,dbcp,pool}-tomcat5.jar
|
# tomcat-dbcp.jar with jakarta-commons-{collections,dbcp,pool}-tomcat5.jar
|
||||||
# so just create a dummy file for later removal
|
# so just create a dummy file for later removal
|
||||||
touch HACK
|
touch HACK
|
||||||
%{__mkdir_p} HACKDIR
|
mkdir -p HACKDIR
|
||||||
touch HACKDIR/build.xml
|
touch HACKDIR/build.xml
|
||||||
|
|
||||||
ant -Dbase.path="." \
|
ant -Dbase.path="." \
|
||||||
@ -323,17 +298,17 @@ ant -Dbase.path="." \
|
|||||||
deploy dist-prepare dist-source javadoc package-java7
|
deploy dist-prepare dist-source javadoc package-java7
|
||||||
|
|
||||||
# remove some jars that we'll replace with symlinks later
|
# remove some jars that we'll replace with symlinks later
|
||||||
%{__rm} output/build/bin/commons-daemon.jar \
|
rm output/build/bin/commons-daemon.jar \
|
||||||
output/build/lib/ecj.jar \
|
output/build/lib/ecj.jar \
|
||||||
output/build/lib/*commons-dbcp.jar
|
output/build/lib/*commons-dbcp.jar
|
||||||
# remove the cruft we created
|
# remove the cruft we created
|
||||||
%{__rm} output/build/bin/tomcat-native.tar.gz
|
rm output/build/bin/tomcat-native.tar.gz
|
||||||
|
|
||||||
pushd output/dist/src/webapps/docs/appdev/sample/src
|
pushd output/dist/src/webapps/docs/appdev/sample/src
|
||||||
%{__mkdir_p} ../web/WEB-INF/classes
|
mkdir -p ../web/WEB-INF/classes
|
||||||
%{javac} -cp ../../../../../../../../output/build/lib/servlet-api.jar -d ../web/WEB-INF/classes mypackage/Hello.java
|
javac -cp ../../../../../../../../output/build/lib/servlet-api.jar -d ../web/WEB-INF/classes mypackage/Hello.java
|
||||||
pushd ../web
|
pushd ../web
|
||||||
%{jar} cf ../../../../../../../../output/build/webapps/docs/appdev/sample/sample.war *
|
jar cf ../../../../../../../../output/build/webapps/docs/appdev/sample/sample.war *
|
||||||
popd
|
popd
|
||||||
popd
|
popd
|
||||||
|
|
||||||
@ -366,49 +341,49 @@ zip -u output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF
|
|||||||
export NO_BRP_CHECK_BYTECODE_VERSION=true
|
export NO_BRP_CHECK_BYTECODE_VERSION=true
|
||||||
%endif
|
%endif
|
||||||
# build initial path structure
|
# build initial path structure
|
||||||
%{__install} -d -m 0755 %{buildroot}%{_bindir}
|
install -d -m 0755 %{buildroot}%{_bindir}
|
||||||
%{__install} -d -m 0755 %{buildroot}%{_sbindir}
|
install -d -m 0755 %{buildroot}%{_sbindir}
|
||||||
%{__install} -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
|
install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
|
||||||
|
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
%{__install} -d -m 0755 %{buildroot}%{_unitdir}
|
install -d -m 0755 %{buildroot}%{_unitdir}
|
||||||
%else
|
%else
|
||||||
%{__install} -d -m 0755 %{buildroot}%{_initrddir}
|
install -d -m 0755 %{buildroot}%{_initddir}
|
||||||
%{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/logrotate.d
|
install -d -m 0755 %{buildroot}%{_sysconfdir}/logrotate.d
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%{__install} -d -m 0755 %{buildroot}%{_localstatedir}/log/%{name}
|
install -d -m 0755 %{buildroot}%{_localstatedir}/log/%{name}
|
||||||
# sysconfig removal
|
# sysconfig removal
|
||||||
# % {__install} -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig
|
# % {__install} -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig
|
||||||
%{__install} -d -m 0755 %{buildroot}%{appdir}
|
install -d -m 0755 %{buildroot}%{appdir}
|
||||||
%{__install} -d -m 0755 %{buildroot}%{bindir}
|
install -d -m 0755 %{buildroot}%{bindir}
|
||||||
%{__install} -d -m 0755 %{buildroot}%{confdir}
|
install -d -m 0755 %{buildroot}%{confdir}
|
||||||
%{__install} -d -m 0755 %{buildroot}%{libdir}
|
install -d -m 0755 %{buildroot}%{libdir}
|
||||||
%{__install} -d -m 0755 %{buildroot}%{logdir}
|
install -d -m 0755 %{buildroot}%{logdir}
|
||||||
%{__install} -d -m 0755 %{buildroot}%{homedir}
|
install -d -m 0755 %{buildroot}%{homedir}
|
||||||
%{__install} -d -m 0755 %{buildroot}%{tempdir}
|
install -d -m 0755 %{buildroot}%{tempdir}
|
||||||
%{__install} -d -m 0775 %{buildroot}%{workdir}
|
install -d -m 0775 %{buildroot}%{workdir}
|
||||||
%{__install} -d -m 0755 %{buildroot}%{cachedir}/Catalina/localhost
|
install -d -m 0755 %{buildroot}%{cachedir}/Catalina/localhost
|
||||||
%{__install} -d -m 0755 %{buildroot}/%{_sbindir}
|
install -d -m 0755 %{buildroot}/%{_sbindir}
|
||||||
|
|
||||||
# move things into place
|
# move things into place
|
||||||
# First copy supporting libs to tomcat lib
|
# First copy supporting libs to tomcat lib
|
||||||
pushd output/build
|
pushd output/build
|
||||||
%{__cp} -a bin/*.{jar,xml} %{buildroot}%{bindir}
|
cp -a bin/*.{jar,xml} %{buildroot}%{bindir}
|
||||||
%{__cp} %{SOURCE10} conf/log4j.properties
|
cp %{SOURCE10} conf/log4j.properties
|
||||||
%{__cp} -a conf/*.{policy,properties,xml} %{buildroot}%{confdir}
|
cp -a conf/*.{policy,properties,xml} %{buildroot}%{confdir}
|
||||||
%{__cp} -a lib/*.jar %{buildroot}%{libdir}
|
cp -a lib/*.jar %{buildroot}%{libdir}
|
||||||
%{__cp} -a webapps/* %{buildroot}%{appdir}
|
cp -a webapps/* %{buildroot}%{appdir}
|
||||||
popd
|
popd
|
||||||
# bnc#847505: add missing tomcat-dbcp.jar
|
# bnc#847505: add missing tomcat-dbcp.jar
|
||||||
%{__cp} -a commons/dbcp/dbcp-tomcat5/commons-dbcp-tomcat5.jar %{buildroot}/%{libdir}/tomcat-dbcp.jar
|
cp -a commons/dbcp/dbcp-tomcat5/commons-dbcp-tomcat5.jar %{buildroot}/%{libdir}/tomcat-dbcp.jar
|
||||||
|
|
||||||
# javadoc
|
# javadoc
|
||||||
%{__cp} -a output/dist/webapps/docs/api/* %{buildroot}%{_javadocdir}/%{name}
|
cp -a output/dist/webapps/docs/api/* %{buildroot}%{_javadocdir}/%{name}
|
||||||
|
|
||||||
%{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
|
sed -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
|
||||||
-e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
|
-e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
|
||||||
-e "s|\@\@\@JAVAHOME\@\@\@|/etc/alternatives/jre|g" \
|
-e "s|\@\@\@JAVAHOME\@\@\@|%{_sysconfdir}/alternatives/jre|g" \
|
||||||
-e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE1} \
|
-e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE1} \
|
||||||
> %{buildroot}%{confdir}/%{name}.conf
|
> %{buildroot}%{confdir}/%{name}.conf
|
||||||
# sysconfig removal
|
# sysconfig removal
|
||||||
@ -417,44 +392,44 @@ popd
|
|||||||
# > %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
# > %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
||||||
|
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
%{__install} -m 0644 %{SOURCE11} \
|
install -m 0644 %{SOURCE11} \
|
||||||
%{buildroot}%{_unitdir}/%{name}.service
|
%{buildroot}%{_unitdir}/%{name}.service
|
||||||
%{__install} -m 0644 %{SOURCE17} \
|
install -m 0644 %{SOURCE17} \
|
||||||
%{buildroot}%{_sbindir}/%{name}-sysd
|
%{buildroot}%{_sbindir}/%{name}-sysd
|
||||||
%{__install} -m 0644 %{SOURCE20} \
|
install -m 0644 %{SOURCE20} \
|
||||||
%{buildroot}%{_unitdir}/%{name}-jsvc.service
|
%{buildroot}%{_unitdir}/%{name}-jsvc.service
|
||||||
(cd %{buildroot}%{_sbindir}; ln -s %{name}-sysd %{name}-jsvc-sysd)
|
(cd %{buildroot}%{_sbindir}; ln -s %{name}-sysd %{name}-jsvc-sysd)
|
||||||
ln -sf ../../sbin/service $RPM_BUILD_ROOT/%{_prefix}/sbin/rc%{name}
|
ln -sf ../../sbin/service %{buildroot}/%{_sbindir}/rc%{name}
|
||||||
|
ln -sf ../../sbin/service %{buildroot}/%{_sbindir}/rc%{name}-jsvc
|
||||||
%else
|
%else
|
||||||
%{__install} -m 0755 %{SOURCE2} \
|
install -m 0755 %{SOURCE2} \
|
||||||
%{buildroot}%{_initrddir}/%{name}
|
%{buildroot}%{_initddir}/%{name}
|
||||||
ln -sf %{_initrddir}/%{name} $RPM_BUILD_ROOT/%{_sbindir}/rc%{name}
|
ln -sf %{_initddir}/%{name} %{buildroot}/%{_sbindir}/rc%{name}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%{__install} -m 0755 %{SOURCE4} \
|
install -m 0755 %{SOURCE4} \
|
||||||
%{buildroot}%{_sbindir}/d%{name}
|
%{buildroot}%{_sbindir}/d%{name}
|
||||||
# % {__ln_s} %{name} %{buildroot}%{_sbindir}/d%{name}
|
|
||||||
%if ! %{with_systemd}
|
%if ! %{with_systemd}
|
||||||
%{__sed} -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \
|
sed -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \
|
||||||
> %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
> %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||||||
%endif
|
%endif
|
||||||
%{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
|
sed -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
|
||||||
-e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
|
-e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
|
||||||
-e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \
|
-e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \
|
||||||
> %{buildroot}%{_bindir}/%{name}-digest
|
> %{buildroot}%{_bindir}/%{name}-digest
|
||||||
%{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
|
sed -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
|
||||||
-e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
|
-e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
|
||||||
-e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE7} \
|
-e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE7} \
|
||||||
> %{buildroot}%{_bindir}/%{name}-tool-wrapper
|
> %{buildroot}%{_bindir}/%{name}-tool-wrapper
|
||||||
|
|
||||||
# create jsp and servlet and el API symlinks
|
# create jsp and servlet and el API symlinks
|
||||||
pushd %{buildroot}%{_javadir}
|
pushd %{buildroot}%{_javadir}
|
||||||
%{__mv} %{name}/jsp-api.jar %{name}-jsp-%{jspspec}-api.jar
|
mv %{name}/jsp-api.jar %{name}-jsp-%{jspspec}-api.jar
|
||||||
%{__ln_s} %{name}-jsp-%{jspspec}-api.jar %{name}-jsp-api.jar
|
ln -s %{name}-jsp-%{jspspec}-api.jar %{name}-jsp-api.jar
|
||||||
%{__mv} %{name}/servlet-api.jar %{name}-servlet-%{servletspec}-api.jar
|
mv %{name}/servlet-api.jar %{name}-servlet-%{servletspec}-api.jar
|
||||||
%{__ln_s} %{name}-servlet-%{servletspec}-api.jar %{name}-servlet-api.jar
|
ln -s %{name}-servlet-%{servletspec}-api.jar %{name}-servlet-api.jar
|
||||||
%{__mv} %{name}/el-api.jar %{name}-el-%{elspec}-api.jar
|
mv %{name}/el-api.jar %{name}-el-%{elspec}-api.jar
|
||||||
%{__ln_s} %{name}-el-%{elspec}-api.jar %{name}-el-api.jar
|
ln -s %{name}-el-%{elspec}-api.jar %{name}-el-api.jar
|
||||||
popd
|
popd
|
||||||
|
|
||||||
pushd output/build
|
pushd output/build
|
||||||
@ -468,52 +443,52 @@ popd
|
|||||||
|
|
||||||
pushd %{buildroot}%{libdir}
|
pushd %{buildroot}%{libdir}
|
||||||
# symlink JSP and servlet and el API jars
|
# symlink JSP and servlet and el API jars
|
||||||
%{__ln_s} ../%{name}-jsp-%{jspspec}-api.jar .
|
ln -s ../%{name}-jsp-%{jspspec}-api.jar .
|
||||||
%{__ln_s} ../%{name}-servlet-%{servletspec}-api.jar .
|
ln -s ../%{name}-servlet-%{servletspec}-api.jar .
|
||||||
%{__ln_s} ../%{name}-el-%{elspec}-api.jar .
|
ln -s ../%{name}-el-%{elspec}-api.jar .
|
||||||
%{__ln_s} $(build-classpath commons-collections) commons-collections.jar
|
ln -s $(build-classpath commons-collections) commons-collections.jar
|
||||||
%{__ln_s} $(build-classpath commons-dbcp) commons-dbcp.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) commons-pool.jar
|
||||||
%{__ln_s} $(build-classpath commons-pool-tomcat5) commons-pool-tomcat5.jar
|
ln -s $(build-classpath commons-pool-tomcat5) commons-pool-tomcat5.jar
|
||||||
%{__ln_s} $(build-classpath log4j) log4j.jar
|
ln -s $(build-classpath log4j) log4j.jar
|
||||||
%{__ln_s} $(build-classpath ecj) jasper-jdt.jar
|
ln -s $(build-classpath ecj) jasper-jdt.jar
|
||||||
|
|
||||||
# Temporary copy the juli jar here from /usr/share/java/tomcat (for maven depmap)
|
# Temporary copy the juli jar here from %{_datadir}/java/tomcat (for maven depmap)
|
||||||
%{__cp} -a %{buildroot}%{bindir}/tomcat-juli.jar ./
|
cp -a %{buildroot}%{bindir}/tomcat-juli.jar ./
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# symlink to the FHS locations where we've installed things
|
# symlink to the FHS locations where we've installed things
|
||||||
pushd %{buildroot}%{homedir}
|
pushd %{buildroot}%{homedir}
|
||||||
%{__ln_s} %{appdir} webapps
|
ln -s %{appdir} webapps
|
||||||
%{__ln_s} %{confdir} conf
|
ln -s %{confdir} conf
|
||||||
%{__ln_s} %{libdir} lib
|
ln -s %{libdir} lib
|
||||||
%{__ln_s} %{logdir} logs
|
ln -s %{logdir} logs
|
||||||
%{__ln_s} %{tempdir} temp
|
ln -s %{tempdir} temp
|
||||||
%{__ln_s} %{workdir} work
|
ln -s %{workdir} work
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# install sample webapp
|
# install sample webapp
|
||||||
%{__mkdir_p} %{buildroot}%{appdir}/sample
|
mkdir -p %{buildroot}%{appdir}/sample
|
||||||
pushd %{buildroot}%{appdir}/sample
|
pushd %{buildroot}%{appdir}/sample
|
||||||
%{jar} xf %{buildroot}%{appdir}/docs/appdev/sample/sample.war
|
%{jar} xf %{buildroot}%{appdir}/docs/appdev/sample/sample.war
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Allow linking for example webapp
|
# Allow linking for example webapp
|
||||||
%{__mkdir_p} ${RPM_BUILD_ROOT}%{appdir}/examples/META-INF
|
mkdir -p %{buildroot}%{appdir}/examples/META-INF
|
||||||
pushd ${RPM_BUILD_ROOT}%{appdir}/examples/META-INF
|
pushd %{buildroot}%{appdir}/examples/META-INF
|
||||||
echo '<?xml version="1.0" encoding="UTF-8"?>'>context.xml
|
echo '<?xml version="1.0" encoding="UTF-8"?>'>context.xml
|
||||||
echo '<Context allowLinking="true"/>'>>context.xml
|
echo '<Context allowLinking="true"/>'>>context.xml
|
||||||
popd
|
popd
|
||||||
|
|
||||||
pushd ${RPM_BUILD_ROOT}%{appdir}/examples/WEB-INF/lib
|
pushd %{buildroot}%{appdir}/examples/WEB-INF/lib
|
||||||
%{__ln_s} -f $(build-classpath jakarta-taglibs-core) jstl.jar
|
ln -s -f $(build-classpath jakarta-taglibs-core) jstl.jar
|
||||||
%{__ln_s} -f $(build-classpath jakarta-taglibs-standard) standard.jar
|
ln -s -f $(build-classpath jakarta-taglibs-standard) standard.jar
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%{__rm} %{buildroot}%{appdir}/docs/appdev/sample/sample.war
|
rm %{buildroot}%{appdir}/docs/appdev/sample/sample.war
|
||||||
|
|
||||||
# Install the maven metadata
|
# Install the maven metadata
|
||||||
%{__install} -d -m 0755 %{buildroot}%{_mavenpomdir}
|
install -d -m 0755 %{buildroot}%{_mavenpomdir}
|
||||||
pushd output/dist/src/res/maven
|
pushd output/dist/src/res/maven
|
||||||
for pom in *.pom; do
|
for pom in *.pom; do
|
||||||
# fix-up version in all pom files
|
# fix-up version in all pom files
|
||||||
@ -522,55 +497,53 @@ done
|
|||||||
|
|
||||||
# we won't install dbcp, juli-adapters and juli-extras pom files
|
# we won't install dbcp, juli-adapters and juli-extras pom files
|
||||||
for libname in annotations-api catalina jasper-el jasper catalina-ha; do
|
for libname in annotations-api catalina jasper-el jasper catalina-ha; do
|
||||||
%{__cp} -a %{name}-$libname.pom %{buildroot}%{_mavenpomdir}/JPP.%{name}-$libname.pom
|
cp -a %{name}-$libname.pom %{buildroot}%{_mavenpomdir}/JPP.%{name}-$libname.pom
|
||||||
%add_maven_depmap JPP.%{name}-$libname.pom %{name}/$libname.jar
|
%add_maven_depmap JPP.%{name}-$libname.pom %{name}/$libname.jar
|
||||||
done
|
done
|
||||||
|
|
||||||
# servlet-api jsp-api and el-api are not in tomcat subdir, since they are widely re-used elsewhere
|
# servlet-api jsp-api and el-api are not in tomcat subdir, since they are widely re-used elsewhere
|
||||||
%{__cp} -a tomcat-jsp-api.pom %{buildroot}%{_mavenpomdir}/JPP-tomcat-jsp-api.pom
|
cp -a tomcat-jsp-api.pom %{buildroot}%{_mavenpomdir}/JPP-tomcat-jsp-api.pom
|
||||||
%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"
|
%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"
|
||||||
|
|
||||||
%{__cp} -a tomcat-el-api.pom %{buildroot}%{_mavenpomdir}/JPP-tomcat-el-api.pom
|
cp -a tomcat-el-api.pom %{buildroot}%{_mavenpomdir}/JPP-tomcat-el-api.pom
|
||||||
%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"
|
%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"
|
||||||
|
|
||||||
%{__cp} -a tomcat-servlet-api.pom %{buildroot}%{_mavenpomdir}/JPP-tomcat-servlet-api.pom
|
cp -a tomcat-servlet-api.pom %{buildroot}%{_mavenpomdir}/JPP-tomcat-servlet-api.pom
|
||||||
# Generate a depmap fragment javax.servlet:servlet-api pointing to
|
# Generate a depmap fragment javax.servlet:servlet-api pointing to
|
||||||
# tomcat-servlet-3.0-api for backwards compatibility
|
# tomcat-servlet-3.0-api for backwards compatibility
|
||||||
# also provide jetty depmap (originally in jetty package, but it's cleaner to have it here
|
# 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"
|
%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
|
# two special pom where jar files have different names
|
||||||
%{__cp} -a tomcat-tribes.pom %{buildroot}%{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom
|
cp -a tomcat-tribes.pom %{buildroot}%{_mavenpomdir}/JPP.%{name}-catalina-tribes.pom
|
||||||
%add_maven_depmap JPP.%{name}-catalina-tribes.pom %{name}/catalina-tribes.jar
|
%add_maven_depmap JPP.%{name}-catalina-tribes.pom %{name}/catalina-tribes.jar
|
||||||
|
|
||||||
%{__cp} -a tomcat-coyote.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-coyote.pom
|
cp -a tomcat-coyote.pom %{buildroot}%{_mavenpomdir}/JPP.%{name}-tomcat-coyote.pom
|
||||||
%add_maven_depmap JPP.%{name}-tomcat-coyote.pom %{name}/tomcat-coyote.jar
|
%add_maven_depmap JPP.%{name}-tomcat-coyote.pom %{name}/tomcat-coyote.jar
|
||||||
|
|
||||||
%{__cp} -a tomcat-juli.pom %{buildroot}%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom
|
cp -a tomcat-juli.pom %{buildroot}%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom
|
||||||
%add_maven_depmap JPP.%{name}-tomcat-juli.pom %{name}/tomcat-juli.jar
|
%add_maven_depmap JPP.%{name}-tomcat-juli.pom %{name}/tomcat-juli.jar
|
||||||
|
|
||||||
%{__cp} -a tomcat-api.pom %{buildroot}%{_mavenpomdir}/JPP.%{name}-tomcat-api.pom
|
cp -a tomcat-api.pom %{buildroot}%{_mavenpomdir}/JPP.%{name}-tomcat-api.pom
|
||||||
%add_maven_depmap JPP.%{name}-tomcat-api.pom %{name}/tomcat-api.jar
|
%add_maven_depmap JPP.%{name}-tomcat-api.pom %{name}/tomcat-api.jar
|
||||||
|
|
||||||
%{__cp} -a tomcat-util.pom %{buildroot}%{_mavenpomdir}/JPP.%{name}-tomcat-util.pom
|
cp -a tomcat-util.pom %{buildroot}%{_mavenpomdir}/JPP.%{name}-tomcat-util.pom
|
||||||
%add_maven_depmap JPP.%{name}-tomcat-util.pom %{name}/tomcat-util.jar
|
%add_maven_depmap JPP.%{name}-tomcat-util.pom %{name}/tomcat-util.jar
|
||||||
|
|
||||||
# replace temporary copy with link
|
# replace temporary copy with link
|
||||||
%{__ln_s} -f %{bindir}/tomcat-juli.jar %{buildroot}%{libdir}/
|
ln -s -f %{bindir}/tomcat-juli.jar %{buildroot}%{libdir}/
|
||||||
|
|
||||||
%if %defined suse_version
|
|
||||||
# bnc#424675
|
# bnc#424675
|
||||||
%{__ln_s} %{cachedir}/Catalina %{buildroot}/%{confdir}
|
ln -s %{cachedir}/Catalina %{buildroot}/%{confdir}
|
||||||
%{__rm} -rf %{buildroot}/%{confdir}/Catalina
|
rm -rf %{buildroot}/%{confdir}/Catalina
|
||||||
%{__ln_s} %{cachedir}/Catalina %{buildroot}/%{confdir}/
|
ln -s %{cachedir}/Catalina %{buildroot}/%{confdir}/
|
||||||
|
|
||||||
# bnc#418664
|
# bnc#418664
|
||||||
install -d -m 0755 %{buildroot}/%{_sysconfdir}/ant.d/
|
install -d -m 0755 %{buildroot}/%{_sysconfdir}/ant.d/
|
||||||
echo "%{name}/catalina-ant" > %{buildroot}/%{_sysconfdir}/ant.d/catalina-ant
|
echo "%{name}/catalina-ant" > %{buildroot}/%{_sysconfdir}/ant.d/catalina-ant
|
||||||
%fdupes $RPM_BUILD_ROOT /srv/%{name}
|
%fdupes %{buildroot} /srv/%{name}
|
||||||
#bnc#565901
|
#bnc#565901
|
||||||
ln -sf %{_sbindir}/d%{name} %{buildroot}/%{bindir}/catalina.sh
|
ln -sf %{_sbindir}/d%{name} %{buildroot}/%{bindir}/catalina.sh
|
||||||
%endif
|
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
# add the tomcat user and group
|
# add the tomcat user and group
|
||||||
@ -589,7 +562,7 @@ ln -sf %{_sbindir}/d%{name} %{buildroot}/%{bindir}/catalina.sh
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ -x %{_initrddir}/%{name} ]; then
|
if [ -x %{_initddir}/%{name} ]; then
|
||||||
# clean tempdir and cachedir on removal or upgrade
|
# clean tempdir and cachedir on removal or upgrade
|
||||||
## % {__rm} -rf %{workdir}/* %{tempdir}/*
|
## % {__rm} -rf %{workdir}/* %{tempdir}/*
|
||||||
%stop_on_removal %{name}
|
%stop_on_removal %{name}
|
||||||
@ -607,6 +580,7 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
|
|
||||||
%pre jsvc
|
%pre jsvc
|
||||||
%service_add_pre %{name}-jsvc.service
|
%service_add_pre %{name}-jsvc.service
|
||||||
|
|
||||||
@ -652,7 +626,7 @@ fi
|
|||||||
|
|
||||||
%post lib
|
%post lib
|
||||||
# those links are no longer needed
|
# those links are no longer needed
|
||||||
%{__rm} -f \
|
rm -f \
|
||||||
%{libdir}/\[commons-collections-tomcat5\].jar \
|
%{libdir}/\[commons-collections-tomcat5\].jar \
|
||||||
%{libdir}/\[commons-dbcp-tomcat5\].jar \
|
%{libdir}/\[commons-dbcp-tomcat5\].jar \
|
||||||
%{libdir}/\[commons-pool-tomcat5\].jar \
|
%{libdir}/\[commons-pool-tomcat5\].jar \
|
||||||
@ -669,7 +643,7 @@ fi
|
|||||||
%attr(0644,root,root) %{_unitdir}/%{name}.service
|
%attr(0644,root,root) %{_unitdir}/%{name}.service
|
||||||
%attr(0755,root,root) %{_sbindir}/%{name}-sysd
|
%attr(0755,root,root) %{_sbindir}/%{name}-sysd
|
||||||
%else
|
%else
|
||||||
%attr(0755,root,root) %{_initrddir}/%{name}
|
%attr(0755,root,root) %{_initddir}/%{name}
|
||||||
%endif
|
%endif
|
||||||
#bnc#565901
|
#bnc#565901
|
||||||
%{bindir}/catalina.sh
|
%{bindir}/catalina.sh
|
||||||
@ -778,6 +752,7 @@ fi
|
|||||||
%files jsvc
|
%files jsvc
|
||||||
%defattr(755,root,root,0755)
|
%defattr(755,root,root,0755)
|
||||||
%{_sbindir}/%{name}-jsvc-sysd
|
%{_sbindir}/%{name}-jsvc-sysd
|
||||||
|
%{_sbindir}/rc%{name}-jsvc
|
||||||
%attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service
|
%attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user