2 # - lighttpd integration possible <http://wiki.lighttpd.net/33.html>.
4 %define _snap 2006-02-06
6 Summary: Web collaboration tool
7 Summary(pl): Narzêdzie do wspó³pracy i wspó³tworzenia w sieci
10 Release: %{?_snap:0.%(echo %{_snap} | tr -d -).}%{_rel}
13 Group: Applications/WWW
14 Source0: http://snaps.cowiki.org/%{name}-%{version}-interim-%{_snap}.tar.gz
15 # Source0-md5: 522d3d73abc928516b1982f258633da5
17 Patch0: %{name}-FHS.patch
18 Patch1: %{name}-config.patch
19 URL: http://cowiki.org/
20 BuildRequires: rpmbuild(macros) >= 1.268
21 Requires: php >= 4:5.0.2
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 %define _webapps /etc/webapps
29 %define _webapp %{name}
30 %define _sysconfdir %{_webapps}/%{_webapp}
31 %define _appdir %{_datadir}/%{_webapp}
34 coWiki is a sophisticated but easy to use web collaboration tool that
35 helps you and your co-workers to create and organize web documents,
36 weblogs and knowledgebases or any other document structures directly
37 in their HTML browser. You may evolve ideas and gain a concomitant XML
38 documentation of your brainstorming without having to concentrate on
39 complicated structural syntaxes.
42 coWiki to wyszukane, ale ³atwe w u¿yciu narzêdzie do pracy zespo³owej
43 przez WWW pomagaj±ce wspó³pracownikom tworzyæ i organizowaæ dokumenty
44 WWW, weblogi, bazy wiedzy lub dowolne inne struktury dokumentów
45 bezpo¶rednio w przegl±darce HTML. Mo¿na rozwijaæ idee i otrzymywaæ
46 towarzysz±c± dokumentacjê XML burzy mózgów bez potrzeby koncentrowania
47 siê na skomplikowanej sk³adni strukturalnej.
50 Summary: coWiki setup package
51 Summary(pl): Pakiet do wstêpnej konfiguracji coWiki
52 Group: Applications/WWW
53 Requires: %{name} = %{epoch}:%{version}-%{release}
56 Install this package to configure initial coWiki installation. You
57 should uninstall this package when you're done, as it considered
58 insecure to keep the setup files in place.
60 %description setup -l pl
61 Ten pakiet nale¿y zainstalowaæ w celu wstêpnej konfiguracji coWiki po
62 pierwszej instalacji. Potem nale¿y go odinstalowaæ, jako ¿e
63 pozostawienie plików instalacyjnych mog³oby byæ niebezpieczne.
66 %setup -q %{?_snap:-n %{name}-%{version}-interim-%{_snap}}
70 mv includes/cowiki/core.conf-dist .
71 rm {htdocs,includes/cowiki}/.cvsignore
73 rm htdocs/setup/LICENSE # GPL
76 rm -rf $RPM_BUILD_ROOT
77 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir},/var/cache/%{name}}
79 cp -a htdocs includes misc $RPM_BUILD_ROOT%{_appdir}
80 install core.conf-dist $RPM_BUILD_ROOT%{_sysconfdir}/core.conf
81 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
82 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
85 install LICENSE $RPM_BUILD_ROOT%{_appdir}/htdocs/setup
86 install core.conf-dist $RPM_BUILD_ROOT%{_appdir}/includes/cowiki/core.conf-dist
87 touch $RPM_BUILD_ROOT%{_appdir}/htdocs/install.seal
90 rm -rf $RPM_BUILD_ROOT
94 %banner %{name} -e <<EOF
95 Install the database using the appropriate "misc/database/*.sql" schema.
96 You must setup authorization and coWiki root password in:
97 - %{_sysconfdir}/core.conf
103 if [ "$1" = "0" ]; then
105 # FIXME could suffer too many arguments error
106 rm -f /var/cache/%{name}/*
110 chgrp http %{_appdir}/{htdocs/include.path,htdocs,includes/cowiki}
111 chmod g+w %{_appdir}/{htdocs/include.path,htdocs,includes/cowiki}
112 rm -f %{_appdir}/htdocs/install.seal
115 if [ "$1" = "0" ]; then
116 chgrp root %{_appdir}/{htdocs/include.path,htdocs,includes/cowiki}
117 chmod g-w %{_appdir}/{htdocs/include.path,htdocs,includes/cowiki}
118 touch %{_appdir}/htdocs/install.seal
121 %triggerin -- apache1
122 %webapp_register apache %{_webapp}
124 %triggerun -- apache1
125 %webapp_unregister apache %{_webapp}
127 %triggerin -- apache < 2.2.0, apache-base
128 %webapp_register httpd %{_webapp}
130 %triggerun -- apache < 2.2.0, apache-base
131 %webapp_unregister httpd %{_webapp}
134 %triggerun -- %{name} < 0.4.0-0.20050618.3
135 # FIXME could suffer too many arguments error
136 rm -f /var/lib/%{name}/*
138 %triggerpostun -- %{name} < 0.4.0-0.20060206.0.2
140 if [ -f /etc/%{name}/core.conf.rpmsave ]; then
141 mv -f %{_sysconfdir}/core.conf{,.rpmnew}
142 mv -f /etc/%{name}/core.conf.rpmsave %{_sysconfdir}/core.conf
144 # migrate from apache-config macros
145 if [ -f /etc/%{name}/apache.conf.rpmsave ]; then
146 if [ -d /etc/apache/webapps.d ]; then
147 cp -f %{_sysconfdir}/apache.conf{,.rpmnew}
148 cp -f /etc/%{name}/apache.conf.rpmsave %{_sysconfdir}/apache.conf
151 if [ -d /etc/httpd/webapps.d ]; then
152 cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
153 cp -f /etc/%{name}/apache.conf.rpmsave %{_sysconfdir}/httpd.conf
155 rm -f /etc/%{name}/apache.conf.rpmsave
158 # migrating from earlier apache-config?
159 if [ -L /etc/apache/conf.d/99_%{name}.conf ]; then
160 rm -f /etc/apache/conf.d/99_%{name}.conf
161 /usr/sbin/webapp register apache %{_webapp}
162 %service -q apache reload
164 if [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then
165 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
166 /usr/sbin/webapp register httpd %{_webapp}
167 %service -q httpd reload
171 %defattr(644,root,root,755)
172 %doc ChangeLog INSTALL* NEWS
173 %doc README.IDIOM README.PLUGIN SKEL.PLUGIN
175 %dir %attr(750,root,http) %{_sysconfdir}
176 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
177 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
178 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/core.conf
182 %dir %{_appdir}/includes
183 %dir %{_appdir}/includes/cowiki
184 %{_appdir}/includes/cowiki/class
185 %{_appdir}/includes/cowiki/locale
186 %{_appdir}/includes/cowiki/plugin
187 %{_appdir}/includes/cowiki/*.php
188 %dir %{_appdir}/htdocs
189 %{_appdir}/htdocs/img
190 %{_appdir}/htdocs/tpl
191 %{_appdir}/htdocs/*.txt
192 %{_appdir}/htdocs/*.php
193 %{_appdir}/htdocs/favicon.ico
194 %{_appdir}/htdocs/include.path
196 %dir %attr(770,root,http) /var/cache/%{name}
199 %config(noreplace,missingok) %verify(not md5 mtime size) %{_appdir}/htdocs/install.seal
202 %defattr(644,root,root,755)
203 %{_appdir}/htdocs/setup
204 %{_appdir}/htdocs/install.pending
205 %{_appdir}/includes/cowiki/core.conf-dist