SPECS: apache-tomcat.spec - builds again, revised symlinks

glen glen at pld-linux.org
Fri Dec 7 19:58:13 CET 2007


Author: glen                         Date: Fri Dec  7 18:58:13 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- builds again, revised symlinks

---- Files affected:
SPECS:
   apache-tomcat.spec (1.54 -> 1.55) 

---- Diffs:

================================================================
Index: SPECS/apache-tomcat.spec
diff -u SPECS/apache-tomcat.spec:1.54 SPECS/apache-tomcat.spec:1.55
--- SPECS/apache-tomcat.spec:1.54	Sun Dec  2 23:41:47 2007
+++ SPECS/apache-tomcat.spec	Fri Dec  7 19:58:08 2007
@@ -1,4 +1,7 @@
 # $Revision$, $Date$
+# TODO
+# - packages for *.renametojar files (-cgi and -ssi in server/lib)
+#
 # Conditional build:
 %bcond_without	javadoc	# skip building javadocs
 #
@@ -6,7 +9,7 @@
 Summary(pl.UTF-8):	Silnik Servlet/JSP Apache będący wzorcową implementacją API Servlet 2.4/JSP 2.0
 Name:		apache-tomcat
 Version:	5.5.23
-Release:	0.1
+Release:	0.2
 License:	Apache
 Group:		Development/Languages/Java
 Source0:	http://www.apache.org/dist/tomcat/tomcat-5/v%{version}/src/%{name}-%{version}-src.tar.gz
@@ -18,6 +21,7 @@
 Patch3:		%{name}-skip-jdt.patch
 Patch4:		%{name}-no-connectors.patch
 Patch5:		%{name}-nowrite.patch
+Patch6:		%{name}-dbcp.patch
 URL:		http://tomcat.apache.org/
 BuildRequires:	ant >= 1.5.3
 BuildRequires:	ant-trax
@@ -70,11 +74,13 @@
 Requires(pre):	/usr/sbin/useradd
 Requires:	jaas
 #Requires:	jaf >= 1.0.1
-Requires:	jakarta-commons-beanutils
-Requires:	jakarta-commons-collections
-Requires:	jakarta-commons-digester
-Requires:	jakarta-commons-fileupload
-Requires:	jakarta-commons-logging
+#Requires:	jakarta-commons-beanutils
+#Requires:	jakarta-commons-collections
+#Requires:	jakarta-commons-dbcp-tomcat5
+#Requires:	jakarta-commons-digester
+Requires:	jakarta-commons-el
+#Requires:	jakarta-commons-fileupload
+#Requires:	jakarta-commons-logging
 Requires:	jakarta-regexp
 Requires:	jakarta-servletapi >= 4
 Requires:	javamail >= 1.2
@@ -135,6 +141,7 @@
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 # servletapi built from jakarta-servletapi5.spec
 rm -rf servletapi
@@ -145,27 +152,24 @@
 %build
 TOPDIR=$(pwd)
 
-mkdir -p tomcat-deps
-> tomcat-deps/tomcat-dbcp.jar
-
 %if 0
 # build jasper javadocs
 cd jasper
 CLASSPATH=$(build-classpath xml-commons-apis)
+# building jasper needs eclipse classes
 cat > build.properties <<EOF
-ant.jar=$(build-classpath ant)
-servlet-api.jar=$(build-classpath servlet-api)
-jsp-api.jar=$(build-classpath jsp-api)
+ant.jar=$(find-jar ant)
+servlet-api.jar=$(find-jar servlet-api)
+jsp-api.jar=$(find-jar jsp-api)
 tools.jar=%{java_home}/lib/tools.jar
-xercesImpl.jar=$(build-classpath jaxp_parser_impl)
-xmlParserAPIs.jar=$(build-classpath xml-commons-apis)
-commons-collections.jar=$(build-classpath commons-collections)
-commons-logging.jar=$(build-classpath commons-logging)
-commons-daemon.jar=$(build-classpath commons-daemon)
-junit.jar=$(build-classpath junit)
-commons-el.jar=$(build-classpath commons-el)
+xercesImpl.jar=$(find-jar jaxp_parser_impl)
+xmlParserAPIs.jar=$(find-jar xml-commons-apis)
+commons-collections.jar=$(find-jar commons-collections)
+commons-logging.jar=$(find-jar commons-logging)
+commons-daemon.jar=$(find-jar commons-daemon)
+junit.jar=$(find-jar junit)
+commons-el.jar=$(find-jar commons-el)
 EOF
-# building jasper needs eclipse classes
 #%ant dist
 
 %if %{with javadoc}
@@ -179,43 +183,36 @@
 
 # build tomcat 5.5
 cat > build.properties <<EOF
-commons-beanutils.jar=$(build-classpath commons-beanutils)
-commons-launcher.jar=$(build-classpath commons-launcher)
-commons-daemon.jar=$(build-classpath commons-daemon)
-commons-digester.jar=$(build-classpath commons-digester)
-commons-el.jar=$(build-classpath commons-el)
-commons-logging-api.jar=$(build-classpath commons-logging-api)
-commons-logging.jar=$(build-classpath commons-logging)
-commons-modeler.jar=$(build-classpath commons-modeler)
-xercesImpl.jar=$(build-classpath jaxp_parser_impl)
-xml-apis.jar=$(build-classpath xml-commons-apis)
-jdt.jar=$(build-classpath org.eclipse.jdt.core)
+commons-beanutils.jar=$(find-jar commons-beanutils)
+commons-launcher.jar=$(find-jar commons-launcher)
+commons-daemon.jar=$(find-jar commons-daemon)
+commons-digester.jar=$(find-jar commons-digester)
+commons-el.jar=$(find-jar commons-el)
+commons-logging-api.jar=$(find-jar commons-logging-api)
+commons-logging.jar=$(find-jar commons-logging)
+commons-modeler.jar=$(find-jar commons-modeler)
+xercesImpl.jar=$(find-jar jaxp_parser_impl)
+xml-apis.jar=$(find-jar xml-commons-apis)
+jdt.jar=$(find-jar org.eclipse.jdt.core)
 jasper-compiler-jdt.home=$TOPDIR/tomcat-deps
-commons-httpclient.jar=$(build-classpath commons-httpclient)
-commons-collections.jar=$(build-classpath commons-collections)
-commons-fileupload.jar=$(build-classpath commons-fileupload)
-jmx.jar=$(build-classpath jmx)
-jmx-tools.jar=$(build-classpath jmx)
-junit.jar=$(build-classpath junit)
-struts.jar=$(build-classpath struts)
-jcert.jar=$(build-classpath java/jcert)
-jnet.jar=$(build-classpath java/jnet)
-jsse.jar=$(build-classpath java/jsse)
-jta.jar=$(build-classpath jta)
-puretls.jar=$(build-classpath puretls)
-servlet-api.jar=$(build-classpath servlet-api)
+commons-httpclient.jar=$(find-jar commons-httpclient)
+commons-collections.jar=$(find-jar commons-collections)
+commons-fileupload.jar=$(find-jar commons-fileupload)
+jmx.jar=$(find-jar jmx)
+jmx-tools.jar=$(find-jar jmx)
+junit.jar=$(find-jar junit)
+struts.jar=$(find-jar struts)
+jcert.jar=$(find-jar jcert)
+jnet.jar=$(find-jar jnet)
+jsse.jar=$(find-jar jsse)
+jta.jar=$(find-jar jta)
+puretls.jar=$(find-jar puretls)
+servlet-api.jar=$(find-jar servlet-api)
 servletapi.build.notrequired=true
-jsp-api.jar=$(build-classpath jsp-api)
+jsp-api.jar=$(find-jar jsp-api)
 jspapi.build.notrequired=true
-log4j.jar=$(build-classpath log4j)
-# source is needed because source is copied modified and recompiled as tomcat jar
-# see <target name="-build-tomcat-dbcp"> in build/build.xml
-commons-collections.home=%{_prefix}/src/jakarta-commons-collections-3.1
-commons-pool.home=%{_prefix}/src/jakarta-commons-pool-1.3
-commons-dbcp.home=%{_prefix}/src/jakarta-commons-dbcp-1.2.1
-tomcat-dbcp.home=$TOPDIR/tomcat-deps
-# err, it compiles three above and then appends to the jar, so the file should exist
-tomcat-dbcp.jar=$TOPDIR/tomcat-deps/tomcat-dbcp.jar
+log4j.jar=$(find-jar log4j)
+tomcat-dbcp.jar=$(find-jar jakarta-commons-dbcp-tomcat5)
 EOF
 
 %ant \
@@ -231,7 +228,7 @@
 rm -f bin/*.bat
 
 randpw=$(echo $RANDOM$$ | md5sum | cut -c 1-15)
-sed -i -e s:SHUTDOWN:${randpw}: conf/{server,server-minimal}.xml
+%{__sed} -i -e "s:SHUTDOWN:${randpw}:" conf/{server,server-minimal}.xml
 
 install -d $TOMCATDIR/bin \
 	    $TOMCATDIR/common/{lib,classes,endorsed} \
@@ -247,56 +244,61 @@
 cp -pR conf/* $RPM_BUILD_ROOT%{_sysconfdir}
 cp -HR bin common server $TOMCATDIR
 
-cp -rf  server/webapps	$TOMCATDIR/server
-cp -rf  webapps 		$TOMCATDIR
-cp -rf	shared		$TOMCATDIR
-cp -rf	temp		$TOMCATDIR
-
-ln -sf %{_logdir}/tomcat	$TOMCATDIR/logs
-ln -sf %{_vardir}/work		$TOMCATDIR/work
-ln -sf %{_sysconfdir}	$TOMCATDIR/conf
+cp -rf server/webapps $TOMCATDIR/server
+cp -rf webapps $TOMCATDIR
+cp -rf shared $TOMCATDIR
+cp -rf temp $TOMCATDIR
+
+ln -sf %{_logdir}/tomcat $TOMCATDIR/logs
+ln -sf %{_vardir}/work $TOMCATDIR/work
+ln -sf %{_sysconfdir} $TOMCATDIR/conf
 
 # symlinks instead of copies
-ln -sf %{_javadir}/commons-daemon.jar	$TOMCATDIR/bin
+ln -sf $(find-jar commons-el) $TOMCATDIR/common/lib/commons-el.jar
+ln -sf $(find-jar jakarta-commons-dbcp-tomcat5) $TOMCATDIR/common/lib/jakarta-commons-dbcp-tomcat5.jar
+ln -sf $(find-jar servlet-api) $TOMCATDIR/common/lib/servlet-api.jar
 
-ln -sf %{_javadir}/activation.jar		$TOMCATDIR/common/lib
-ln -sf %{_javadir}/ant.jar			$TOMCATDIR/common/lib
-ln -sf %{_javadir}/commons-collections.jar	$TOMCATDIR/common/lib
-ln -sf %{_javadir}/commons-dbcp.jar		$TOMCATDIR/common/lib
-ln -sf %{_javadir}/commons-logging-api.jar	$TOMCATDIR/common/lib
-ln -sf %{_javadir}/commons-pool.jar		$TOMCATDIR/common/lib
-ln -sf %{_javadir}/servlet.jar		$TOMCATDIR/common/lib
-ln -sf %{_javadir}/servlet.jar		$TOMCATDIR/common/lib/servletapi4.jar
-ln -sf %{_javadir}/jdbc-stdext.jar		$TOMCATDIR/common/lib/jdbc2_0-stdext.jar
-ln -sf %{_javadir}/jdbc-stdext.jar		$TOMCATDIR/common/lib/jdbc-stdext-2.0.jar
-ln -sf %{_javadir}/jmxri.jar			$TOMCATDIR/common/lib
-ln -sf %{_javadir}/jndi.jar			$TOMCATDIR/common/lib
-ln -sf %{_javadir}/jta.jar			$TOMCATDIR/common/lib
-ln -sf %{_javadir}/mail.jar			$TOMCATDIR/common/lib
-ln -sf %{_javadir}/jsse.jar			$TOMCATDIR/common/lib
-ln -sf %{_javadir}/junit.jar			$TOMCATDIR/common/lib
-
-ln -sf %{_javadir}/mailapi.jar		$TOMCATDIR/common/lib
-ln -sf %{_javadir}/pop3.jar			$TOMCATDIR/common/lib
-ln -sf %{_javadir}/pop3.jar			$TOMCATDIR/common/lib/pop.jar
-ln -sf %{_javadir}/smtp.jar			$TOMCATDIR/common/lib
-ln -sf %{_javadir}/imap.jar			$TOMCATDIR/common/lib
-
-ln -sf %{_javadir}/commons-beanutils.jar	$TOMCATDIR/server/lib
-ln -sf %{_javadir}/commons-digester.jar	$TOMCATDIR/server/lib
-ln -sf %{_javadir}/commons-fileupload.jar	$TOMCATDIR/server/lib
-ln -sf %{_javadir}/commons-logging.jar	$TOMCATDIR/server/lib
-ln -sf %{_javadir}/commons-modeler.jar	$TOMCATDIR/server/lib
-ln -sf %{_javadir}/jaas.jar			$TOMCATDIR/server/lib/jaas.jar
-ln -sf %{_javadir}/mx4j-jmx.jar		$TOMCATDIR/server/lib
-ln -sf %{_javadir}/regexp.jar		$TOMCATDIR/server/lib
-ln -sf %{_javadir}/regexp.jar		$TOMCATDIR/server/lib/jakarta-regexp-1.2.jar
-ln -sf %{_javadir}/regexp.jar		$TOMCATDIR/server/lib/regexp-1.2.jar
+ln -sf $(find-jar commons-modeler) $TOMCATDIR/server/lib/commons-modeler.jar
 
-ln -sf %{_javadir}/jaxp_parser_impl.jar	$TOMCATDIR/common/endorsed
-ln -sf %{_javadir}/xml-commons-apis.jar	$TOMCATDIR/common/endorsed
+%if 0
+# do not make these symlinks as ant didn't do
+ln -sf $(find-jar commons-daemon) $TOMCATDIR/bin/commons-daemon.jar
+ln -sf $(find-jar activation) $TOMCATDIR/common/lib/activation.jar
+ln -sf $(find-jar ant) $TOMCATDIR/common/lib/ant.jar
+ln -sf $(find-jar commons-collections) $TOMCATDIR/common/lib/commons-collections.jar
+ln -sf $(find-jar commons-dbcp) $TOMCATDIR/common/lib/commons-dbcp.jar
+ln -sf $(find-jar commons-logging-api) $TOMCATDIR/common/lib/commons-logging-api.jar
+ln -sf $(find-jar commons-pool) $TOMCATDIR/common/lib/commons-pool.jar
+ln -sf $(find-jar servlet) $TOMCATDIR/common/lib/servlet.jar
+ln -sf $(find-jar servlet) $TOMCATDIR/common/lib/servletapi4.jar
+ln -sf $(find-jar jdbc-stdext) $TOMCATDIR/common/lib/jdbc-stdext.jar
+ln -sf jdbc-stdext.jar $TOMCATDIR/common/lib/jdbc2_0-stdext.jar
+ln -sf jdbc-stdext.jar $TOMCATDIR/common/lib/jdbc-stdext-2.0.jar
+ln -sf $(find-jar jmxri) $TOMCATDIR/common/lib/jmxri.jar
+ln -sf $(find-jar jndi) $TOMCATDIR/common/lib/jndi.jar
+ln -sf $(find-jar jta) $TOMCATDIR/common/lib/jta.jar
+ln -sf $(find-jar mail) $TOMCATDIR/common/lib/mail.jar
+ln -sf $(find-jar jsse) $TOMCATDIR/common/lib/jsse.jar
+ln -sf $(find-jar junit) $TOMCATDIR/common/lib/junit.jar
+ln -sf $(find-jar mailapi) $TOMCATDIR/common/lib/mailapi.jar
+ln -sf $(find-jar pop3) $TOMCATDIR/common/lib/pop3.jar
+ln -sf pop3.jar $TOMCATDIR/common/lib/pop.jar
+ln -sf $(find-jar smtp) $TOMCATDIR/common/lib/smtp.jar
+ln -sf $(find-jar imap) $TOMCATDIR/common/lib/imap.jar
+ln -sf $(find-jar commons-beanutils) $TOMCATDIR/server/lib/commons-beanutils.jar
+ln -sf $(find-jar commons-digester) $TOMCATDIR/server/lib/commons-digester.jar
+ln -sf $(find-jar commons-fileupload) $TOMCATDIR/server/lib/commons-fileupload.jar
+ln -sf $(find-jar commons-logging) $TOMCATDIR/server/lib/commons-logging.jar
+ln -sf $(find-jar jaas) $TOMCATDIR/server/lib/jaas.jar
+ln -sf $(find-jar mx4j-jmx) $TOMCATDIR/server/lib/mx4j-jmx.jar
+ln -sf $(find-jar regexp) $TOMCATDIR/server/lib/regexp.jar
+ln -sf $(find-jar regexp) $TOMCATDIR/server/lib/jakarta-regexp-1.2.jar
+ln -sf $(find-jar regexp) $TOMCATDIR/server/lib/regexp-1.2.jar
+%endif
 
-ln -sf %{_javadir}/struts.jar $TOMCATDIR/server/webapps/admin/WEB-INF/lib
+ln -sf $(find-jar jaxp_parser_impl) $TOMCATDIR/common/endorsed/jaxp_parser_impl.jar
+ln -sf $(find-jar xml-commons-apis) $TOMCATDIR/common/endorsed/xml-commons-apis.jar
+ln -sf $(find-jar struts) $TOMCATDIR/server/webapps/admin/WEB-INF/lib/struts.jar
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -371,6 +373,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.55  2007-12-07 18:58:08  glen
+- builds again, revised symlinks
+
 Revision 1.54  2007-12-02 22:41:47  glen
 - use -tomcat5 deps
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/apache-tomcat.spec?r1=1.54&r2=1.55&f=u



More information about the pld-cvs-commit mailing list