SHA256
1
0
forked from pool/tomcat

- Update to 4.0.47

* bugfix release
  * backport of JSR-356 Java WebSocket 1.0
  * package tomcat now requires java7 at lease
- Updated tomcat.keyring to reflect the fact new release is signed by
  Violeta Georgieva / D63011C7
  see http://osdir.com/ml/dev-tomcat.apache.org/2013-10/msg00849.html
- Add tomcat-dbcp.jar (bnc#847505) back into tomcat lib dir
- Install tomcat-coyote.jar as well
- Remove pointless scriplets

OBS-URL: https://build.opensuse.org/package/show/Java:packages/tomcat?expand=0&rev=38
This commit is contained in:
2013-11-04 14:49:19 +00:00
committed by Git OBS Bridge
parent b70da65792
commit 4f8bcf7c51
10 changed files with 277 additions and 98 deletions

View File

@@ -26,7 +26,7 @@
%define major_version 7
%define minor_version 0
%define micro_version 42
%define micro_version 47
%define packdname apache-tomcat-%{version}-src
%define tcuid 91
@@ -70,6 +70,7 @@ Source15: tomcat-api-OSGi-MANIFEST.MF
Source16: tomcat-juli-OSGi-MANIFEST.MF
Source17: tomcat-7.0-tomcat-sysd
Source20: tomcat-7.0-jsvc.service
Source30: dbcp-tomcat-build.xml
Source1000: tomcat-rpmlintrc
Source1001: http://www.apache.org/dist/tomcat/tomcat-%{major_version}/v%{version}/src/%{packdname}.tar.gz.asc
Source1002: %{name}.keyring
@@ -95,9 +96,11 @@ BuildRequires: gpg-offline
BuildRequires: jakarta-commons-collections
BuildRequires: jakarta-commons-daemon
BuildRequires: jakarta-commons-dbcp
BuildRequires: jakarta-commons-dbcp-src
BuildRequires: jakarta-commons-pool
BuildRequires: jakarta-commons-pool-tomcat5
BuildRequires: jakarta-taglibs-standard >= 1.1
BuildRequires: java-devel >= 1.6.0
BuildRequires: java-devel >= 1.7.0
BuildRequires: javapackages-tools
BuildRequires: javapackages-tools
BuildRequires: junit
@@ -217,10 +220,11 @@ Requires: %{name}-el-%{elspec}-api = %{version}-%{release}
Requires: %{name}-jsp-%{jspspec}-api = %{version}-%{release}
Requires: %{name}-servlet-%{servletspec}-api = %{version}-%{release}
Requires(post): ecj >= 4.2.1
#Requires(post): jakarta-commons-collections-tomcat5
#$Requires(post): jakarta-commons-dbcp-tomcat5
#Requires(post): jakarta-commons-pool-tomcat5
#Requires(post): jakarta-commons-dbcp-tomcat5
Requires(post): jakarta-commons-pool-tomcat5
Requires(preun):%{__rm}
Provides: jakarta-commons-dbcp-tomcat5 = 1.4
Obsoletes: jakarta-commons-dbcp-tomcat5 < 1.4
%description lib
Libraries needed to run the Tomcat Web container
@@ -251,8 +255,6 @@ Requires(post): jakarta-taglibs-standard >= 1.1
%description webapps
The ROOT and examples web applications for Apache Tomcat
%prep
%if 0%{?suse_version} > 1220
@@ -268,6 +270,18 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name "
%patch2 -p1
%build
#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
%{__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
@@ -283,6 +297,7 @@ touch HACK
touch HACKDIR/build.xml
%{ant} -Dbase.path="." \
-Djava.7.home="%{java_home}" \
-Dbuild.compiler="modern" \
-Dcommons-collections.jar="$(build-classpath commons-collections)" \
-Dcommons-daemon.jar="$(build-classpath commons-daemon)" \
@@ -301,12 +316,12 @@ touch HACKDIR/build.xml
-Dno.build.dbcp=true \
-Dversion="%{version}" \
-Dversion.build="%{micro_version}" \
deploy dist-prepare dist-source javadoc
deploy dist-prepare dist-source javadoc package-java7
# remove some jars that we'll replace with symlinks later
%{__rm} output/build/bin/commons-daemon.jar \
output/build/lib/ecj.jar \
output/build/lib/commons-dbcp.jar
output/build/lib/*commons-dbcp.jar
# remove the cruft we created
%{__rm} output/build/bin/tomcat-native.tar.gz
@@ -378,6 +393,8 @@ pushd output/build
%{__cp} -a lib/*.jar %{buildroot}%{libdir}
%{__cp} -a webapps/* %{buildroot}%{appdir}
popd
# bnc#847505: add missing tomcat-dbcp.jar
%{__cp} -a commons/dbcp/dbcp-tomcat5/commons-dbcp-tomcat5.jar %{buildroot}/%{libdir}/tomcat-dbcp.jar
# javadoc
%{__cp} -a output/dist/webapps/docs/api/* %{buildroot}%{_javadocdir}/%{name}
@@ -472,6 +489,19 @@ popd
pushd %{buildroot}%{appdir}/sample
%{jar} xf %{buildroot}%{appdir}/docs/appdev/sample/sample.war
popd
# Allow linking for example webapp
%{__mkdir_p} ${RPM_BUILD_ROOT}%{appdir}/examples/META-INF
pushd ${RPM_BUILD_ROOT}%{appdir}/examples/META-INF
echo '<?xml version="1.0" encoding="UTF-8"?>'>context.xml
echo '<Context allowLinking="true"/>'>>context.xml
popd
pushd ${RPM_BUILD_ROOT}%{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
popd
%{__rm} %{buildroot}%{appdir}/docs/appdev/sample/sample.war
# Install the maven metadata
@@ -505,6 +535,9 @@ done
%{__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-coyote.pom ${RPM_BUILD_ROOT}%{_mavenpomdir}/JPP.%{name}-tomcat-coyote.pom
%add_maven_depmap JPP.%{name}-tomcat-coyote.pom %{name}/tomcat-coyote.jar
%{__cp} -a tomcat-juli.pom %{buildroot}%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom
%add_maven_depmap JPP.%{name}-tomcat-juli.pom %{name}/tomcat-juli.jar
@@ -611,24 +644,12 @@ if [ "$1" = "0" ]; then
fi
%post lib
# HACK! The commons-dbcp-tomcat5 needs the tomcat-lib to build, but tomcat
# needs this only as post/un dependency to create a symlink, not for build of
# itself. This is mainly for succesfully build, in the production case it
# should not happen!
build-jar-repository %{libdir} \
commons-collections-tomcat5 \
commons-dbcp-tomcat5 \
commons-pool-tomcat5 \
ecj 2>&1 || exit 0
%preun lib
if [ "$1" = "0" ]; then
%{__rm} -f \
%{libdir}/\[commons-collections-tomcat5\].jar \
%{libdir}/\[commons-dbcp-tomcat5\].jar \
%{libdir}/\[commons-pool-tomcat5\].jar \
%{libdir}/\[ecj\].jar >/dev/null 2>&1
fi
# those links are no longer needed
%{__rm} -f \
%{libdir}/\[commons-collections-tomcat5\].jar \
%{libdir}/\[commons-dbcp-tomcat5\].jar \
%{libdir}/\[commons-pool-tomcat5\].jar \
%{libdir}/\[ecj\].jar >/dev/null 2>&1
%files
%defattr(0644,root,root,0755)
@@ -723,6 +744,7 @@ fi
%{_mavenpomdir}/JPP.%{name}-jasper.pom
%{_mavenpomdir}/JPP.%{name}-tomcat-api.pom
%{_mavenpomdir}/JPP.%{name}-tomcat-juli.pom
%{_mavenpomdir}/JPP.%{name}-tomcat-coyote.pom
%{_mavenpomdir}/JPP.%{name}-tomcat-util.pom
%exclude %{libdir}/%{name}-el-%{elspec}-api.jar
# bnc#418664