SPECS: horde-trean.spec - use webapps framework
glen
glen at pld-linux.org
Wed Nov 30 22:57:47 CET 2005
Author: glen Date: Wed Nov 30 21:57:47 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- use webapps framework
---- Files affected:
SPECS:
horde-trean.spec (1.11 -> 1.12)
---- Diffs:
================================================================
Index: SPECS/horde-trean.spec
diff -u SPECS/horde-trean.spec:1.11 SPECS/horde-trean.spec:1.12
--- SPECS/horde-trean.spec:1.11 Sat Sep 17 18:27:33 2005
+++ SPECS/horde-trean.spec Wed Nov 30 22:57:39 2005
@@ -2,7 +2,7 @@
%define _hordeapp trean
%define _snap 2005-09-03
#define _rc rc1
-%define _rel 0.1
+%define _rel 0.2
#
%include /usr/lib/rpm/macros.php
Summary: Horde Bookmarks application
@@ -19,10 +19,11 @@
BuildRequires: rpm-php-pearprov >= 4.0.2-98
BuildRequires: rpmbuild(macros) >= 1.226
BuildRequires: tar >= 1:1.15.1
-Requires: apache >= 1.3.33-2
Requires: apache(mod_access)
# docs say it requires 3.1, but seems work in 3.0 too
Requires: horde >= 3.0
+Requires: webapps
+Requires: webserver = apache
Obsoletes: %{_hordeapp}
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -32,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
The Trean (Bookmarks) application allows you to store, organize and
@@ -68,32 +71,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,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
-
-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
+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 -a lib/* $RPM_BUILD_ROOT%{_appdir}/lib
+cp -a locale/* $RPM_BUILD_ROOT%{_appdir}/locale
+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 %{_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
@@ -104,27 +108,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} < 0.1-0.20050903.0.2
+for i in conf.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
+
+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) %{_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
@@ -141,6 +176,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.12 2005/11/30 21:57:39 glen
+- use webapps framework
+
Revision 1.11 2005/09/17 16:27:33 glen
- renamed horde application packages with horde- prefix
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/horde-trean.spec?r1=1.11&r2=1.12&f=u
More information about the pld-cvs-commit
mailing list