SPECS: horde-ingo.spec, horde-jonah.spec, horde-klutz.spec, horde-...
glen
glen at pld-linux.org
Mon Nov 28 12:36:07 CET 2005
Author: glen Date: Mon Nov 28 11:36:06 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- use webapps framework
---- Files affected:
SPECS:
horde-ingo.spec (1.11 -> 1.12) , horde-jonah.spec (1.3 -> 1.4) , horde-klutz.spec (1.7 -> 1.8) , horde-kronolith.spec (1.26 -> 1.27)
---- Diffs:
================================================================
Index: SPECS/horde-ingo.spec
diff -u SPECS/horde-ingo.spec:1.11 SPECS/horde-ingo.spec:1.12
--- SPECS/horde-ingo.spec:1.11 Wed Nov 16 15:17:51 2005
+++ SPECS/horde-ingo.spec Mon Nov 28 12:35:56 2005
@@ -2,7 +2,7 @@
%define _hordeapp ingo
#define _snap 2005-08-26
#define _rc rc1
-%define _rel 1
+%define _rel 1.1
#
%include /usr/lib/rpm/macros.php
Summary: Ingo - an email filter rules manager
@@ -22,6 +22,7 @@
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
@@ -33,8 +34,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
Ingo currently supports the following filtering drivers:
@@ -73,55 +76,87 @@
%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} < 1.0.2-1.1
+for i in backends.php conf.php conf.xml fields.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
@@ -138,6 +173,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.12 2005/11/28 11:35:56 glen
+- use webapps framework
+
Revision 1.11 2005/11/16 14:17:51 glen
- unified apache virtual requires
================================================================
Index: SPECS/horde-jonah.spec
diff -u SPECS/horde-jonah.spec:1.3 SPECS/horde-jonah.spec:1.4
--- SPECS/horde-jonah.spec:1.3 Wed Nov 16 15:17:51 2005
+++ SPECS/horde-jonah.spec Mon Nov 28 12:35:56 2005
@@ -2,7 +2,7 @@
%define _hordeapp jonah
%define _snap 2005-09-17
#define _rc rc1
-%define _rel 0.5
+%define _rel 0.6
#
%include /usr/lib/rpm/macros.php
Summary: Jonah is the Horde portal project
@@ -22,6 +22,7 @@
Requires: apache(mod_access)
Requires: horde >= 3.0
Requires: php-mysql
+Requires: webapps
Requires: webserver = apache
Conflicts: apache < 1.3.33-2
BuildArch: noarch
@@ -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
Jonah is the Horde portal project. It currently provides a framework
@@ -60,17 +63,17 @@
%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} \
$RPM_BUILD_ROOT%{_appdir}/{channels,delivery,lists,stories}
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
@@ -81,16 +84,17 @@
cp -pR lists/* $RPM_BUILD_ROOT%{_appdir}/lists
cp -pR stories/* $RPM_BUILD_ROOT%{_appdir}/stories
-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
@@ -102,27 +106,59 @@
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.2-0.20050917.0.6
+for i in conf.php conf.xml prefs.php templates.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 LICENSE 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
@@ -144,6 +180,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.4 2005/11/28 11:35:56 glen
+- use webapps framework
+
Revision 1.3 2005/11/16 14:17:51 glen
- unified apache virtual requires
================================================================
Index: SPECS/horde-klutz.spec
diff -u SPECS/horde-klutz.spec:1.7 SPECS/horde-klutz.spec:1.8
--- SPECS/horde-klutz.spec:1.7 Wed Nov 16 15:17:51 2005
+++ SPECS/horde-klutz.spec Mon Nov 28 12:35:56 2005
@@ -4,7 +4,7 @@
%define _hordeapp klutz
%define _snap 2005-08-01
#define _rc rc1
-%define _rel 0.2
+%define _rel 0.3
#
%include /usr/lib/rpm/macros.php
Summary: Horde comics-fetching module
@@ -23,6 +23,7 @@
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
@@ -34,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
Klutz is an application for viewing comic strips. It lets you view
@@ -60,34 +63,37 @@
# considered harmful (horde/docs/SECURITY)
rm -f test.php
+rm -f scripts/.htaccess
+
%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
# CHECK FIRST DOES IT HAVE SQL AND FILE THERE.
@@ -100,28 +106,59 @@
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.20050801.0.3
+for i in comics.php 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) %config(noreplace) %{_sysconfdir}/%{_hordeapp}/comics.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) %config(noreplace) %{_sysconfdir}/comics.php
+%attr(640,root,http) %{_sysconfdir}/conf.xml
%dir %{_appdir}
%{_appdir}/*.php
@@ -138,6 +175,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.8 2005/11/28 11:35:56 glen
+- use webapps framework
+
Revision 1.7 2005/11/16 14:17:51 glen
- unified apache virtual requires
================================================================
Index: SPECS/horde-kronolith.spec
diff -u SPECS/horde-kronolith.spec:1.26 SPECS/horde-kronolith.spec:1.27
--- SPECS/horde-kronolith.spec:1.26 Wed Nov 16 15:17:51 2005
+++ SPECS/horde-kronolith.spec Mon Nov 28 12:35:56 2005
@@ -2,7 +2,7 @@
%define _hordeapp kronolith
#define _snap 2005-08-01
#define _rc rc1
-%define _rel 1
+%define _rel 1.1
#
%include /usr/lib/rpm/macros.php
Summary: Kronolith - calendar for Horde
@@ -23,6 +23,7 @@
Requires: apache(mod_access)
Requires: horde >= 3.0
Requires: php-xml >= 3:4.1.0
+Requires: webapps
Requires: webserver = apache
Obsoletes: %{_hordeapp}
Conflicts: apache < 1.3.33-2
@@ -34,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
Kronolith is the Horde calendar application. It provides a stable and
@@ -75,32 +78,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
+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
@@ -113,27 +117,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.4-1.1
+for i in conf.php conf.xml keywords.php 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
+
+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
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/SPECS/horde-ingo.spec?r1=1.11&r2=1.12&f=u
http://cvs.pld-linux.org/SPECS/horde-jonah.spec?r1=1.3&r2=1.4&f=u
http://cvs.pld-linux.org/SPECS/horde-klutz.spec?r1=1.7&r2=1.8&f=u
http://cvs.pld-linux.org/SPECS/horde-kronolith.spec?r1=1.26&r2=1.27&f=u
More information about the pld-cvs-commit
mailing list