]> git.pld-linux.org Git - packages/apache-tomcat.git/blobdiff - apache-tomcat.spec
- missing directory
[packages/apache-tomcat.git] / apache-tomcat.spec
index 08330a9dbe7ffe9aad8ba73aef0f763fddd3d545..d50a0f25442b2da5a31af58cd54456273eeb073e 100644 (file)
@@ -14,6 +14,7 @@ Group:                Development/Languages/Java
 Source0:       http://www.apache.org/dist/tomcat/tomcat-5/v%{version}/src/%{name}-%{version}-src.tar.gz
 # Source0-md5: eb3f196013550b9b1684e4ff18593a8e
 Source1:       %{name}.init
+Source2:       %{name}.sysconfig
 Patch0:                %{name}-skip-servletapi.patch
 Patch1:                %{name}-nsis.patch
 Patch2:                %{name}-native.patch
@@ -236,14 +237,17 @@ install -d $TOMCATDIR/bin \
            $TOMCATDIR/common/{lib,classes,endorsed} \
            $TOMCATDIR/server/{lib,classes} \
            $TOMCATDIR/webapps \
-           $RPM_BUILD_ROOT%{_sysconfdir} \
            $RPM_BUILD_ROOT%{_logdir}/tomcat \
+           $RPM_BUILD_ROOT%{_vardir}/webapps \
            $RPM_BUILD_ROOT%{_vardir}/work \
+           $RPM_BUILD_ROOT%{_vardir}/conf \
+           $RPM_BUILD_ROOT/etc/sysconfig \
            $RPM_BUILD_ROOT/etc/rc.d/init.d
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/tomcat
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/tomcat
 
-cp -pR conf/* $RPM_BUILD_ROOT%{_sysconfdir}
+cp -pR conf/* $CATALINADIR/conf
 cp -HR bin common server $TOMCATDIR
 
 cp -rf server/webapps $TOMCATDIR/server
@@ -251,9 +255,10 @@ cp -rf webapps $TOMCATDIR
 cp -rf shared $TOMCATDIR
 cp -rf temp $TOMCATDIR
 
-ln -sf %{_logdir}/tomcat $TOMCATDIR/logs
+ln -sf %{_logdir}/tomcat $CATALINADIR/logs
 ln -sf %{_vardir}/work $TOMCATDIR/work
-ln -sf %{_sysconfdir} $TOMCATDIR/conf
+ln -sf %{_vardir}/conf $TOMCATDIR/conf
+ln -sf %{_vardir}/conf $RPM_BUILD_ROOT%{_sysconfdir}
 
 # symlinks instead of copies
 ln -sf $(find-jar commons-el) $TOMCATDIR/common/lib/commons-el.jar
@@ -327,11 +332,11 @@ fi
 %files
 %defattr(644,root,root,755)
 %doc build/{RELEASE-NOTES,RUNNING.txt}
-# tomcat wants to regenerate tomcat-users.xml
-%dir %attr(775,root,http) %{_sysconfdir}
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
 %attr(754,root,root) /etc/rc.d/init.d/tomcat
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfdir/tomcat
+%{_sysconfdir}
 %dir %{_tomcatdir}
+%dir %{_tomcatdir}/conf
 %dir %{_tomcatdir}/bin
 %{_tomcatdir}/bin/catalina-tasks.xml
 %{_tomcatdir}/bin/jkstatus-tasks.xml
@@ -348,8 +353,6 @@ fi
 %lang(fr) %{_tomcatdir}/common/i18n/tomcat-i18n-fr.jar
 %lang(ja) %{_tomcatdir}/common/i18n/tomcat-i18n-ja.jar
 %{_tomcatdir}/common/lib
-%{_tomcatdir}/conf
-%{_tomcatdir}/logs
 %dir %{_tomcatdir}/server
 %dir %{_tomcatdir}/server/classes
 %{_tomcatdir}/server/lib
@@ -359,8 +362,13 @@ fi
 %{_tomcatdir}/shared
 %{_tomcatdir}/temp
 %dir %{_vardir}
+# tomcat config has to be writeable because of tomacta-users.xml file and
+# Catalina dir
+%config(noreplace) %attr(775,root,http) %verify(not md5 mtime size) %{_vardir}/conf
 %dir %attr(1730,root,http) %{_vardir}/work
-%dir %attr(1730,root,http) %{_logdir}/tomcat
+%dir %attr(775,root,http) %{_vardir}/webapps
+%dir %attr(775,root,http) %{_logdir}/tomcat
+%{_vardir}/logs
 
 %if 0
 %files doc
This page took 0.05436 seconds and 4 git commands to generate.