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