2 # - lighttpd integration possible <http://wiki.lighttpd.net/33.html>.
3 # - theoretically mysql,mysqli,pgsql,sqlite connectors are possible.
5 %define _snap 2006-03-17
7 Summary: Web collaboration tool
8 Summary(pl): Narzêdzie do wspó³pracy i wspó³tworzenia w sieci
11 Release: %{?_snap:1.%(echo %{_snap} | tr -d -).}%{_rel}
13 Group: Applications/WWW
14 Source0: http://snaps.cowiki.org/%{name}-%{version}-interim-%{_snap}.tar.gz
15 # Source0-md5: 2aaf6115460ca1674d6de381f07a4e68
17 Patch0: %{name}-FHS.patch
18 Patch1: %{name}-config.patch
19 Patch2: %{name}-https.patch
20 URL: http://www.cowiki.org/
21 BuildRequires: rpmbuild(macros) >= 1.268
22 Requires: apache(mod_dir)
24 Requires: php >= 4:5.0.2
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 %define _webapps /etc/webapps
33 %define _webapp %{name}
34 %define _sysconfdir %{_webapps}/%{_webapp}
35 %define _appdir %{_datadir}/%{_webapp}
38 coWiki is a sophisticated but easy to use web collaboration tool that
39 helps you and your co-workers to create and organize web documents,
40 weblogs and knowledgebases or any other document structures directly
41 in their HTML browser. You may evolve ideas and gain a concomitant XML
42 documentation of your brainstorming without having to concentrate on
43 complicated structural syntaxes.
46 coWiki to wyszukane, ale ³atwe w u¿yciu narzêdzie do pracy zespo³owej
47 przez WWW pomagaj±ce wspó³pracownikom tworzyæ i organizowaæ dokumenty
48 WWW, weblogi, bazy wiedzy lub dowolne inne struktury dokumentów
49 bezpo¶rednio w przegl±darce HTML. Mo¿na rozwijaæ idee i otrzymywaæ
50 towarzysz±c± dokumentacjê XML burzy mózgów bez potrzeby koncentrowania
51 siê na skomplikowanej sk³adni strukturalnej.
54 Summary: coWiki setup package
55 Summary(pl): Pakiet do wstêpnej konfiguracji coWiki
56 Group: Applications/WWW
57 Requires: %{name} = %{version}-%{release}
60 Install this package to configure initial coWiki installation. You
61 should uninstall this package when you're done, as it considered
62 insecure to keep the setup files in place.
64 %description setup -l pl
65 Ten pakiet nale¿y zainstalowaæ w celu wstêpnej konfiguracji coWiki po
66 pierwszej instalacji. Potem nale¿y go odinstalowaæ, jako ¿e
67 pozostawienie plików instalacyjnych mog³oby byæ niebezpieczne.
70 %setup -q %{?_snap:-n %{name}-%{version}-interim-%{_snap}}
75 mv includes/cowiki/core.conf-dist .
76 rm {htdocs,includes/cowiki}/.cvsignore
78 rm htdocs/setup/LICENSE # GPL
80 cat <<'EOF' > misc/database/mysql-grant.sql
81 # this schema will grant MySQL database access
82 GRANT SELECT, INSERT, UPDATE, DELETE ON cowiki.* TO 'cowiki'@'localhost' IDENTIFIED BY 'password
87 rm -rf $RPM_BUILD_ROOT
88 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir},/var/cache/%{name}}
90 cp -a htdocs includes misc $RPM_BUILD_ROOT%{_appdir}
91 install core.conf-dist $RPM_BUILD_ROOT%{_sysconfdir}/core.conf
92 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
93 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
96 install LICENSE $RPM_BUILD_ROOT%{_appdir}/htdocs/setup
97 install core.conf-dist $RPM_BUILD_ROOT%{_appdir}/includes/cowiki/core.conf-dist
98 touch $RPM_BUILD_ROOT%{_appdir}/htdocs/install.seal
101 rm -rf $RPM_BUILD_ROOT
104 if [ "$1" = 1 ]; then
105 %banner %{name} -e <<EOF
106 Install the database using the appropriate "misc/database/*.sql" schema.
107 You must setup authorization and coWiki root password in:
108 - %{_sysconfdir}/core.conf
114 if [ "$1" = "0" ]; then
116 # FIXME could suffer too many arguments error
117 rm -f /var/cache/%{name}/*
121 chgrp http %{_appdir}/{htdocs/include.path,htdocs,includes/cowiki}
122 chmod g+w %{_appdir}/{htdocs/include.path,htdocs,includes/cowiki}
123 rm -f %{_appdir}/htdocs/install.seal
126 if [ "$1" = "0" ]; then
127 chgrp root %{_appdir}/{htdocs/include.path,htdocs,includes/cowiki}
128 chmod g-w %{_appdir}/{htdocs/include.path,htdocs,includes/cowiki}
129 touch %{_appdir}/htdocs/install.seal
132 %triggerin -- apache1
133 %webapp_register apache %{_webapp}
135 %triggerun -- apache1
136 %webapp_unregister apache %{_webapp}
138 %triggerin -- apache < 2.2.0, apache-base
139 %webapp_register httpd %{_webapp}
141 %triggerun -- apache < 2.2.0, apache-base
142 %webapp_unregister httpd %{_webapp}
145 %triggerun -- %{name} < 0.4.0-0.20050618.3
146 # FIXME could suffer too many arguments error
147 rm -f /var/lib/%{name}/*
149 %triggerpostun -- %{name} < 0.4.0-0.20060206.0.2
151 if [ -f /etc/%{name}/core.conf.rpmsave ]; then
152 mv -f %{_sysconfdir}/core.conf{,.rpmnew}
153 mv -f /etc/%{name}/core.conf.rpmsave %{_sysconfdir}/core.conf
155 # migrate from apache-config macros
156 if [ -f /etc/%{name}/apache.conf.rpmsave ]; then
157 if [ -d /etc/apache/webapps.d ]; then
158 cp -f %{_sysconfdir}/apache.conf{,.rpmnew}
159 cp -f /etc/%{name}/apache.conf.rpmsave %{_sysconfdir}/apache.conf
162 if [ -d /etc/httpd/webapps.d ]; then
163 cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
164 cp -f /etc/%{name}/apache.conf.rpmsave %{_sysconfdir}/httpd.conf
166 rm -f /etc/%{name}/apache.conf.rpmsave
169 # migrating from earlier apache-config?
170 if [ -L /etc/apache/conf.d/99_%{name}.conf ]; then
171 rm -f /etc/apache/conf.d/99_%{name}.conf
172 /usr/sbin/webapp register apache %{_webapp}
173 %service -q apache reload
175 if [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then
176 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
177 /usr/sbin/webapp register httpd %{_webapp}
178 %service -q httpd reload
182 %defattr(644,root,root,755)
183 %doc ChangeLog INSTALL* NEWS
184 %doc README.IDIOM README.PLUGIN SKEL.PLUGIN
186 %dir %attr(750,root,http) %{_sysconfdir}
187 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
188 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
189 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/core.conf
193 %dir %{_appdir}/includes
194 %dir %{_appdir}/includes/cowiki
195 %{_appdir}/includes/cowiki/class
196 %{_appdir}/includes/cowiki/locale
197 %{_appdir}/includes/cowiki/plugin
198 %{_appdir}/includes/cowiki/*.php
199 %dir %{_appdir}/htdocs
200 %{_appdir}/htdocs/img
201 %{_appdir}/htdocs/tpl
202 %{_appdir}/htdocs/*.txt
203 %{_appdir}/htdocs/*.php
204 %{_appdir}/htdocs/favicon.ico
205 %{_appdir}/htdocs/include.path
207 %dir %attr(770,root,http) /var/cache/%{name}
210 %config(noreplace,missingok) %verify(not md5 mtime size) %{_appdir}/htdocs/install.seal
213 %defattr(644,root,root,755)
214 %{_appdir}/htdocs/setup
215 %{_appdir}/htdocs/install.pending
216 %{_appdir}/includes/cowiki/core.conf-dist