SPECS: cowiki.spec - merged from DEVEL
glen
glen at pld-linux.org
Fri Mar 17 02:33:45 CET 2006
Author: glen Date: Fri Mar 17 01:33:45 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- merged from DEVEL
---- Files affected:
SPECS:
cowiki.spec (1.10 -> 1.11)
---- Diffs:
================================================================
Index: SPECS/cowiki.spec
diff -u SPECS/cowiki.spec:1.10 SPECS/cowiki.spec:1.11
--- SPECS/cowiki.spec:1.10 Sun Nov 20 23:21:55 2005
+++ SPECS/cowiki.spec Fri Mar 17 02:33:40 2006
@@ -2,37 +2,33 @@
# TODO
# - lighttpd integration possible <http://wiki.lighttpd.net/33.html>.
-# snapshot: DATE
-#define _snap 2005-02-20
-
-%if 0%{?_snap}
-%define _source http://snaps.cowiki.org/%{name}-%{version}-dev-%{_snap}.tar.gz
-%else
-%define _source http://www.cowiki.org/download/%{name}-%{version}.tar.gz
-%endif
-%define _rel 2
-
+%define _snap 2006-02-06
+%define _rel 0.3
Summary: Web collaboration tool
Summary(pl): Narzędzie do współpracy i współtworzenia w sieci
Name: cowiki
-Version: 0.3.4
+Version: 0.4.0
Release: %{?_snap:0.%(echo %{_snap} | tr -d -).}%{_rel}
-Epoch: 0
License: GPL
Group: Applications/WWW
-Source0: %{_source}
-# Source0-md5: 33d0b6506e39846666434cc3ba2f95bd
+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.226
+BuildRequires: rpmbuild(macros) >= 1.268
Requires: php >= 4:5.0.2
+Requires: php-dom
Requires: php-mysql
-Requires: apache(mod_auth)
+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
@@ -50,67 +46,54 @@
towarzyszącą dokumentację XML burzy mózgów bez potrzeby koncentrowania
się na skomplikowanej składni strukturalnej.
+%package setup
+Summary: coWiki setup package
+Summary(pl): Pakiet do wstępnej konfiguracji coWiki
+Group: Applications/WWW
+Requires: %{name} = %{version}-%{release}
+
+%description setup
+Install this package to configure initial coWiki installation. You
+should uninstall this package when you're done, as it considered
+insecure to keep the setup files in place.
+
+%description setup -l pl
+Ten pakiet należy zainstalować w celu wstępnej konfiguracji coWiki po
+pierwszej instalacji. Potem należy go odinstalować, jako że
+pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
+
%prep
-%setup -q %{?_snap:-n %{name}-%{version}-dev-%{_snap}}
+%setup -q %{?_snap:-n %{name}-%{version}-interim-%{_snap}}
%patch0 -p1
+%patch1 -p1
mv includes/cowiki/core.conf-dist .
-rm -f {htdocs,includes/cowiki}/.cvsignore
+rm {htdocs,includes/cowiki}/.cvsignore
mv htdocs/.htaccess .
+rm htdocs/setup/LICENSE # GPL
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir},/var/lib/%{name}}
-
-cp -a htdocs includes $RPM_BUILD_ROOT%{_appdir}
+install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir},/var/cache/%{name}}
-sed -e '
- s,CHECK_INTERVAL = .*,CHECK_INTERVAL = "-1",
- s,RETURN_PATH = .*,RETURN_PATH = "your.bounce.email at localhost",
- s,ABUSE_PATH = .*,ABUSE_PATH = "abuse at localhost",
- s,ROOT_PASSWD = .*,ROOT_PASSWD = "XXX",
- s,LOOKUP_DNS = .*,LOOKUP_DNS = off,
- s,TEMP = .*,TEMP = "/var/lib/%{name}/",
-
-' core.conf-dist > $RPM_BUILD_ROOT%{_sysconfdir}/core.conf
-echo -e '\n; vim: ft=dosini' >> $RPM_BUILD_ROOT%{_sysconfdir}/core.conf
-
-# unfortunately cowiki works only as vhost root
-cat <<EOF >> $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
-<Directory /usr/share/cowiki/htdocs>
- Allow from all
-</Directory>
-
-<VirtualHost *>
- ServerName cowiki
- DocumentRoot /usr/share/cowiki/htdocs
-
-EOF
-sed -ne '/BEGIN/,/END/p' .htaccess >> $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
-cat <<EOF >> $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
-</VirtualHost>
-EOF
+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
+install core.conf-dist $RPM_BUILD_ROOT%{_appdir}/includes/cowiki/core.conf-dist
+touch $RPM_BUILD_ROOT%{_appdir}/htdocs/install.seal
%clean
rm -rf $RPM_BUILD_ROOT
-%triggerin -- apache1 >= 1.3.33-2
-%apache_config_install -v 1 -c %{_sysconfdir}/apache.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.conf
-
-%triggerun -- apache >= 2.0.0
-%apache_config_uninstall -v 2
-
%post
if [ "$1" = 1 ]; then
%banner %{name} -e <<EOF
Install the database using the appropriate "misc/database/*.sql" schema.
-You must setup authorization and root password in:
+You must setup authorization and coWiki root password in:
- %{_sysconfdir}/core.conf
EOF
@@ -120,19 +103,106 @@
if [ "$1" = "0" ]; then
# nuke cache
# FIXME could suffer too many arguments error
- rm -f /var/lib/%{name}/*
+ rm -f /var/cache/%{name}/*
+fi
+
+%post setup
+chgrp http %{_appdir}/{htdocs/include.path,htdocs,includes/cowiki}
+chmod g+w %{_appdir}/{htdocs/include.path,htdocs,includes/cowiki}
+rm -f %{_appdir}/htdocs/install.seal
+
+%postun setup
+if [ "$1" = "0" ]; then
+ chgrp root %{_appdir}/{htdocs/include.path,htdocs,includes/cowiki}
+ chmod g-w %{_appdir}/{htdocs/include.path,htdocs,includes/cowiki}
+ touch %{_appdir}/htdocs/install.seal
+fi
+
+%triggerin -- apache1
+%webapp_register apache %{_webapp}
+
+%triggerun -- apache1
+%webapp_unregister apache %{_webapp}
+
+%triggerin -- apache < 2.2.0, apache-base
+%webapp_register httpd %{_webapp}
+
+%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 ChangeLog INSTALL* NEWS
%doc README.IDIOM README.PLUGIN SKEL.PLUGIN
%doc misc/database
-%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
-%{_appdir}
-%dir %attr(770,root,http) /var/lib/%{name}
+
+%dir %{_appdir}
+%{_appdir}/misc
+%dir %{_appdir}/includes
+%dir %{_appdir}/includes/cowiki
+%{_appdir}/includes/cowiki/class
+%{_appdir}/includes/cowiki/locale
+%{_appdir}/includes/cowiki/plugin
+%{_appdir}/includes/cowiki/*.php
+%dir %{_appdir}/htdocs
+%{_appdir}/htdocs/img
+%{_appdir}/htdocs/tpl
+%{_appdir}/htdocs/*.txt
+%{_appdir}/htdocs/*.php
+%{_appdir}/htdocs/favicon.ico
+%{_appdir}/htdocs/include.path
+
+%dir %attr(770,root,http) /var/cache/%{name}
+
+# setup seal
+%config(noreplace,missingok) %verify(not md5 mtime size) %{_appdir}/htdocs/install.seal
+
+%files setup
+%defattr(644,root,root,755)
+%{_appdir}/htdocs/setup
+%{_appdir}/htdocs/install.pending
+%{_appdir}/includes/cowiki/core.conf-dist
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
@@ -140,11 +210,45 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.11 2006/03/17 01:33:40 glen
+- merged from DEVEL
+
+Revision 1.8.2.10 2006/02/06 23:46:17 glen
+- drop epoch 0 usage
+
+Revision 1.8.2.9 2006/02/06 23:25:54 glen
+- up to 2006-02-06 snap
+- use webapps
+
Revision 1.10 2005/11/20 22:21:55 glen
- php epoch
+Revision 1.8.2.8 2005/11/07 20:02:10 glen
+- added setup subpackage
+
+Revision 1.8.2.7 2005/11/07 18:51:53 glen
+- R dom
+
+Revision 1.8.2.6 2005/11/07 18:49:43 glen
+- standard permission for webapp config dir
+
+Revision 1.8.2.5 2005/11/07 18:42:37 glen
+- rpmbuild(macros) for used rpm macros
+
+Revision 1.8.2.4 2005/11/07 18:41:31 glen
+- use config and patches instead of inline edit in .spec
+
+Revision 1.8.2.3 2005/11/07 18:35:42 glen
+- 2005-11-07 snap; fix preun
+
Revision 1.9 2005/07/19 13:45:19 glen
- use apache config triggers; rel 2
+
+Revision 1.8.2.2 2005/07/19 13:36:42 glen
+- rel .7
+
+Revision 1.8.2.1 2005/06/18 11:32:21 glen
+- 2005-06-18 snap
Revision 1.8 2005/06/18 10:49:07 glen
- R: apache(mod_auth)
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/cowiki.spec?r1=1.10&r2=1.11&f=u
More information about the pld-cvs-commit
mailing list