SPECS: mimp.spec - use apache config triggers
glen
glen at pld-linux.org
Wed Jul 20 23:48:20 CEST 2005
Author: glen Date: Wed Jul 20 21:48:20 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- use apache config triggers
---- Files affected:
SPECS:
mimp.spec (1.5 -> 1.6)
---- Diffs:
================================================================
Index: SPECS/mimp.spec
diff -u SPECS/mimp.spec:1.5 SPECS/mimp.spec:1.6
--- SPECS/mimp.spec:1.5 Wed Jul 20 23:46:20 2005
+++ SPECS/mimp.spec Wed Jul 20 23:48:15 2005
@@ -18,6 +18,7 @@
Source1: %{name}.conf
Patch0: %{name}-prefs.patch
URL: http://www.horde.org/mimp/
+BuildRequires: rpmbuild(macros) >= 1.226
Requires: apache >= 1.3.33-2
Requires: apache(mod_access)
Requires: horde >= 3.0
@@ -31,8 +32,6 @@
%define hordedir /usr/share/horde
%define _appdir %{hordedir}/%{name}
%define _sysconfdir /etc/horde.org
-%define _apache1dir /etc/apache
-%define _apache2dir /etc/httpd
%description
MIMP is a project to create a version of IMP suitable for mobile
@@ -91,44 +90,23 @@
%clean
rm -rf $RPM_BUILD_ROOT
+%triggerin -- apache1 >= 1.3.33-2
+%apache_config_install -v 1 -c %{_sysconfdir}/apache-%{name}.conf
+
+%triggerun -- apache1 >= 1.3.33-2
+%apache_config_uninstall -v 1
+
+%triggerin -- apache >= 2.0.0
+%apache_config_install -v 2 -c %{_sysconfdir}/apache-%{name}.conf
+
+%triggerun -- apache >= 2.0.0
+%apache_config_uninstall -v 2
+
%post
if [ ! -f %{_sysconfdir}/%{name}/conf.php.bak ]; then
install /dev/null -o root -g http -m660 %{_sysconfdir}/%{name}/conf.php.bak
fi
-# apache1
-if [ -d %{_apache1dir}/conf.d ]; then
- ln -sf %{_sysconfdir}/apache-%{name}.conf %{_apache1dir}/conf.d/99_%{name}.conf
- if [ -f /var/lock/subsys/apache ]; then
- /etc/rc.d/init.d/apache restart 1>&2
- fi
-fi
-# apache2
-if [ -d %{_apache2dir}/httpd.conf ]; then
- ln -sf %{_sysconfdir}/apache-%{name}.conf %{_apache2dir}/httpd.conf/99_%{name}.conf
- if [ -f /var/lock/subsys/httpd ]; then
- /etc/rc.d/init.d/httpd restart 1>&2
- fi
-fi
-
-%postun
-if [ "$1" = "0" ]; then
- # apache1
- if [ -d %{_apache1dir}/conf.d ]; then
- rm -f %{_apache1dir}/conf.d/99_%{name}.conf
- if [ -f /var/lock/subsys/apache ]; then
- /etc/rc.d/init.d/apache restart 1>&2
- fi
- fi
- # apache2
- if [ -d %{_apache2dir}/httpd.conf ]; then
- rm -f %{_apache2dir}/httpd.conf/99_%{name}.conf
- if [ -f /var/lock/subsys/httpd ]; then
- /etc/rc.d/init.d/httpd restart 1>&2
- fi
- fi
-fi
-
%files
%defattr(644,root,root,755)
%doc README docs/*
@@ -155,6 +133,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.6 2005/07/20 21:48:15 glen
+- use apache config triggers
+
Revision 1.5 2005/07/20 21:46:20 glen
- 2005-07-20 snap
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/mimp.spec?r1=1.5&r2=1.6&f=u
More information about the pld-cvs-commit
mailing list