SPECS (DEVEL): cowiki.spec - up to 2006-02-06 snap - use webapps
glen
glen at pld-linux.org
Tue Feb 7 00:25:59 CET 2006
Author: glen Date: Mon Feb 6 23:25:59 2006 GMT
Module: SPECS Tag: DEVEL
---- Log message:
- up to 2006-02-06 snap
- use webapps
---- Files affected:
SPECS:
cowiki.spec (1.8.2.8 -> 1.8.2.9)
---- Diffs:
================================================================
Index: SPECS/cowiki.spec
diff -u SPECS/cowiki.spec:1.8.2.8 SPECS/cowiki.spec:1.8.2.9
--- SPECS/cowiki.spec:1.8.2.8 Mon Nov 7 21:02:10 2005
+++ SPECS/cowiki.spec Tue Feb 7 00:25:54 2006
@@ -2,16 +2,8 @@
# TODO
# - lighttpd integration possible <http://wiki.lighttpd.net/33.html>.
-# snapshot: DATE
-%define _snap 2005-11-07
-
-%if 0%{?_snap}
-%define _source http://snaps.cowiki.org/%{name}-%{version}-interim-%{_snap}.tar.gz
-%else
-%define _source http://www.cowiki.org/download/%{name}-%{version}.tar.gz
-%endif
-%define _rel 0.9
-
+%define _snap 2006-02-06
+%define _rel 0.2
Summary: Web collaboration tool
Summary(pl): Narzędzie do współpracy i współtworzenia w sieci
Name: cowiki
@@ -20,22 +12,24 @@
Epoch: 0
License: GPL
Group: Applications/WWW
-Source0: %{_source}
-# Source0-md5: aea66d8526e1633b942ad2f6d3aa1110
+Source0: http://snaps.cowiki.org/%{name}-%{version}-interim-%{_snap}.tar.gz
+# Source0-md5: 522d3d73abc928516b1982f258633da5
Source1: %{name}.conf
Patch0: %{name}-FHS.patch
Patch1: %{name}-config.patch
URL: http://cowiki.org/
-BuildRequires: rpmbuild(macros) >= 1.221
+BuildRequires: rpmbuild(macros) >= 1.268
Requires: php >= 4:5.0.2
-Requires: php-mysql
Requires: php-dom
-Requires: apache(mod_auth)
+Requires: php-mysql
+Requires: webapps
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _appdir %{_datadir}/%{name}
-%define _sysconfdir /etc/%{name}
+%define _webapps /etc/webapps
+%define _webapp %{name}
+%define _sysconfdir %{_webapps}/%{_webapp}
+%define _appdir %{_datadir}/%{_webapp}
%description
coWiki is a sophisticated but easy to use web collaboration tool that
@@ -57,7 +51,7 @@
Summary: coWiki setup package
Summary(pl): Pakiet do wstępnej konfiguracji coWiki
Group: Applications/WWW
-PreReq: %{name} = %{epoch}:%{version}-%{release}
+Requires: %{name} = %{epoch}:%{version}-%{release}
%description setup
Install this package to configure initial coWiki installation. You
@@ -86,6 +80,7 @@
cp -a htdocs includes misc $RPM_BUILD_ROOT%{_appdir}
install core.conf-dist $RPM_BUILD_ROOT%{_sysconfdir}/core.conf
install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
# for setup
install LICENSE $RPM_BUILD_ROOT%{_appdir}/htdocs/setup
@@ -124,30 +119,63 @@
touch %{_appdir}/htdocs/install.seal
fi
-%triggerin -- apache1 >= 1.3.33-2
-%apache_config_install -v 1 -c %{_sysconfdir}/apache.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.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}
# cache dir moved
%triggerun -- %{name} < 0.4.0-0.20050618.3
# FIXME could suffer too many arguments error
rm -f /var/lib/%{name}/*
+%triggerpostun -- %{name} < 0.4.0-0.20060206.0.2
+# rescue app config
+if [ -f /etc/%{name}/core.conf.rpmsave ]; then
+ mv -f %{_sysconfdir}/core.conf{,.rpmnew}
+ mv -f /etc/%{name}/core.conf.rpmsave %{_sysconfdir}/core.conf
+fi
+# migrate from apache-config macros
+if [ -f /etc/%{name}/apache.conf.rpmsave ]; then
+ if [ -d /etc/apache/webapps.d ]; then
+ cp -f %{_sysconfdir}/apache.conf{,.rpmnew}
+ cp -f /etc/%{name}/apache.conf.rpmsave %{_sysconfdir}/apache.conf
+ fi
+
+ if [ -d /etc/httpd/webapps.d ]; then
+ cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
+ cp -f /etc/%{name}/apache.conf.rpmsave %{_sysconfdir}/httpd.conf
+ fi
+ rm -f /etc/%{name}/apache.conf.rpmsave
+fi
+
+# migrating from earlier apache-config?
+if [ -L /etc/apache/conf.d/99_%{name}.conf ]; then
+ rm -f /etc/apache/conf.d/99_%{name}.conf
+ /usr/sbin/webapp register apache %{_webapp}
+ %service -q apache reload
+fi
+if [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then
+ rm -f /etc/httpd/httpd.conf/99_%{name}.conf
+ /usr/sbin/webapp register httpd %{_webapp}
+ %service -q httpd reload
+fi
+
%files
%defattr(644,root,root,755)
%doc ChangeLog INSTALL* NEWS
%doc README.IDIOM README.PLUGIN SKEL.PLUGIN
%doc misc/database
-%attr(751,root,root) %dir %{_sysconfdir}
+%dir %attr(750,root,http) %{_sysconfdir}
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/core.conf
%dir %{_appdir}
@@ -183,6 +211,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.8.2.9 2006/02/06 23:25:54 glen
+- up to 2006-02-06 snap
+- use webapps
+
Revision 1.8.2.8 2005/11/07 20:02:10 glen
- added setup subpackage
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/cowiki.spec?r1=1.8.2.8&r2=1.8.2.9&f=u
More information about the pld-cvs-commit
mailing list