- update to 7.0.39 (bugfix release)
- install only systemd unit files on openSUSE 12.1+ * and call proper code when init script still exists - add a proper scripplets for -jsvc subpackage OBS-URL: https://build.opensuse.org/package/show/Java:packages/tomcat?expand=0&rev=22
This commit is contained in:
parent
612bc785be
commit
dcb2480abc
3
apache-tomcat-7.0.39-src.tar.gz
Normal file
3
apache-tomcat-7.0.39-src.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:d9b4daceb2040bff84dbc37ea07d442cf6b0a608b2d161f15740147fac76101d
|
||||||
|
size 4295207
|
17
apache-tomcat-7.0.39-src.tar.gz.asc
Normal file
17
apache-tomcat-7.0.39-src.tar.gz.asc
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
Version: GnuPG v1.4.9 (MingW32)
|
||||||
|
|
||||||
|
iQIcBAABAgAGBQJRTFF7AAoJEBDAHFovYFnnDm4P/ifNvkjNTbPMrDBrWGxXu5NT
|
||||||
|
nqr8P5VGeIJkLrKa5yc107rWZm7A/IJRjvaXu1rn1dz7gA+xKfCHCBjYd1VKo0h+
|
||||||
|
f0ZQVFoY592MhF73wQ5IgFFalTIVfeaydq1jTml+8cuWPUUw4Li1ejvWwF7/JPQJ
|
||||||
|
QgyDxGNQKYt6UvJrByI6nONA4PVbcPMBqt9DOxIo+JC1ToOgWVIK5IyvC3PHC+aF
|
||||||
|
sEP8izTT/8frdxvH1km1yhv7lmfmeGnjkJDUtVY4DYRCWpH4AnAGJpTZTRj65gwf
|
||||||
|
Cxjxf508mKmPrE7tRJwyCQKQcd+6M/ei0xvR3xJeOXwaxzC7cJQT36I+p9V6Hqlt
|
||||||
|
7J50CjnCyR9kbHm7bU13WJK28DBJ0QEEWtJZrfb3oolWrE5r2xmPKfPX5rfXyXz5
|
||||||
|
rhQgjs2QuvtjVNTV3pcr3ogZwhpborYYz56WG3nDA21vATjJb9FlUN87ovMgIGJH
|
||||||
|
8LHrDfJaD/0m7Btvgz1b41z7FFQcbUqJH7WUiTw8s4ala7t55vG5tsZCn9UXfCtv
|
||||||
|
5Gb7miXcz/C2aeSIyU9QpyGNPk6jw+kQjK7TgB+5J8jZlYiBmdFGVl5JIdsrMRxS
|
||||||
|
f++frff2ov8FlD4Wxqr1+5VPSHf9vPNPAbg2rXJxI+whxKQi7cf0OybNsUPJ1lDX
|
||||||
|
CJad5mKFG+WqaViAZ5Dx
|
||||||
|
=IQvN
|
||||||
|
-----END PGP SIGNATURE-----
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 18 12:23:13 UTC 2013 - mvyskocil@suse.com
|
||||||
|
|
||||||
|
- update to 7.0.39 (bugfix release)
|
||||||
|
- install only systemd unit files on openSUSE 12.1+
|
||||||
|
* and call proper code when init script still exists
|
||||||
|
- add a proper scripplets for -jsvc subpackage
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Feb 16 07:29:52 UTC 2013 - m407@mail.ru
|
Sat Feb 16 07:29:52 UTC 2013 - m407@mail.ru
|
||||||
|
|
||||||
|
180
tomcat.spec
180
tomcat.spec
@ -18,13 +18,15 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%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 35
|
%define micro_version 39
|
||||||
|
|
||||||
%define packdname apache-tomcat-%{version}-src
|
%define packdname apache-tomcat-%{version}-src
|
||||||
%define tcuid 91
|
%define tcuid 91
|
||||||
@ -39,7 +41,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
|
||||||
%define _systemddir /lib/systemd/system
|
|
||||||
|
|
||||||
Name: tomcat
|
Name: tomcat
|
||||||
Version: %{major_version}.%{minor_version}.%{micro_version}
|
Version: %{major_version}.%{minor_version}.%{micro_version}
|
||||||
@ -108,8 +109,9 @@ BuildRequires: geronimo-qname-1_1-api
|
|||||||
BuildRequires: geronimo-saaj-1_1-api
|
BuildRequires: geronimo-saaj-1_1-api
|
||||||
BuildRequires: log4j
|
BuildRequires: log4j
|
||||||
BuildRequires: wsdl4j
|
BuildRequires: wsdl4j
|
||||||
%if 0%{?suse_version} > 1140
|
%if %{with_systemd}
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
|
%{systemd_requires}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Recommends: libtcnative-1-0 >= 1.1.24
|
Recommends: libtcnative-1-0 >= 1.1.24
|
||||||
@ -123,7 +125,6 @@ Requires: jakarta-commons-dbcp
|
|||||||
Requires: jakarta-commons-logging
|
Requires: jakarta-commons-logging
|
||||||
Requires: jakarta-commons-pool
|
Requires: jakarta-commons-pool
|
||||||
Requires: log4j
|
Requires: log4j
|
||||||
%{?systemd_requires}
|
|
||||||
Requires(post): /sbin/chkconfig
|
Requires(post): /sbin/chkconfig
|
||||||
Requires(preun): /sbin/chkconfig
|
Requires(preun): /sbin/chkconfig
|
||||||
|
|
||||||
@ -193,7 +194,7 @@ Requires(postun): %{_sbindir}/update-alternatives
|
|||||||
%description jsp-2_2-api
|
%description jsp-2_2-api
|
||||||
Apache Tomcat JSP API implementation classes
|
Apache Tomcat JSP API implementation classes
|
||||||
|
|
||||||
%if 0%{?suse_version} > 1140
|
%if %{with_systemd}
|
||||||
%package jsvc
|
%package jsvc
|
||||||
Summary: Apache jsvc wrapper for Apache Tomcat as separate service
|
Summary: Apache jsvc wrapper for Apache Tomcat as separate service
|
||||||
Group: Productivity/Networking/Web/Servers
|
Group: Productivity/Networking/Web/Servers
|
||||||
@ -339,79 +340,85 @@ zip -u output/build/bin/tomcat-juli.jar META-INF/MANIFEST.MF
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
# build initial path structure
|
# build initial path structure
|
||||||
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_bindir}
|
%{__install} -d -m 0755 %{buildroot}%{_bindir}
|
||||||
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sbindir}
|
%{__install} -d -m 0755 %{buildroot}%{_sbindir}
|
||||||
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_javadocdir}/%{name}
|
%{__install} -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
|
||||||
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_initrddir}
|
|
||||||
%if 0%{?suse_version} > 1140
|
%if %{with_systemd}
|
||||||
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_systemddir}
|
%{__install} -d -m 0755 %{buildroot}%{_unitdir}
|
||||||
|
%else
|
||||||
|
%{__install} -d -m 0755 %{buildroot}%{_initrddir}
|
||||||
%endif
|
%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}%{_sysconfdir}/logrotate.d
|
||||||
|
%{__install} -d -m 0755 %{buildroot}%{_localstatedir}/log/%{name}
|
||||||
# sysconfig removal
|
# sysconfig removal
|
||||||
# % {__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
|
# % {__install} -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig
|
||||||
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{appdir}
|
%{__install} -d -m 0755 %{buildroot}%{appdir}
|
||||||
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{bindir}
|
%{__install} -d -m 0755 %{buildroot}%{bindir}
|
||||||
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{confdir}
|
%{__install} -d -m 0755 %{buildroot}%{confdir}
|
||||||
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{libdir}
|
%{__install} -d -m 0755 %{buildroot}%{libdir}
|
||||||
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{logdir}
|
%{__install} -d -m 0755 %{buildroot}%{logdir}
|
||||||
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{homedir}
|
%{__install} -d -m 0755 %{buildroot}%{homedir}
|
||||||
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{tempdir}
|
%{__install} -d -m 0755 %{buildroot}%{tempdir}
|
||||||
%{__install} -d -m 0775 ${RPM_BUILD_ROOT}%{workdir}
|
%{__install} -d -m 0775 %{buildroot}%{workdir}
|
||||||
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{cachedir}/Catalina/localhost
|
%{__install} -d -m 0755 %{buildroot}%{cachedir}/Catalina/localhost
|
||||||
%if 0%{?suse_version} > 1140
|
%{__install} -d -m 0755 %{buildroot}/%{_sbindir}
|
||||||
%{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_unitdir}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# 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} ${RPM_BUILD_ROOT}%{bindir}
|
%{__cp} -a bin/*.{jar,xml} %{buildroot}%{bindir}
|
||||||
%{__cp} %{SOURCE10} conf/log4j.properties
|
%{__cp} %{SOURCE10} conf/log4j.properties
|
||||||
%{__cp} -a conf/*.{policy,properties,xml} ${RPM_BUILD_ROOT}%{confdir}
|
%{__cp} -a conf/*.{policy,properties,xml} %{buildroot}%{confdir}
|
||||||
%{__cp} -a lib/*.jar ${RPM_BUILD_ROOT}%{libdir}
|
%{__cp} -a lib/*.jar %{buildroot}%{libdir}
|
||||||
%{__cp} -a webapps/* ${RPM_BUILD_ROOT}%{appdir}
|
%{__cp} -a webapps/* %{buildroot}%{appdir}
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# javadoc
|
# 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" \
|
%{__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\@\@\@|/etc/alternatives/jre|g" \
|
||||||
-e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE1} \
|
-e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE1} \
|
||||||
> ${RPM_BUILD_ROOT}%{confdir}/%{name}.conf
|
> %{buildroot}%{confdir}/%{name}.conf
|
||||||
# sysconfig removal
|
# sysconfig removal
|
||||||
# % {__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
|
# % {__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
|
||||||
# -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" %{SOURCE3} \
|
# -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" %{SOURCE3} \
|
||||||
# > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name}
|
# > %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
||||||
%{__install} -m 0755 %{SOURCE2} \
|
|
||||||
${RPM_BUILD_ROOT}%{_initrddir}/%{name}
|
%if %{with_systemd}
|
||||||
%{__install} -m 0755 %{SOURCE4} \
|
|
||||||
${RPM_BUILD_ROOT}%{_sbindir}/d%{name}
|
|
||||||
# % {__ln_s} %{name} ${RPM_BUILD_ROOT}%{_sbindir}/d%{name}
|
|
||||||
%if 0%{?suse_version} > 1140
|
|
||||||
%{__install} -m 0644 %{SOURCE11} \
|
%{__install} -m 0644 %{SOURCE11} \
|
||||||
${RPM_BUILD_ROOT}%{_unitdir}/%{name}.service
|
%{buildroot}%{_unitdir}/%{name}.service
|
||||||
%{__install} -m 0644 %{SOURCE17} \
|
%{__install} -m 0644 %{SOURCE17} \
|
||||||
${RPM_BUILD_ROOT}%{_sbindir}/%{name}-sysd
|
%{buildroot}%{_sbindir}/%{name}-sysd
|
||||||
%{__install} -m 0644 %{SOURCE20} \
|
%{__install} -m 0644 %{SOURCE20} \
|
||||||
${RPM_BUILD_ROOT}%{_unitdir}/%{name}-jsvc.service
|
%{buildroot}%{_unitdir}/%{name}-jsvc.service
|
||||||
(cd ${RPM_BUILD_ROOT}%{_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}
|
||||||
|
%else
|
||||||
|
%{__install} -m 0755 %{SOURCE2} \
|
||||||
|
%{buildroot}%{_initrddir}/%{name}
|
||||||
|
ln -sf %{_initrddir}/%{name} $RPM_BUILD_ROOT/%{_sbindir}/rc%{name}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%{__install} -m 0755 %{SOURCE4} \
|
||||||
|
%{buildroot}%{_sbindir}/d%{name}
|
||||||
|
# % {__ln_s} %{name} %{buildroot}%{_sbindir}/d%{name}
|
||||||
%{__sed} -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \
|
%{__sed} -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \
|
||||||
> ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/%{name}
|
> %{buildroot}%{_sysconfdir}/logrotate.d/%{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|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \
|
-e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \
|
||||||
> ${RPM_BUILD_ROOT}%{_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} \
|
||||||
> ${RPM_BUILD_ROOT}%{_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 ${RPM_BUILD_ROOT}%{_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
|
||||||
@ -429,7 +436,7 @@ pushd output/build
|
|||||||
taglibs-core.jar taglibs-standard.jar 2>&1
|
taglibs-core.jar taglibs-standard.jar 2>&1
|
||||||
popd
|
popd
|
||||||
|
|
||||||
pushd ${RPM_BUILD_ROOT}%{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 .
|
||||||
@ -440,11 +447,11 @@ pushd ${RPM_BUILD_ROOT}%{libdir}
|
|||||||
%{__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 /usr/share/java/tomcat (for maven depmap)
|
||||||
%{__cp} -a ${RPM_BUILD_ROOT}%{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 ${RPM_BUILD_ROOT}%{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
|
||||||
@ -454,14 +461,14 @@ pushd ${RPM_BUILD_ROOT}%{homedir}
|
|||||||
popd
|
popd
|
||||||
|
|
||||||
# install sample webapp
|
# install sample webapp
|
||||||
%{__mkdir_p} ${RPM_BUILD_ROOT}%{appdir}/sample
|
%{__mkdir_p} %{buildroot}%{appdir}/sample
|
||||||
pushd ${RPM_BUILD_ROOT}%{appdir}/sample
|
pushd %{buildroot}%{appdir}/sample
|
||||||
%{jar} xf ${RPM_BUILD_ROOT}%{appdir}/docs/appdev/sample/sample.war
|
%{jar} xf %{buildroot}%{appdir}/docs/appdev/sample/sample.war
|
||||||
popd
|
popd
|
||||||
%{__rm} ${RPM_BUILD_ROOT}%{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 ${RPM_BUILD_ROOT}%{_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
|
||||||
@ -470,51 +477,49 @@ 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 ${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
|
%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 ${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"
|
%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"
|
%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
|
# 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 ${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
|
%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
|
%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
|
%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
|
%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 ${RPM_BUILD_ROOT}%{libdir}/
|
%{__ln_s} -f %{bindir}/tomcat-juli.jar %{buildroot}%{libdir}/
|
||||||
|
|
||||||
%if %defined suse_version
|
%if %defined suse_version
|
||||||
# bnc#424675
|
# bnc#424675
|
||||||
%{__ln_s} %{cachedir}/Catalina ${RPM_BUILD_ROOT}/%{confdir}
|
%{__ln_s} %{cachedir}/Catalina %{buildroot}/%{confdir}
|
||||||
%{__rm} -rf %{buildroot}/%{confdir}/Catalina
|
%{__rm} -rf %{buildroot}/%{confdir}/Catalina
|
||||||
%{__ln_s} %{cachedir}/Catalina ${RPM_BUILD_ROOT}/%{confdir}/
|
%{__ln_s} %{cachedir}/Catalina %{buildroot}/%{confdir}/
|
||||||
|
|
||||||
# bnc#418664
|
# bnc#418664
|
||||||
install -d -m 0755 ${RPM_BUILD_ROOT}/%{_sysconfdir}/ant.d/
|
install -d -m 0755 %{buildroot}/%{_sysconfdir}/ant.d/
|
||||||
echo "%{name}/catalina-ant" > ${RPM_BUILD_ROOT}/%{_sysconfdir}/ant.d/catalina-ant
|
echo "%{name}/catalina-ant" > %{buildroot}/%{_sysconfdir}/ant.d/catalina-ant
|
||||||
%fdupes $RPM_BUILD_ROOT /srv/%{name}
|
%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
|
#bnc#565901
|
||||||
ln -sf %{_sbindir}/d%{name} %{buildroot}/%{bindir}/catalina.sh
|
ln -sf %{_sbindir}/d%{name} %{buildroot}/%{bindir}/catalina.sh
|
||||||
%endif
|
%endif
|
||||||
@ -527,31 +532,47 @@ ln -sf %{_sbindir}/d%{name} %{buildroot}/%{bindir}/catalina.sh
|
|||||||
%{_sbindir}/groupadd -r tomcat 2>/dev/null || :
|
%{_sbindir}/groupadd -r tomcat 2>/dev/null || :
|
||||||
%{_sbindir}/useradd -c "Apache Tomcat" -g tomcat \
|
%{_sbindir}/useradd -c "Apache Tomcat" -g tomcat \
|
||||||
-s /bin/sh -r -d %{homedir} tomcat 2>/dev/null || :
|
-s /bin/sh -r -d %{homedir} tomcat 2>/dev/null || :
|
||||||
%if 0%{?suse_version} > 1140
|
%if %{with_systemd}
|
||||||
%service_add_pre %{name}.service
|
%service_add_pre %{name}.service
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%{fillup_and_insserv -f %{name}}
|
%if %{with_systemd}
|
||||||
%if 0%{?suse_version} > 1140
|
|
||||||
%service_add_post %{name}.service
|
%service_add_post %{name}.service
|
||||||
|
%else
|
||||||
|
%{fillup_only -f %{name}}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
|
if [ -x %{_initrddir}/%{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}
|
||||||
%if 0%{?suse_version} > 1140
|
fi
|
||||||
|
%if %{with_systemd}
|
||||||
%service_del_preun %{name}.service
|
%service_del_preun %{name}.service
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
|
%if %{with_systemd}
|
||||||
|
%service_del_postun %{name}.service
|
||||||
|
%else
|
||||||
%insserv_cleanup
|
%insserv_cleanup
|
||||||
%restart_on_update %{name}
|
%restart_on_update %{name}
|
||||||
%if 0%{?suse_version} > 1140
|
|
||||||
%service_del_postun %{name}.service
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%pre
|
||||||
|
%service_add_pre %{name}-jsvc.service
|
||||||
|
|
||||||
|
%post
|
||||||
|
%service_add_post %{name}-jsvc.service
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%service_del_preun %{name}-jsvc.service
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%service_del_postun %{name}-jsvc.service
|
||||||
|
|
||||||
%post el-2_2-api
|
%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_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
|
%{_sbindir}/update-alternatives --install %{_javadir}/el_1_0_api.jar el_1_0_api %{_javadir}/%{name}-el-%{elspec}-api.jar 20300
|
||||||
@ -609,11 +630,12 @@ fi
|
|||||||
%attr(0755,root,root) %{_bindir}/%{name}-tool-wrapper
|
%attr(0755,root,root) %{_bindir}/%{name}-tool-wrapper
|
||||||
%attr(0755,root,root) %{_sbindir}/d%{name}
|
%attr(0755,root,root) %{_sbindir}/d%{name}
|
||||||
# % attr(0755,root,root) %{_sbindir}/%{name}
|
# % attr(0755,root,root) %{_sbindir}/%{name}
|
||||||
%if 0%{?suse_version} > 1140
|
%if %{with_systemd}
|
||||||
%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
|
||||||
%endif
|
%else
|
||||||
%attr(0755,root,root) %{_initrddir}/%{name}
|
%attr(0755,root,root) %{_initrddir}/%{name}
|
||||||
|
%endif
|
||||||
#bnc#565901
|
#bnc#565901
|
||||||
%attr(0755,root,root) %{bindir}/catalina.sh
|
%attr(0755,root,root) %{bindir}/catalina.sh
|
||||||
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||||
@ -713,7 +735,7 @@ fi
|
|||||||
%{appdir}/examples
|
%{appdir}/examples
|
||||||
%{appdir}/sample
|
%{appdir}/sample
|
||||||
|
|
||||||
%if 0%{?suse_version} > 1140
|
%if %{with_systemd}
|
||||||
%files jsvc
|
%files jsvc
|
||||||
%defattr(755,root,root,0755)
|
%defattr(755,root,root,0755)
|
||||||
%{_sbindir}/%{name}-jsvc-sysd
|
%{_sbindir}/%{name}-jsvc-sysd
|
||||||
|
Loading…
x
Reference in New Issue
Block a user