|
|
|
@@ -18,13 +18,15 @@
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%global with_systemd 0%{?suse_version} > 1210
|
|
|
|
|
|
|
|
|
|
%define jspspec 2.2
|
|
|
|
|
%define servletspec 3.0
|
|
|
|
|
%define elspec 2.2
|
|
|
|
|
|
|
|
|
|
%define major_version 7
|
|
|
|
|
%define minor_version 0
|
|
|
|
|
%define micro_version 35
|
|
|
|
|
%define micro_version 39
|
|
|
|
|
|
|
|
|
|
%define packdname apache-tomcat-%{version}-src
|
|
|
|
|
%define tcuid 91
|
|
|
|
@@ -39,7 +41,6 @@
|
|
|
|
|
%define tempdir %{cachedir}/temp
|
|
|
|
|
%define workdir %{cachedir}/work
|
|
|
|
|
%define _initrddir %{_sysconfdir}/init.d
|
|
|
|
|
%define _systemddir /lib/systemd/system
|
|
|
|
|
|
|
|
|
|
Name: tomcat
|
|
|
|
|
Version: %{major_version}.%{minor_version}.%{micro_version}
|
|
|
|
@@ -108,12 +109,15 @@ BuildRequires: geronimo-qname-1_1-api
|
|
|
|
|
BuildRequires: geronimo-saaj-1_1-api
|
|
|
|
|
BuildRequires: log4j
|
|
|
|
|
BuildRequires: wsdl4j
|
|
|
|
|
%if 0%{?suse_version} > 1140
|
|
|
|
|
%if %{with_systemd}
|
|
|
|
|
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
|
|
|
|
@@ -123,7 +127,6 @@ Requires: jakarta-commons-dbcp
|
|
|
|
|
Requires: jakarta-commons-logging
|
|
|
|
|
Requires: jakarta-commons-pool
|
|
|
|
|
Requires: log4j
|
|
|
|
|
%{?systemd_requires}
|
|
|
|
|
Requires(post): /sbin/chkconfig
|
|
|
|
|
Requires(preun): /sbin/chkconfig
|
|
|
|
|
|
|
|
|
@@ -193,7 +196,7 @@ Requires(postun): %{_sbindir}/update-alternatives
|
|
|
|
|
%description jsp-2_2-api
|
|
|
|
|
Apache Tomcat JSP API implementation classes
|
|
|
|
|
|
|
|
|
|
%if 0%{?suse_version} > 1140
|
|
|
|
|
%if %{with_systemd}
|
|
|
|
|
%package jsvc
|
|
|
|
|
Summary: Apache jsvc wrapper for Apache Tomcat as separate service
|
|
|
|
|
Group: Productivity/Networking/Web/Servers
|
|
|
|
@@ -339,79 +342,87 @@ zip -u output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
# build initial path structure
|
|
|
|
|
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_bindir}
|
|
|
|
|
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sbindir}
|
|
|
|
|
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_javadocdir}/%{name}
|
|
|
|
|
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_initrddir}
|
|
|
|
|
%if 0%{?suse_version} > 1140
|
|
|
|
|
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_systemddir}
|
|
|
|
|
%{__install} -d -m 0755 %{buildroot}%{_bindir}
|
|
|
|
|
%{__install} -d -m 0755 %{buildroot}%{_sbindir}
|
|
|
|
|
%{__install} -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
|
|
|
|
|
|
%if %{with_systemd}
|
|
|
|
|
%{__install} -d -m 0755 %{buildroot}%{_unitdir}
|
|
|
|
|
%else
|
|
|
|
|
%{__install} -d -m 0755 %{buildroot}%{_initrddir}
|
|
|
|
|
%{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/logrotate.d
|
|
|
|
|
%endif
|
|
|
|
|
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d
|
|
|
|
|
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}
|
|
|
|
|
|
|
|
|
|
%{__install} -d -m 0755 %{buildroot}%{_localstatedir}/log/%{name}
|
|
|
|
|
# sysconfig removal
|
|
|
|
|
# % {__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
|
|
|
|
|
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{appdir}
|
|
|
|
|
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{bindir}
|
|
|
|
|
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{confdir}
|
|
|
|
|
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{libdir}
|
|
|
|
|
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{logdir}
|
|
|
|
|
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{homedir}
|
|
|
|
|
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{tempdir}
|
|
|
|
|
%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{workdir}
|
|
|
|
|
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{cachedir}/Catalina/localhost
|
|
|
|
|
%if 0%{?suse_version} > 1140
|
|
|
|
|
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_unitdir}
|
|
|
|
|
%endif
|
|
|
|
|
# % {__install} -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig
|
|
|
|
|
%{__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}
|
|
|
|
|
|
|
|
|
|
# move things into place
|
|
|
|
|
# First copy supporting libs to tomcat lib
|
|
|
|
|
pushd output/build
|
|
|
|
|
%{__cp} -a bin/*.{jar,xml} ${RPM_BUILD_ROOT}%{bindir}
|
|
|
|
|
%{__cp} -a bin/*.{jar,xml} %{buildroot}%{bindir}
|
|
|
|
|
%{__cp} %{SOURCE10} conf/log4j.properties
|
|
|
|
|
%{__cp} -a conf/*.{policy,properties,xml} ${RPM_BUILD_ROOT}%{confdir}
|
|
|
|
|
%{__cp} -a lib/*.jar ${RPM_BUILD_ROOT}%{libdir}
|
|
|
|
|
%{__cp} -a webapps/* ${RPM_BUILD_ROOT}%{appdir}
|
|
|
|
|
%{__cp} -a conf/*.{policy,properties,xml} %{buildroot}%{confdir}
|
|
|
|
|
%{__cp} -a lib/*.jar %{buildroot}%{libdir}
|
|
|
|
|
%{__cp} -a webapps/* %{buildroot}%{appdir}
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
# javadoc
|
|
|
|
|
%{__cp} -a output/dist/webapps/docs/api/* ${RPM_BUILD_ROOT}%{_javadocdir}/%{name}
|
|
|
|
|
%{__cp} -a output/dist/webapps/docs/api/* %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
|
|
|
|
|
|
%{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
|
|
|
|
|
-e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
|
|
|
|
|
-e "s|\@\@\@JAVAHOME\@\@\@|/etc/alternatives/jre|g" \
|
|
|
|
|
-e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE1} \
|
|
|
|
|
> ${RPM_BUILD_ROOT}%{confdir}/%{name}.conf
|
|
|
|
|
> %{buildroot}%{confdir}/%{name}.conf
|
|
|
|
|
# sysconfig removal
|
|
|
|
|
# % {__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
|
|
|
|
|
# -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" %{SOURCE3} \
|
|
|
|
|
# > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name}
|
|
|
|
|
%{__install} -m 0755 %{SOURCE2} \
|
|
|
|
|
${RPM_BUILD_ROOT}%{_initrddir}/%{name}
|
|
|
|
|
%{__install} -m 0755 %{SOURCE4} \
|
|
|
|
|
${RPM_BUILD_ROOT}%{_sbindir}/d%{name}
|
|
|
|
|
# % {__ln_s} %{name} ${RPM_BUILD_ROOT}%{_sbindir}/d%{name}
|
|
|
|
|
%if 0%{?suse_version} > 1140
|
|
|
|
|
# > %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
|
|
|
|
|
|
|
|
|
%if %{with_systemd}
|
|
|
|
|
%{__install} -m 0644 %{SOURCE11} \
|
|
|
|
|
${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service
|
|
|
|
|
%{buildroot}%{_unitdir}/%{name}.service
|
|
|
|
|
%{__install} -m 0644 %{SOURCE17} \
|
|
|
|
|
${RPM_BUILD_ROOT}%{_sbindir}/%{name}-sysd
|
|
|
|
|
%{buildroot}%{_sbindir}/%{name}-sysd
|
|
|
|
|
%{__install} -m 0644 %{SOURCE20} \
|
|
|
|
|
${RPM_BUILD_ROOT}%{_unitdir}/%{name}-jsvc.service
|
|
|
|
|
(cd ${RPM_BUILD_ROOT}%{_sbindir}; ln -s %{name}-sysd %{name}-jsvc-sysd)
|
|
|
|
|
%{buildroot}%{_unitdir}/%{name}-jsvc.service
|
|
|
|
|
(cd %{buildroot}%{_sbindir}; ln -s %{name}-sysd %{name}-jsvc-sysd)
|
|
|
|
|
ln -sf ../../sbin/service $RPM_BUILD_ROOT/%{_prefix}/sbin/rc%{name}
|
|
|
|
|
%else
|
|
|
|
|
%{__install} -m 0755 %{SOURCE2} \
|
|
|
|
|
%{buildroot}%{_initrddir}/%{name}
|
|
|
|
|
ln -sf %{_initrddir}/%{name} $RPM_BUILD_ROOT/%{_sbindir}/rc%{name}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%{__install} -m 0755 %{SOURCE4} \
|
|
|
|
|
%{buildroot}%{_sbindir}/d%{name}
|
|
|
|
|
# % {__ln_s} %{name} %{buildroot}%{_sbindir}/d%{name}
|
|
|
|
|
%if ! %{with_systemd}
|
|
|
|
|
%{__sed} -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \
|
|
|
|
|
> ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name}
|
|
|
|
|
> %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
|
|
|
|
%endif
|
|
|
|
|
%{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
|
|
|
|
|
-e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
|
|
|
|
|
-e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \
|
|
|
|
|
> ${RPM_BUILD_ROOT}%{_bindir}/%{name}-digest
|
|
|
|
|
> %{buildroot}%{_bindir}/%{name}-digest
|
|
|
|
|
%{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
|
|
|
|
|
-e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
|
|
|
|
|
-e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE7} \
|
|
|
|
|
> ${RPM_BUILD_ROOT}%{_bindir}/%{name}-tool-wrapper
|
|
|
|
|
> %{buildroot}%{_bindir}/%{name}-tool-wrapper
|
|
|
|
|
|
|
|
|
|
# create jsp and servlet and el API symlinks
|
|
|
|
|
pushd ${RPM_BUILD_ROOT}%{_javadir}
|
|
|
|
|
pushd %{buildroot}%{_javadir}
|
|
|
|
|
%{__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
|
|
|
|
@@ -429,7 +440,7 @@ pushd output/build
|
|
|
|
|
taglibs-core.jar taglibs-standard.jar 2>&1
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
pushd ${RPM_BUILD_ROOT}%{libdir}
|
|
|
|
|
pushd %{buildroot}%{libdir}
|
|
|
|
|
# symlink JSP and servlet and el API jars
|
|
|
|
|
%{__ln_s} ../%{name}-jsp-%{jspspec}-api.jar .
|
|
|
|
|
%{__ln_s} ../%{name}-servlet-%{servletspec}-api.jar .
|
|
|
|
@@ -440,11 +451,11 @@ pushd ${RPM_BUILD_ROOT}%{libdir}
|
|
|
|
|
%{__ln_s} $(build-classpath ecj) jasper-jdt.jar
|
|
|
|
|
|
|
|
|
|
# Temporary copy the juli jar here from /usr/share/java/tomcat (for maven depmap)
|
|
|
|
|
%{__cp} -a ${RPM_BUILD_ROOT}%{bindir}/tomcat-juli.jar ./
|
|
|
|
|
%{__cp} -a %{buildroot}%{bindir}/tomcat-juli.jar ./
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
# symlink to the FHS locations where we've installed things
|
|
|
|
|
pushd ${RPM_BUILD_ROOT}%{homedir}
|
|
|
|
|
pushd %{buildroot}%{homedir}
|
|
|
|
|
%{__ln_s} %{appdir} webapps
|
|
|
|
|
%{__ln_s} %{confdir} conf
|
|
|
|
|
%{__ln_s} %{libdir} lib
|
|
|
|
@@ -454,14 +465,14 @@ pushd ${RPM_BUILD_ROOT}%{homedir}
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
# install sample webapp
|
|
|
|
|
%{__mkdir_p} ${RPM_BUILD_ROOT}%{appdir}/sample
|
|
|
|
|
pushd ${RPM_BUILD_ROOT}%{appdir}/sample
|
|
|
|
|
%{jar} xf ${RPM_BUILD_ROOT}%{appdir}/docs/appdev/sample/sample.war
|
|
|
|
|
%{__mkdir_p} %{buildroot}%{appdir}/sample
|
|
|
|
|
pushd %{buildroot}%{appdir}/sample
|
|
|
|
|
%{jar} xf %{buildroot}%{appdir}/docs/appdev/sample/sample.war
|
|
|
|
|
popd
|
|
|
|
|
%{__rm} ${RPM_BUILD_ROOT}%{appdir}/docs/appdev/sample/sample.war
|
|
|
|
|
%{__rm} %{buildroot}%{appdir}/docs/appdev/sample/sample.war
|
|
|
|
|
|
|
|
|
|
# Install the maven metadata
|
|
|
|
|
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_mavenpomdir}
|
|
|
|
|
%{__install} -d -m 0755 %{buildroot}%{_mavenpomdir}
|
|
|
|
|
pushd output/dist/src/res/maven
|
|
|
|
|
for pom in *.pom; do
|
|
|
|
|
# fix-up version in all pom files
|
|
|
|
@@ -470,51 +481,49 @@ 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
|
|
|
|
|
%{__cp} -a %{name}-$libname.pom ${RPM_BUILD_ROOT}%{_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
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# 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 ${RPM_BUILD_ROOT}%{_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"
|
|
|
|
|
|
|
|
|
|
%{__cp} -a tomcat-el-api.pom ${RPM_BUILD_ROOT}%{_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"
|
|
|
|
|
|
|
|
|
|
%{__cp} -a tomcat-servlet-api.pom ${RPM_BUILD_ROOT}%{_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
|
|
|
|
|
# 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
|
|
|
|
|
%{__cp} -a tomcat-tribes.pom ${RPM_BUILD_ROOT}%{_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
|
|
|
|
|
|
|
|
|
|
%{__cp} -a tomcat-juli.pom ${RPM_BUILD_ROOT}%{_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
|
|
|
|
|
|
|
|
|
|
%{__cp} -a tomcat-api.pom ${RPM_BUILD_ROOT}%{_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
|
|
|
|
|
|
|
|
|
|
%{__cp} -a tomcat-util.pom ${RPM_BUILD_ROOT}%{_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
|
|
|
|
|
|
|
|
|
|
# replace temporary copy with link
|
|
|
|
|
%{__ln_s} -f %{bindir}/tomcat-juli.jar ${RPM_BUILD_ROOT}%{libdir}/
|
|
|
|
|
%{__ln_s} -f %{bindir}/tomcat-juli.jar %{buildroot}%{libdir}/
|
|
|
|
|
|
|
|
|
|
%if %defined suse_version
|
|
|
|
|
# bnc#424675
|
|
|
|
|
%{__ln_s} %{cachedir}/Catalina ${RPM_BUILD_ROOT}/%{confdir}
|
|
|
|
|
%{__ln_s} %{cachedir}/Catalina %{buildroot}/%{confdir}
|
|
|
|
|
%{__rm} -rf %{buildroot}/%{confdir}/Catalina
|
|
|
|
|
%{__ln_s} %{cachedir}/Catalina ${RPM_BUILD_ROOT}/%{confdir}/
|
|
|
|
|
%{__ln_s} %{cachedir}/Catalina %{buildroot}/%{confdir}/
|
|
|
|
|
|
|
|
|
|
# bnc#418664
|
|
|
|
|
install -d -m 0755 ${RPM_BUILD_ROOT}/%{_sysconfdir}/ant.d/
|
|
|
|
|
echo "%{name}/catalina-ant" > ${RPM_BUILD_ROOT}/%{_sysconfdir}/ant.d/catalina-ant
|
|
|
|
|
install -d -m 0755 %{buildroot}/%{_sysconfdir}/ant.d/
|
|
|
|
|
echo "%{name}/catalina-ant" > %{buildroot}/%{_sysconfdir}/ant.d/catalina-ant
|
|
|
|
|
%fdupes $RPM_BUILD_ROOT /srv/%{name}
|
|
|
|
|
install -d -m 755 $RPM_BUILD_ROOT/%{_sbindir}
|
|
|
|
|
ln -sf %{_initrddir}/%{name} $RPM_BUILD_ROOT/%{_sbindir}/rc%{name}
|
|
|
|
|
#bnc#565901
|
|
|
|
|
ln -sf %{_sbindir}/d%{name} %{buildroot}/%{bindir}/catalina.sh
|
|
|
|
|
%endif
|
|
|
|
@@ -527,31 +536,47 @@ ln -sf %{_sbindir}/d%{name} %{buildroot}/%{bindir}/catalina.sh
|
|
|
|
|
%{_sbindir}/groupadd -r tomcat 2>/dev/null || :
|
|
|
|
|
%{_sbindir}/useradd -c "Apache Tomcat" -g tomcat \
|
|
|
|
|
-s /bin/sh -r -d %{homedir} tomcat 2>/dev/null || :
|
|
|
|
|
%if 0%{?suse_version} > 1140
|
|
|
|
|
%if %{with_systemd}
|
|
|
|
|
%service_add_pre %{name}.service
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
%{fillup_and_insserv -f %{name}}
|
|
|
|
|
%if 0%{?suse_version} > 1140
|
|
|
|
|
%if %{with_systemd}
|
|
|
|
|
%service_add_post %{name}.service
|
|
|
|
|
%else
|
|
|
|
|
%{fillup_only -f %{name}}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
if [ -x %{_initrddir}/%{name} ]; then
|
|
|
|
|
# clean tempdir and cachedir on removal or upgrade
|
|
|
|
|
## % {__rm} -rf %{workdir}/* %{tempdir}/*
|
|
|
|
|
%stop_on_removal %{name}
|
|
|
|
|
%if 0%{?suse_version} > 1140
|
|
|
|
|
fi
|
|
|
|
|
%if %{with_systemd}
|
|
|
|
|
%service_del_preun %{name}.service
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
%if %{with_systemd}
|
|
|
|
|
%service_del_postun %{name}.service
|
|
|
|
|
%else
|
|
|
|
|
%insserv_cleanup
|
|
|
|
|
%restart_on_update %{name}
|
|
|
|
|
%if 0%{?suse_version} > 1140
|
|
|
|
|
%service_del_postun %{name}.service
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%pre jsvc
|
|
|
|
|
%service_add_pre %{name}-jsvc.service
|
|
|
|
|
|
|
|
|
|
%post jsvc
|
|
|
|
|
%service_add_post %{name}-jsvc.service
|
|
|
|
|
|
|
|
|
|
%preun jsvc
|
|
|
|
|
%service_del_preun %{name}-jsvc.service
|
|
|
|
|
|
|
|
|
|
%postun jsvc
|
|
|
|
|
%service_del_postun %{name}-jsvc.service
|
|
|
|
|
|
|
|
|
|
%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
|
|
|
|
@@ -609,14 +634,17 @@ fi
|
|
|
|
|
%attr(0755,root,root) %{_bindir}/%{name}-tool-wrapper
|
|
|
|
|
%attr(0755,root,root) %{_sbindir}/d%{name}
|
|
|
|
|
# % attr(0755,root,root) %{_sbindir}/%{name}
|
|
|
|
|
%if 0%{?suse_version} > 1140
|
|
|
|
|
%if %{with_systemd}
|
|
|
|
|
%attr(0644,root,root) %{_unitdir}/%{name}.service
|
|
|
|
|
%attr(0755,root,root) %{_sbindir}/%{name}-sysd
|
|
|
|
|
%endif
|
|
|
|
|
%else
|
|
|
|
|
%attr(0755,root,root) %{_initrddir}/%{name}
|
|
|
|
|
%endif
|
|
|
|
|
#bnc#565901
|
|
|
|
|
%attr(0755,root,root) %{bindir}/catalina.sh
|
|
|
|
|
%if ! %{with_systemd}
|
|
|
|
|
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
|
|
|
|
%endif
|
|
|
|
|
# sysconfig removal
|
|
|
|
|
# % config(noreplace) %{_sysconfdir}/sysconfig/%{name}
|
|
|
|
|
# bnc#726307
|
|
|
|
@@ -695,7 +723,8 @@ fi
|
|
|
|
|
%{_mavenpomdir}/JPP.%{name}-tomcat-util.pom
|
|
|
|
|
%exclude %{libdir}/%{name}-el-%{elspec}-api.jar
|
|
|
|
|
# bnc#418664
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/ant.d
|
|
|
|
|
%dir %{_sysconfdir}/ant.d
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/ant.d/catalina-ant
|
|
|
|
|
|
|
|
|
|
%files servlet-3_0-api
|
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
@@ -713,7 +742,7 @@ fi
|
|
|
|
|
%{appdir}/examples
|
|
|
|
|
%{appdir}/sample
|
|
|
|
|
|
|
|
|
|
%if 0%{?suse_version} > 1140
|
|
|
|
|
%if %{with_systemd}
|
|
|
|
|
%files jsvc
|
|
|
|
|
%defattr(755,root,root,0755)
|
|
|
|
|
%{_sbindir}/%{name}-jsvc-sysd
|
|
|
|
|