SPECS: ApacheJServ.spec - subpackage for different configs

glen glen at pld-linux.org
Mon Oct 31 14:42:11 CET 2005


Author: glen                         Date: Mon Oct 31 13:42:11 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- subpackage for different configs

---- Files affected:
SPECS:
   ApacheJServ.spec (1.46 -> 1.47) 

---- Diffs:

================================================================
Index: SPECS/ApacheJServ.spec
diff -u SPECS/ApacheJServ.spec:1.46 SPECS/ApacheJServ.spec:1.47
--- SPECS/ApacheJServ.spec:1.46	Sat Oct 22 13:36:21 2005
+++ SPECS/ApacheJServ.spec	Mon Oct 31 14:42:06 2005
@@ -11,7 +11,7 @@
 Summary(pl):	Silnik serwletów ze wsparciem dla wiodącego serwera WWW
 Name:		ApacheJServ
 Version:	1.1.2
-Release:	0.52
+Release:	0.56
 License:	freely distributable & usable (JServ), LGPL (JSDK)
 Group:		Networking/Daemons
 Source0:	http://java.apache.org/jserv/dist/%{name}-%{version}.tar.gz
@@ -89,15 +89,26 @@
 Requires(pre):  /usr/sbin/useradd
 Requires(pre):  /usr/sbin/groupadd
 Requires(post,preun):	rc-scripts
-Requires(triggerin):	sed >= 4.0
 Requires:	rc-scripts
+Provides:	%{name}(config)
+Obsoletes:	%{name}(config)
 
 %description init
-JServ initscript for standalone mode.
+JServ initscript for standalone (manual) mode.
 
 %description init -l pl
 Skrypt startowy JServ dla trybu samodzielnego.
 
+%package auto
+Summary:	ApacheJServ initscript
+Group:		Development/Languages/Java
+Requires:	%{name} = %{version}-%{release}
+Provides:	%{name}(config)
+Obsoletes:	%{name}(config)
+
+%description auto
+Configuration for automatic JServ startup from Apache.
+
 %package doc
 Summary:	ApacheJServ documentation
 Summary(pl):	Dokumentacja do ApacheJServ
@@ -171,6 +182,8 @@
 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{httpdconf}/conf.d,%{_javadir}}
 
 install %{SOURCE2} $RPM_BUILD_ROOT%{httpdconf}/conf.d/81_mod_jserv.conf
+sed -e '/^[	 ]*ApJServManual[	 ]\+/s/off/on/i' %{SOURCE2} \
+	> $RPM_BUILD_ROOT%{httpdconf}/conf.d/82_mod_jserv.conf
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/jserv
 
 %{__make} install \
@@ -205,11 +218,13 @@
 
 %post -n apache1-mod_jserv
 %service apache restart
+exit 0
 
 %postun -n apache1-mod_jserv
 if [ "$1" = "0" ]; then
 	%service -q apache restart
 fi
+exit 0
 
 %pre init
 %groupadd -P %{name}-init -g 154 jserv
@@ -232,26 +247,10 @@
 	%groupremove jserv
 fi
 
-%triggerin init -- apache1-mod_jserv
-if [ "$2" != 1 ]; then
-	exit 0
-fi
-# so, we have initscript and apache module, it means we turn off
-# automatic mode and switch to manual mode, and change jserv config
-# groups to jserv user
-MODE=$(awk '/^[\t ]*ApJServManual (on|off)/{print $2}' %{httpdconf}/conf.d/??_mod_jserv.conf)
-if [ "$MODE" = off ]; then
-	chgrp jserv %{_sysconfdir}/{{jserv,zone}.properties,jserv.secret.key}
-	sed -i -e '/^[	 ]*ApJServManual[	 ]\+/s/off/on/i' %{httpdconf}/conf.d/??_mod_jserv.conf
-fi
-
 %files
 %defattr(644,root,root,755)
 %doc LICENSE README
 %dir %{_sysconfdir}
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jserv.properties
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zone.properties
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jserv.secret.key
 %{_javadir}/ApacheJServ.jar
 %{_javadir}/servlet-2.0.jar
 
@@ -265,14 +264,24 @@
 
 %files -n apache1-mod_jserv
 %defattr(644,root,root,755)
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{httpdconf}/conf.d/*_mod_jserv.conf
 %attr(755,root,root) %{_pkglibdir}/mod_jserv.so
 %attr(770,root,http) %dir %{logdir}
 
 %files init
 %defattr(644,root,root,755)
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{httpdconf}/conf.d/82_mod_jserv.conf
+%attr(640,root,jserv) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jserv.properties
+%attr(640,root,jserv) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zone.properties
+%attr(640,root,jserv) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jserv.secret.key
 %attr(754,root,root) /etc/rc.d/init.d/jserv
 
+%files auto
+%defattr(644,root,root,755)
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{httpdconf}/conf.d/81_mod_jserv.conf
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jserv.properties
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zone.properties
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jserv.secret.key
+
 %files doc
 %defattr(644,root,root,755)
 %doc index.html docs
@@ -284,6 +293,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.47  2005/10/31 13:42:06  glen
+- subpackage for different configs
+
 Revision 1.46  2005/10/22 11:36:21  glen
 - cleanups, hacks to get -init package ran as different user
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/ApacheJServ.spec?r1=1.46&r2=1.47&f=u




More information about the pld-cvs-commit mailing list