SPECS: horde-mimp.spec, horde-mnemo.spec, horde-nag.spec, horde-pa...

glen glen at pld-linux.org
Wed Nov 30 13:48:35 CET 2005


Author: glen                         Date: Wed Nov 30 12:48:35 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use webapps framework

---- Files affected:
SPECS:
   horde-mimp.spec (1.12 -> 1.13) , horde-mnemo.spec (1.9 -> 1.10) , horde-nag.spec (1.10 -> 1.11) , horde-passwd.spec (1.36 -> 1.37) , horde-turba.spec (1.54 -> 1.55) , horde-whups.spec (1.13 -> 1.14) 

---- Diffs:

================================================================
Index: SPECS/horde-mimp.spec
diff -u SPECS/horde-mimp.spec:1.12 SPECS/horde-mimp.spec:1.13
--- SPECS/horde-mimp.spec:1.12	Wed Nov 16 15:06:49 2005
+++ SPECS/horde-mimp.spec	Wed Nov 30 13:48:29 2005
@@ -2,7 +2,7 @@
 %define	_hordeapp mimp
 %define	_snap	2005-11-16
 #define	_rc		rc1
-%define	_rel	0.2
+%define	_rel	0.3
 #
 %include	/usr/lib/rpm/macros.php
 Summary:	MIMP - a stripped down version of IMP for use on mobile phones/PDAs
@@ -22,9 +22,9 @@
 BuildRequires:	tar >= 1:1.15.1
 Requires:	apache(mod_access)
 Requires:	horde >= 3.0
+Requires:	webapps
 Requires:	webserver = apache
 Obsoletes:	%{_hordeapp}
-Conflicts:	apache < 1.3.33-2
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -33,8 +33,10 @@
 %define		_noautoreq	'pear(Horde.*)' 'pear(Text/Flowed.php)'
 
 %define		hordedir	/usr/share/horde
-%define		_sysconfdir	/etc/horde.org
 %define		_appdir		%{hordedir}/%{_hordeapp}
+%define		_webapps	/etc/webapps
+%define		_webapp		horde-%{_hordeapp}
+%define		_sysconfdir	%{_webapps}/%{_webapp}
 
 %description
 MIMP is a project to create a version of IMP suitable for mobile
@@ -69,56 +71,88 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp} \
+install -d $RPM_BUILD_ROOT%{_sysconfdir} \
 	$RPM_BUILD_ROOT%{_appdir}/{docs,lib,locale,templates,themes}
 
 cp -a *.php			$RPM_BUILD_ROOT%{_appdir}
 for i in config/*.dist; do
-	cp -a $i $RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/$(basename $i .dist)
+	cp -a $i $RPM_BUILD_ROOT%{_sysconfdir}/$(basename $i .dist)
 done
-echo '<?php ?>' >		$RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/conf.php
-cp -p config/conf.xml	$RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/conf.xml
-touch					$RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/conf.php.bak
+echo '<?php ?>' >		$RPM_BUILD_ROOT%{_sysconfdir}/conf.php
+cp -p config/conf.xml	$RPM_BUILD_ROOT%{_sysconfdir}/conf.xml
+touch					$RPM_BUILD_ROOT%{_sysconfdir}/conf.php.bak
 
 cp -pR lib/*			$RPM_BUILD_ROOT%{_appdir}/lib
 cp -pR locale/*			$RPM_BUILD_ROOT%{_appdir}/locale
 cp -pR templates/*		$RPM_BUILD_ROOT%{_appdir}/templates
 cp -pR 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 %{_docdir}/%{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
 
 %clean
 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
 
-%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-%{_hordeapp} < 0.1-0.20051116.0.3
+for i in conf.php conf.xml filter.txt header.txt menu.php mime_drivers.php motd.php prefs.php servers.php trailer.txt; 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
+
+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
+fi
+
+if [ -L /etc/apache/conf.d/99_horde-%{_hordeapp}.conf ]; then
+	/usr/sbin/webapp register apache %{_webapp}
+	rm -f /etc/apache/conf.d/99_horde-%{_hordeapp}.conf
+	if [ -f /var/lock/subsys/apache ]; then
+		/etc/rc.d/init.d/apache reload 1>&2
+	fi
+fi
+if [ -L /etc/httpd/httpd.conf/99_horde-%{_hordeapp}.conf ]; then
+	/usr/sbin/webapp register httpd %{_webapp}
+	rm -f /etc/httpd/httpd.conf/99_horde-%{_hordeapp}.conf
+	if [ -f /var/lock/subsys/httpd ]; then
+		/etc/rc.d/init.d/httpd reload 1>&2
+	fi
+fi
 
 %files
 %defattr(644,root,root,755)
 %doc README docs/*
-%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) %config(noreplace) %{_sysconfdir}/%{_hordeapp}/*.txt
-%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) %config(noreplace) %{_sysconfdir}/*.txt
+%attr(640,root,http) %{_sysconfdir}/conf.xml
 
 %dir %{_appdir}
 %{_appdir}/*.php
@@ -135,6 +169,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.13  2005/11/30 12:48:29  glen
+- use webapps framework
+
 Revision 1.12  2005/11/16 14:06:49  glen
 - avoid packaging test.php
 

================================================================
Index: SPECS/horde-mnemo.spec
diff -u SPECS/horde-mnemo.spec:1.9 SPECS/horde-mnemo.spec:1.10
--- SPECS/horde-mnemo.spec:1.9	Wed Nov 16 15:17:51 2005
+++ SPECS/horde-mnemo.spec	Wed Nov 30 13:48:29 2005
@@ -2,7 +2,7 @@
 %define	_hordeapp mnemo
 #define	_snap	2005-08-01
 #define	_rc		rc1
-%define	_rel	1
+%define	_rel	1.1
 #
 %include	/usr/lib/rpm/macros.php
 Summary:	Horde notes and memos application
@@ -22,9 +22,9 @@
 BuildRequires:	tar >= 1:1.15.1
 Requires:	apache(mod_access)
 Requires:	horde >= 3.0
+Requires:	webapps
 Requires:	webserver = apache
 Obsoletes:	%{_hordeapp}
-Conflicts:	apache < 1.3.33-2
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -33,8 +33,10 @@
 %define		_noautoreq	'pear(Horde.*)'
 
 %define		hordedir	/usr/share/horde
-%define		_sysconfdir	/etc/horde.org
 %define		_appdir		%{hordedir}/%{_hordeapp}
+%define		_webapps	/etc/webapps
+%define		_webapp		horde-%{_hordeapp}
+%define		_sysconfdir	%{_webapps}/%{_webapp}
 
 %description
 Mnemo is the Horde notes and memos application. It lets users keep
@@ -64,32 +66,33 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp} \
+install -d $RPM_BUILD_ROOT%{_sysconfdir} \
 	$RPM_BUILD_ROOT%{_appdir}/{docs,lib,locale,scripts,templates,themes}
 
 cp -a *.php			$RPM_BUILD_ROOT%{_appdir}
 for i in config/*.dist; do
-	cp -a $i $RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/$(basename $i .dist)
+	cp -a $i $RPM_BUILD_ROOT%{_sysconfdir}/$(basename $i .dist)
 done
-echo '<?php ?>' >		$RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/conf.php
-cp -p config/conf.xml	$RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/conf.xml
-touch					$RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/conf.php.bak
+echo '<?php ?>' >		$RPM_BUILD_ROOT%{_sysconfdir}/conf.php
+cp -p config/conf.xml	$RPM_BUILD_ROOT%{_sysconfdir}/conf.xml
+touch					$RPM_BUILD_ROOT%{_sysconfdir}/conf.php.bak
 
 cp -pR	lib/*			$RPM_BUILD_ROOT%{_appdir}/lib
 cp -pR	locale/*		$RPM_BUILD_ROOT%{_appdir}/locale
 cp -pR	templates/*		$RPM_BUILD_ROOT%{_appdir}/templates
 cp -pR	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 %{_docdir}/%{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
 
 %clean
 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
@@ -101,27 +104,58 @@
 EOF
 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-%{_hordeapp} < 2.0.2-1.1
+for i in conf.php conf.xml prefs.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
+
+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
+fi
+
+if [ -L /etc/apache/conf.d/99_horde-%{_hordeapp}.conf ]; then
+	/usr/sbin/webapp register apache %{_webapp}
+	rm -f /etc/apache/conf.d/99_horde-%{_hordeapp}.conf
+	if [ -f /var/lock/subsys/apache ]; then
+		/etc/rc.d/init.d/apache reload 1>&2
+	fi
+fi
+if [ -L /etc/httpd/httpd.conf/99_horde-%{_hordeapp}.conf ]; then
+	/usr/sbin/webapp register httpd %{_webapp}
+	rm -f /etc/httpd/httpd.conf/99_horde-%{_hordeapp}.conf
+	if [ -f /var/lock/subsys/httpd ]; then
+		/etc/rc.d/init.d/httpd reload 1>&2
+	fi
+fi
 
 %files
 %defattr(644,root,root,755)
 %doc README docs/* scripts
-%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
@@ -138,6 +172,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.10  2005/11/30 12:48:29  glen
+- use webapps framework
+
 Revision 1.9  2005/11/16 14:17:51  glen
 - unified apache virtual requires
 

================================================================
Index: SPECS/horde-nag.spec
diff -u SPECS/horde-nag.spec:1.10 SPECS/horde-nag.spec:1.11
--- SPECS/horde-nag.spec:1.10	Wed Nov 16 15:17:51 2005
+++ SPECS/horde-nag.spec	Wed Nov 30 13:48:29 2005
@@ -2,7 +2,7 @@
 %define	_hordeapp nag
 #define	_snap	2005-08-01
 #define	_rc		rc1
-%define	_rel	1
+%define	_rel	1.1
 #
 %include	/usr/lib/rpm/macros.php
 Summary:	Nag Task List Manager
@@ -22,9 +22,9 @@
 BuildRequires:	tar >= 1:1.15.1
 Requires:	apache(mod_access)
 Requires:	horde >= 3.0
+Requires:	webapps
 Requires:	webserver = apache
 Obsoletes:	%{_hordeapp}
-Conflicts:	apache < 1.3.33-2
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -33,8 +33,10 @@
 %define		_noautoreq	'pear(Horde.*)'
 
 %define		hordedir	/usr/share/horde
-%define		_sysconfdir	/etc/horde.org
 %define		_appdir		%{hordedir}/%{_hordeapp}
+%define		_webapps	/etc/webapps
+%define		_webapp		horde-%{_hordeapp}
+%define		_sysconfdir	%{_webapps}/%{_webapp}
 
 %description
 Nag is the Horde task list application. It stores todo items, things
@@ -60,32 +62,33 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp} \
+install -d $RPM_BUILD_ROOT%{_sysconfdir} \
 	$RPM_BUILD_ROOT%{_appdir}/{docs,lib,locale,scripts,templates,themes}
 
 cp -a *.php			$RPM_BUILD_ROOT%{_appdir}
 for i in config/*.dist; do
-	cp -a $i $RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/$(basename $i .dist)
+	cp -a $i $RPM_BUILD_ROOT%{_sysconfdir}/$(basename $i .dist)
 done
-echo '<?php ?>' >		$RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/conf.php
-cp -p config/conf.xml	$RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/conf.xml
-touch					$RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/conf.php.bak
+echo '<?php ?>' >		$RPM_BUILD_ROOT%{_sysconfdir}/conf.php
+cp -p config/conf.xml	$RPM_BUILD_ROOT%{_sysconfdir}/conf.xml
+touch					$RPM_BUILD_ROOT%{_sysconfdir}/conf.php.bak
 
 cp -pR	lib/*			$RPM_BUILD_ROOT%{_appdir}/lib
 cp -pR	locale/*		$RPM_BUILD_ROOT%{_appdir}/locale
 cp -pR	templates/*		$RPM_BUILD_ROOT%{_appdir}/templates
 cp -pR	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 %{_docdir}/%{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
 
 %clean
 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
@@ -97,15 +100,58 @@
 EOF
 fi
 
+%triggerin -- apache1
+%webapp_register apache %{_webapp}
+
+%triggerun -- apache1
+%webapp_unregister apache %{_webapp}
+
+%triggerin -- apache >= 2.0.0
+%webapp_register httpd %{_webapp}
+
+%triggerun -- apache >= 2.0.0
+%webapp_unregister httpd %{_webapp}
+
+%triggerpostun -- horde-%{_hordeapp} < 2.0.3-1.1
+for i in conf.php conf.xml menu.php prefs.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
+
+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
+fi
+
+rm -f /etc/apache/conf.d/99_horde-%{_hordeapp}.conf
+if [ -d /etc/apache/webapps.d ]; then
+	/usr/sbin/webapp register apache %{_webapp}
+	if [ -f /var/lock/subsys/apache ]; then
+		/etc/rc.d/init.d/apache reload 1>&2
+	fi
+fi
+rm -f /etc/httpd/httpd.conf/99_horde-%{_hordeapp}.conf
+if [ -d /etc/httpd/webapps.d ]; then
+	/usr/sbin/webapp register httpd %{_webapp}
+	if [ -f /var/lock/subsys/httpd ]; then
+		/etc/rc.d/init.d/httpd reload 1>&2
+	fi
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc README docs/* scripts
-%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}/*.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}/*.xml
 
 %dir %{_appdir}
 %{_appdir}/*.php
@@ -122,6 +168,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.11  2005/11/30 12:48:29  glen
+- use webapps framework
+
 Revision 1.10  2005/11/16 14:17:51  glen
 - unified apache virtual requires
 

================================================================
Index: SPECS/horde-passwd.spec
diff -u SPECS/horde-passwd.spec:1.36 SPECS/horde-passwd.spec:1.37
--- SPECS/horde-passwd.spec:1.36	Wed Nov 16 15:17:51 2005
+++ SPECS/horde-passwd.spec	Wed Nov 30 13:48:29 2005
@@ -2,7 +2,7 @@
 %define		_hordeapp	passwd
 #define		_snap	2005-09-10
 #define		_rc		rc1
-%define		_rel	2
+%define		_rel	2.1
 #
 %include	/usr/lib/rpm/macros.php
 Summary:	passwd - password change module for Horde
@@ -24,9 +24,9 @@
 Requires:	apache(mod_access)
 Requires:	horde >= 3.0
 Requires:	php-xml >= 4.1.0
+Requires:	webapps
 Requires:	webserver = apache
 Obsoletes:	horde-addons-passwd
-Conflicts:	apache < 1.3.33-2
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -35,8 +35,10 @@
 %define		_noautoreq	'pear(Horde.*)'
 
 %define		hordedir	/usr/share/horde
-%define		_sysconfdir	/etc/horde.org
 %define		_appdir		%{hordedir}/%{_hordeapp}
+%define		_webapps	/etc/webapps
+%define		_webapp		horde-%{_hordeapp}
+%define		_sysconfdir	%{_webapps}/%{_webapp}
 
 %description
 Passwd is the Horde password changing application. While it has been
@@ -59,33 +61,33 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp} \
+install -d $RPM_BUILD_ROOT%{_sysconfdir} \
 	$RPM_BUILD_ROOT%{_appdir}/{docs,lib,locale,scripts,templates,themes}
 
 cp -pR	*.php			$RPM_BUILD_ROOT%{_appdir}
 for i in config/*.dist; do
-	cp -p $i $RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/$(basename $i .dist)
+	cp -p $i $RPM_BUILD_ROOT%{_sysconfdir}/$(basename $i .dist)
 done
-echo '<?php ?>' > $RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/conf.php
-cp -p config/conf.xml $RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/conf.xml
-touch					$RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/conf.php.bak
+echo '<?php ?>' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.php
+cp -p config/conf.xml $RPM_BUILD_ROOT%{_sysconfdir}/conf.xml
+touch					$RPM_BUILD_ROOT%{_sysconfdir}/conf.php.bak
 
 cp -pR	lib/*			$RPM_BUILD_ROOT%{_appdir}/lib
 cp -pR	locale/*		$RPM_BUILD_ROOT%{_appdir}/locale
 cp -pR	templates/*		$RPM_BUILD_ROOT%{_appdir}/templates
 cp -pR	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 %{_docdir}/%{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
 
 %clean
 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
 
 # take uids with < 500 and update refused logins in default conf.xml
@@ -94,38 +96,69 @@
 	sed -i -e "
 	# primitive xml parser ;)
 	/configlist name=\"refused\"/s/>.*</>$USERLIST</
-	" %{_sysconfdir}/%{_hordeapp}/conf.xml
+	" %{_sysconfdir}/conf.xml
 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-passwd <= 2.2-0.1
 for i in backends.php conf.php; do
 	if [ -f /home/services/httpd/html/horde/passwd/config/$i.rpmsave ]; then
-		mv -f %{confdir}/passwd/$i %{confdir}/passwd/$i.rpmnew
-		mv -f /home/services/httpd/html/horde/passwd/config/$i.rpmsave %{confdir}/passwd/$i
+		mv -f %{_sysconfdir}/$i{,.rpmnew}
+		mv -f /home/services/httpd/html/horde/passwd/config/$i.rpmsave %{_sysconfdir}/$i
+	fi
+done
+
+%triggerpostun -- horde-%{_hordeapp} < 3.0-2.1
+for i in backends.php conf.php conf.xml; 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
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/horde-mimp.spec?r1=1.12&r2=1.13&f=u
    http://cvs.pld-linux.org/SPECS/horde-mnemo.spec?r1=1.9&r2=1.10&f=u
    http://cvs.pld-linux.org/SPECS/horde-nag.spec?r1=1.10&r2=1.11&f=u
    http://cvs.pld-linux.org/SPECS/horde-passwd.spec?r1=1.36&r2=1.37&f=u
    http://cvs.pld-linux.org/SPECS/horde-turba.spec?r1=1.54&r2=1.55&f=u
    http://cvs.pld-linux.org/SPECS/horde-whups.spec?r1=1.13&r2=1.14&f=u




More information about the pld-cvs-commit mailing list