SPECS: horde.spec - use webapps framework - older triggers killed ...

glen glen at pld-linux.org
Wed Nov 30 22:58:11 CET 2005


Author: glen                         Date: Wed Nov 30 21:58:11 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use webapps framework
- older triggers killed (gets too complicated to maintain them)

---- Files affected:
SPECS:
   horde.spec (1.122 -> 1.123) 

---- Diffs:

================================================================
Index: SPECS/horde.spec
diff -u SPECS/horde.spec:1.122 SPECS/horde.spec:1.123
--- SPECS/horde.spec:1.122	Wed Nov 30 22:21:19 2005
+++ SPECS/horde.spec	Wed Nov 30 22:58:06 2005
@@ -15,7 +15,7 @@
 %define	_hordeapp horde
 #define	_snap	2005-10-17
 #define	_rc		rc1
-%define	_rel	1
+%define	_rel	1.4
 #
 %include	/usr/lib/rpm/macros.php
 Summary:	The common Horde Framework for all Horde modules
@@ -73,10 +73,10 @@
 Requires:	php-session >= 3:4.1.0
 Requires:	php-xml >= 3:4.1.0
 Requires:	php-zlib >= 3:4.1.0
+Requires:	webapps
 Requires:	webserver = apache
 Obsoletes:	horde-mysql
 Obsoletes:	horde-pgsql
-Conflicts:	apache1 < 1.3.33-2
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -85,8 +85,10 @@
 %define		_noautoreq	'pear(XML/WBXML.*)' 'pear(Horde.*)' 'pear(Text/.*)' 'pear(Net/IMSP.*)' 'pear(XML/sql2xml.php)'
 
 %define		hordedir	/usr/share/horde
-%define		_sysconfdir	/etc/horde.org
 %define		_appdir		%{hordedir}
+%define		_webapps	/etc/webapps
+%define		_webapp		%{_hordeapp}
+%define		_sysconfdir	%{_webapps}/%{_webapp}
 %define		schemadir	/usr/share/openldap/schema
 
 %description
@@ -156,7 +158,7 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp} \
+install -d $RPM_BUILD_ROOT%{_sysconfdir} \
 	$RPM_BUILD_ROOT%{_appdir}/{admin,js,services} \
 	$RPM_BUILD_ROOT%{_appdir}/{docs,lib,locale,templates,themes} \
 	$RPM_BUILD_ROOT/var/{lib,log}/horde \
@@ -164,10 +166,10 @@
 
 cp -a *.php			$RPM_BUILD_ROOT%{_appdir}
 for i in config/*.php.dist; do
-	cp -a $i $RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/$(basename $i .dist)
+	cp -a $i $RPM_BUILD_ROOT%{_sysconfdir}/$(basename $i .dist)
 done
-cp -p config/conf.xml	$RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/conf.xml
-touch					$RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/conf.php.bak
+cp -p config/conf.xml	$RPM_BUILD_ROOT%{_sysconfdir}/conf.xml
+touch					$RPM_BUILD_ROOT%{_sysconfdir}/conf.php.bak
 
 cp -a  admin/*                 $RPM_BUILD_ROOT%{_appdir}/admin
 cp -a  js/*                    $RPM_BUILD_ROOT%{_appdir}/js
@@ -178,9 +180,10 @@
 cp -a  templates/*             $RPM_BUILD_ROOT%{_appdir}/templates
 cp -a  themes/*                $RPM_BUILD_ROOT%{_appdir}/themes
 
-ln -s %{_sysconfdir}/%{_hordeapp} $RPM_BUILD_ROOT%{_appdir}/config
+ln -s %{_sysconfdir} $RPM_BUILD_ROOT%{_appdir}/config
 ln -s %{_defaultdocdir}/%{name}-%{version}/CREDITS $RPM_BUILD_ROOT%{_appdir}/docs
-install %{SOURCE1} 		$RPM_BUILD_ROOT%{_sysconfdir}/apache-%{_hordeapp}.conf
+install %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
+install %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
 
 > $RPM_BUILD_ROOT/var/log/horde/%{_hordeapp}.log
 
@@ -190,8 +193,8 @@
 rm -rf $RPM_BUILD_ROOT
 
 %post
-if [ ! -f %{_sysconfdir}/%{_hordeapp}/conf.php.bak ]; then
-	install /dev/null -o root -g http -m660 %{_sysconfdir}/%{_hordeapp}/conf.php.bak
+if [ ! -f %{_sysconfdir}/conf.php.bak ]; then
+	install /dev/null -o root -g http -m660 %{_sysconfdir}/conf.php.bak
 fi
 
 if [ "$1" = 1 ]; then
@@ -201,7 +204,7 @@
 Default horde installation will auto authorize You as Administrator, but due
 security concerns the Administrator is not granted Administrator privileges.
 If You want to add Yourself to admins list (to administer Horde via web
-interface), please change %{_sysconfdir}/%{_hordeapp}/conf.php:
+interface), please change %{_sysconfdir}/conf.php:
 $conf['auth']['admins'] = array('Administrator');
 
 Depending on authorization You choose, You need to create Horde database tables.
@@ -258,63 +261,47 @@
 	fi
 fi
 
-%triggerin -- apache1 >= 1.3.33-2
-%apache_config_install -v 1 -c %{_sysconfdir}/apache-%{_hordeapp}.conf
+%triggerin -- apache1
+%webapp_register apache %{_webapp}
 
-%triggerun -- apache1 >= 1.3.33-2
-%apache_config_uninstall -v 1
+%triggerun -- apache1
+%webapp_unregister apache %{_webapp}
 
 %triggerin -- apache >= 2.0.0
-%apache_config_install -v 2 -c %{_sysconfdir}/apache-%{_hordeapp}.conf
+%webapp_register httpd %{_webapp}
 
 %triggerun -- apache >= 2.0.0
-%apache_config_uninstall -v 2
+%webapp_unregister httpd %{_webapp}
 
-%triggerpostun -- horde <= 2.2.7-2
-for i in horde.php html.php lang.php mime_drivers.php mime_mapping.php motd.php prefs.php registry.php; do
-	if [ -f /home/services/httpd/html/horde/config/$i.rpmsave ]; then
-		cp -f %{_sysconfdir}/%{_hordeapp}/$i %{_sysconfdir}/%{_hordeapp}/$i.rpmnew
-		mv -f /home/services/httpd/html/horde/config/$i.rpmsave %{_sysconfdir}/%{_hordeapp}/$i
+%triggerpostun -- horde < 3.0.7-1.4
+for i in conf.php hooks.php mime_drivers.php motd.php nls.php prefs.php registry.php; do
+	if [ -f /etc/horde.org/%{_hordeapp}/$i.rpmsave ]; then
+		mv -f %{_sysconfdir}/$i{,.rpmnew}
+		mv -f /etc/horde.org/%{_hordeapp}/$i.rpmsave %{_sysconfdir}/$i
 	fi
 done
 
-%triggerpostun -- horde <= 3.0.3-2.23
-# apache1 confdir
-if [ -f /etc/apache/apache.conf ]; then
-	if grep -q '^Include conf\.d/\*\.conf' /etc/apache/apache.conf; then
-		sed -i -e '
-			/^Include.*horde\.conf/d
-		' /etc/apache/apache.conf
-	else
-		# they're still using old apache.conf
-		sed -i -e '
-			s,^Include.*horde\.conf,Include conf.d/*_horde.conf,
-		' /etc/apache/apache.conf
-	fi
-fi
-
-if [ -f /etc/apache/horde.conf.rpmsave ]; then
-	cp -f %{_sysconfdir}/apache-%{_hordeapp}.conf{,.rpmnew}
-	mv -f /etc/apache/horde.conf.rpmsave %{_sysconfdir}/apache-%{_hordeapp}.conf
-fi
-
-if [ -f /etc/httpd/horde.conf.rpmsave ]; then
-	cp -f %{_sysconfdir}/apache-%{_hordeapp}.conf{,.rpmnew}
-	mv -f /etc/httpd/horde.conf.rpmsave %{_sysconfdir}/apache-%{_hordeapp}.conf
+if [ -f /etc/horde.org/apache-%{_hordeapp}.conf.rpmsave ]; then
+	mv -f %{_sysconfdir}/apache.conf{,.rpmnew}
+	mv -f %{_sysconfdir}/httpd.conf{,.rpmnew}
+	cp -f /etc/horde.org/apache-%{_hordeapp}.conf.rpmsave %{_sysconfdir}/apache.conf
+	cp -f /etc/horde.org/apache-%{_hordeapp}.conf.rpmsave %{_sysconfdir}/httpd.conf
+	rm -f /etc/horde.org/apache-%{_hordeapp}.conf.rpmsave
 fi
 
-# unified location
-if [ -f %{_sysconfdir}/apache.conf.rpmsave ]; then
-	cp -f %{_sysconfdir}/apache-%{_hordeapp}.conf{,.rpmnew}
-	mv -f %{_sysconfdir}/apache.conf.rpmsave %{_sysconfdir}/apache-%{_hordeapp}.conf
-fi
-
-if [ -f /var/lock/subsys/apache ]; then
-	/etc/rc.d/init.d/apache reload 1>&2
+if [ -L /etc/apache/conf.d/99_horde.conf ]; then
+	/usr/sbin/webapp register apache %{_webapp}
+	rm -f /etc/apache/conf.d/99_horde.conf
+	if [ -f /var/lock/subsys/apache ]; then
+		/etc/rc.d/init.d/apache reload 1>&2
+	fi
 fi
-
-if [ -f /var/lock/subsys/httpd ]; then
-	/etc/rc.d/init.d/httpd reload 1>&2
+if [ -L /etc/httpd/httpd.conf/99_horde.conf ]; then
+	/usr/sbin/webapp register httpd %{_webapp}
+	rm -f /etc/httpd/httpd.conf/99_horde.conf
+	if [ -f /var/lock/subsys/httpd ]; then
+		/etc/rc.d/init.d/httpd reload 1>&2
+	fi
 fi
 
 %files
@@ -323,12 +310,13 @@
 %doc docs/{CHANGES,CODING_STANDARDS,CONTRIBUTING,CREDITS,HACKING,INSTALL}
 %doc docs/{PERFORMANCE,RELEASE_NOTES,SECURITY,TODO,TRANSLATIONS,UPGRADING}
 %dir %{_sysconfdir}
-%attr(750,root,http) %dir %{_sysconfdir}/%{_hordeapp}
-%attr(640,root,root) %config(noreplace) %{_sysconfdir}/apache-%{_hordeapp}.conf
-%attr(660,root,http) %config(noreplace) %{_sysconfdir}/%{_hordeapp}/conf.php
-%attr(660,root,http) %config(noreplace) %ghost %{_sysconfdir}/%{_hordeapp}/conf.php.bak
-%attr(640,root,http) %config(noreplace) %{_sysconfdir}/%{_hordeapp}/[!c]*.php
-%attr(640,root,http) %{_sysconfdir}/%{_hordeapp}/conf.xml
+%attr(750,root,http) %dir %{_sysconfdir}
+%attr(640,root,root) %config(noreplace) %{_sysconfdir}/apache.conf
+%attr(640,root,root) %config(noreplace) %{_sysconfdir}/httpd.conf
+%attr(660,root,http) %config(noreplace) %{_sysconfdir}/conf.php
+%attr(660,root,http) %config(noreplace) %ghost %{_sysconfdir}/conf.php.bak
+%attr(640,root,http) %config(noreplace) %{_sysconfdir}/[!c]*.php
+%attr(640,root,http) %{_sysconfdir}/conf.xml
 
 %dir %{_appdir}
 %{_appdir}/*.php
@@ -356,6 +344,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.123  2005/11/30 21:58:06  glen
+- use webapps framework
+- older triggers killed (gets too complicated to maintain them)
+
 Revision 1.122  2005/11/30 21:21:19  glen
 - unify
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/horde.spec?r1=1.122&r2=1.123&f=u




More information about the pld-cvs-commit mailing list