]> git.pld-linux.org Git - packages/tomcat.git/blobdiff - tomcat.spec
- +x for some dirs
[packages/tomcat.git] / tomcat.spec
index cb72df77d80290ba4e1618183a8acde7528cf47c..34aad415320d37609597e1b2b99a7b3f10f01d47 100644 (file)
@@ -1,6 +1,5 @@
-# TODO
-# - packages for *.renametojar files (-cgi and -ssi in server/lib)
-#
+# TODO   
+# - packages for *.renametojar files (-cgi and -ssi in server/lib)   
 # Conditional build:
 %bcond_without javadoc         # skip building javadocs
 %bcond_with    jta             # put jta jar into tomcat lib dir.
@@ -8,37 +7,37 @@
 #
 Summary:       Apache Servlet/JSP Engine, RI for Servlet 2.4/JSP 2.0 API
 Summary(pl.UTF-8):     Silnik Servlet/JSP Apache będący wzorcową implementacją API Servlet 2.4/JSP 2.0
-Name:          apache-tomcat
+Name:          tomcat
 Version:       5.5.27
-Release:       0.3
+Release:       0.6
 License:       Apache v2.0
 Group:         Networking/Daemons/Java
-Source0:       http://www.apache.org/dist/tomcat/tomcat-5/v%{version}/src/%{name}-%{version}-src.tar.gz
+Source0:       http://www.apache.org/dist/tomcat/tomcat-5/v%{version}/src/apache-%{name}-%{version}-src.tar.gz
 # Source0-md5: eb3f196013550b9b1684e4ff18593a8e
-Source1:       %{name}.init
-Source2:       %{name}.sysconfig
-Source10:      %{name}-context-ROOT.xml
-Source11:      %{name}-context-balancer.xml
-Source12:      %{name}-context-jsp-examples.xml
-Source13:      %{name}-context-tomcat-docs.xml
-Source14:      %{name}-context-webdav.xml
-Patch0:                %{name}-skip-servletapi.patch
-Patch1:                %{name}-nsis.patch
-Patch2:                %{name}-native.patch
-Patch3:                %{name}-skip-jdt.patch
-Patch4:                %{name}-no-connectors.patch
-Patch5:                %{name}-dbcp.patch
+Source1:       apache-%{name}.init
+Source2:       apache-%{name}.sysconfig
+Source10:      apache-%{name}-context-ROOT.xml
+Source11:      apache-%{name}-context-balancer.xml
+Source12:      apache-%{name}-context-jsp-examples.xml
+Source13:      apache-%{name}-context-tomcat-docs.xml
+Source14:      apache-%{name}-context-webdav.xml
+Patch0:                apache-%{name}-skip-servletapi.patch
+Patch1:                apache-%{name}-nsis.patch
+Patch2:                apache-%{name}-native.patch
+Patch3:                apache-%{name}-skip-jdt.patch
+Patch4:                apache-%{name}-no-connectors.patch
+Patch5:                apache-%{name}-dbcp.patch
 # this patch is needed for struts >= 1.3
-Patch6:                %{name}-struts.patch
+Patch6:                apache-%{name}-struts.patch
 # WTF? Why is it needed? Is it related to struts version?
-Patch7:                %{name}-admin-struts.patch
+Patch7:                apache-%{name}-admin-struts.patch
 URL:           http://tomcat.apache.org/
 %if %{with java_sun}
 BuildRequires: java-sun >= 1.5
 BuildRequires: java-sun-jre >= 1.5
 %else
-BuildRequires: java-gcj-compat-devel
 # BuildRequires:       jsse >= 0:1.0.3
+BuildRequires: java-gcj-compat-devel
 %endif
 BuildRequires: ant >= 1.5.3
 BuildRequires: ant-trax
@@ -64,6 +63,7 @@ BuildRequires:        java-commons-pool >= 0:1.2
 BuildRequires: java-commons-pool-tomcat5 >= 0:1.2
 %{?with_jta:BuildRequires:     java-jta >= 0:1.0.1}
 BuildRequires: java-log4j
+BuildRequires: java-mail >= 0:1.3.1
 BuildRequires: java-puretls
 BuildRequires: java-servletapi5 = %{version}
 #BuildRequires:        java-struts >= 0:1.2.7
@@ -71,7 +71,6 @@ BuildRequires:        java-struts >= 1.0.2
 BuildRequires: java-xerces >= 0:2.7.1
 BuildRequires: java-xml-commons
 #BuildRequires:        java-xml-commons >= 1.3
-BuildRequires: java-mail >= 0:1.3.1
 BuildRequires: jaxp_parser_impl >= 0:2.7.1
 BuildRequires: jdbc-stdext >= 0:2.0
 BuildRequires: jmx
@@ -109,9 +108,11 @@ Requires:  jre >= 1.2
 Requires:      jsse >= 1.0.2
 %{?with_jta:Requires:  jta >= 1.0.1}
 Requires:      rc-scripts
+Provides:      group(servlet)
 Provides:      group(tomcat)
 Provides:      java-servlet-container
 Provides:      user(tomcat)
+Obsoletes:     apache-tomcat
 Obsoletes:     jakarta-tomcat
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -144,6 +145,7 @@ Community Process.
 Summary:       The Apache Tomcat Servlet/JSP Container documentation
 Summary(pl.UTF-8):     Dokumentacja do Tomcata - kontenera Servlet/JSP
 Group:         Documentation
+Obsoletes:     apache-tomcat-doc
 Obsoletes:     jakarta-tomcat-doc
 
 %description doc
@@ -156,6 +158,7 @@ Dokumentacja do Tomcata - kontenera Servlet/JSP.
 Summary:       Apache Tomcat`s Administration Web Application
 Summary(pl.UTF-8):     Panel Administracyjny dla Apache Tomcat
 Group:         Networking/Daemons/Java/Servlets
+Requires:      %{name} = %{version}-%{release}
 Requires:      java-commons-chain
 
 %description admin
@@ -169,6 +172,7 @@ Summary:    JSP compiler
 Summary(pl.UTF-8):     Kompilator JSP
 Group:         Libraries/Java
 Requires:      jpackage-utils
+Obsoletes:     apache-tomcat-jasper
 
 %description jasper
 Jasper is Java ServerPages compiler used by Apache Tomcat servlet
@@ -179,7 +183,7 @@ Jasper jest kompilatorem Java ServerPages używanym przez kontener
 servletów Apache Tomcat.
 
 %prep
-%setup -q -n %{name}-%{version}-src
+%setup -q -n apache-%{name}-%{version}-src
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
@@ -187,9 +191,17 @@ servletów Apache Tomcat.
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
 
 # we don't need dos scripts
-rm -f bin/*.bat
+rm -f container/catalina/src/bin/*.bat
+# or those
+rm -f container/catalina/src/bin/{startup,shutdown}.sh
+
+# causes file(1) rpm to abort, and not really neccessary file
+rm container/webapps/admin/images/Thumbs.db
+# file: Thumbs.db: ERROR: Cannot read short stream (Invalid argument)
+# rpm: error: magic_file(ms, "Thumbs.db") failed: mode 37777700644 Cannot read short stream (Invalid argument)
 
 # servletapi built from jakarta-servletapi5.spec
 rm -rf servletapi
@@ -283,12 +295,13 @@ cp -a shared $TOMCATDIR
 cp -a temp $CATALINADIR
 
 ln -sf %{_logdir}/tomcat $CATALINADIR/logs
+ln -sf %{_logdir}/tomcat $TOMCATDIR/logs
 ln -sf %{_vardir}/work $TOMCATDIR/work
 ln -sf %{_vardir}/conf $TOMCATDIR/conf
 ln -sf %{_vardir}/conf $RPM_BUILD_ROOT%{_sysconfdir}
 
 # symlinks instead of copies
-jars="commons-el jakarta-commons-dbcp-tomcat5 servlet-api jsp-api commons-modeler"
+jars="commons-el commons-dbcp-tomcat5 servlet-api jsp-api commons-modeler"
 for jar in $jars; do
        jar=$(find-jar $jar)
        ln -sf $jar $TOMCATDIR/common/lib
@@ -346,7 +359,8 @@ rm -rf $RPM_BUILD_ROOT
 
 %pre
 %groupadd -g 234 -r -f tomcat
-%useradd -u 234 -r -d /var/lib/tomcat -s /bin/false -c "Tomcat User" -g tomcat tomcat
+%groupadd -g 237 -r -f servlet
+%useradd -u 234 -r -d /var/lib/tomcat -s /bin/false -c "Tomcat User" -g tomcat -G servlet tomcat
 
 %post
 /sbin/chkconfig --add tomcat
@@ -362,6 +376,7 @@ fi
 if [ "$1" = "0" ]; then
        %userremove tomcat
        %groupremove tomcat
+       %groupremove servlet
 fi
 
 %files
@@ -392,39 +407,49 @@ fi
 %dir %{_tomcatdir}/server/classes
 %{_tomcatdir}/server/lib
 %dir %{_tomcatdir}/server/webapps
+
+%config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/host-manager.xml
 %{_tomcatdir}/server/webapps/host-manager
+
+%config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/manager.xml
 %{_tomcatdir}/server/webapps/manager
-%{_tomcatdir}/webapps
+
+%dir %{_tomcatdir}/webapps
+
+%config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/ROOT.xml
+%{_tomcatdir}/webapps/ROOT
+
+%config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/balancer.xml
+%{_tomcatdir}/webapps/balancer
+
+%config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/webdav.xml
+%{_tomcatdir}/webapps/webdav
+
+%{_tomcatdir}/logs
 %{_tomcatdir}/work
 %{_tomcatdir}/shared
 %dir %{_vardir}
-%dir %{_vardir}/conf
-%dir %{_vardir}/conf/Catalina
+# these directory has to be writeable because /admin need to modify config
+# files and create temporary files
+%dir %attr(775,root,tomcat) %{_vardir}/conf
+%dir %attr(775,root,tomcat) %{_vardir}/conf/Catalina
 %dir %{_vardir}/conf/Catalina/localhost
-# tomcat config has to be writeable because of tomacta-users.xml file and Catalina dir
+# tomcat config has to be writeable because of tomcat-users.xml file and Catalina dir
 %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/MANIFEST.MF
 %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/catalina.policy
 %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/*.properties*
 %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/*.manifest
 %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/*.xml
-%config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/balancer.xml
-%config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/host-manager.xml
-%config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/jsp-examples.xml
-%config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/manager.xml
-%config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/ROOT.xml
-%config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/tomcat-docs.xml
-%config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/webdav.xml
 %dir %attr(1730,root,tomcat) %{_vardir}/work
 %dir %attr(775,root,tomcat) %{_vardir}/webapps
 %dir %attr(775,root,tomcat) %{_vardir}/temp
 %dir %attr(775,root,tomcat) %{_logdir}/tomcat
 %{_vardir}/logs
 
-%if 0
 %files doc
 %defattr(644,root,root,755)
-%doc catalina/docs/*
-%endif
+%config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/tomcat-docs.xml
+%{_tomcatdir}/webapps/tomcat-docs
 
 %files admin
 %defattr(644,root,root,755)
This page took 0.047167 seconds and 4 git commands to generate.