SPECS: horde-vacation.spec - webapp support
baggins
baggins at pld-linux.org
Mon Feb 6 14:52:30 CET 2006
Author: baggins Date: Mon Feb 6 13:52:30 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- webapp support
---- Files affected:
SPECS:
horde-vacation.spec (1.2 -> 1.3)
---- Diffs:
================================================================
Index: SPECS/horde-vacation.spec
diff -u SPECS/horde-vacation.spec:1.2 SPECS/horde-vacation.spec:1.3
--- SPECS/horde-vacation.spec:1.2 Sun Oct 23 22:16:02 2005
+++ SPECS/horde-vacation.spec Mon Feb 6 14:52:25 2006
@@ -1,6 +1,6 @@
# $Revision$, $Date$
%define _hordeapp vacation
-%define _rel 0.1
+%define _rel 0.2
#
%include /usr/lib/rpm/macros.php
Summary: vacation - vacation manager module for Horde
@@ -23,6 +23,8 @@
Requires: horde >= 3.0
Requires: php-xml >= 4.1.0
Requires: vacation
+Requires: webapps
+Requires: webserver = apache
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -31,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
Vacation is a Horde module for managing user e-mail "vacation notices"
@@ -65,54 +69,81 @@
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp} \
+install -d $RPM_BUILD_ROOT%{_sysconfdir} \
$RPM_BUILD_ROOT%{_appdir}/{docs,graphics,lib,locale,scripts,templates}
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
-touch $RPM_BUILD_ROOT%{_sysconfdir}/%{_hordeapp}/conf.php.bak
+echo '<?php ?>' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.php
+touch $RPM_BUILD_ROOT%{_sysconfdir}/conf.php.bak
cp -pR graphics/* $RPM_BUILD_ROOT%{_appdir}/graphics
cp -pR lib/* $RPM_BUILD_ROOT%{_appdir}/lib
cp -pR locale/* $RPM_BUILD_ROOT%{_appdir}/locale
cp -pR templates/* $RPM_BUILD_ROOT%{_appdir}/templates
-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
+%triggerin -- apache < 2.2.0, apache-base
+%webapp_register httpd %{_webapp}
-%triggerun -- apache >= 2.0.0
-%apache_config_uninstall -v 2
+%triggerun -- apache < 2.2.0, apache-base
+%webapp_unregister httpd %{_webapp}
+
+%triggerpostun -- horde-%{_hordeapp} < 2.2.2-0.2, %{_hordeapp}
+for i in conf.php longIntro.txt mime_drivers.php prefs.php sourceroots.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
+ %service -q apache reload
+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
+ %service -q httpd reload
+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(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
%dir %{_appdir}
%{_appdir}/*.php
@@ -129,6 +160,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.3 2006/02/06 13:52:25 baggins
+- webapp support
+
Revision 1.2 2005/10/23 20:16:02 qboosh
- pl
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/horde-vacation.spec?r1=1.2&r2=1.3&f=u
More information about the pld-cvs-commit
mailing list