2 # - lighttpd integration possible <http://wiki.lighttpd.net/33.html>.
3 # - theoretically mysql,mysqli,pgsql,sqlite connectors are possible.
5 %define _snap 2006-05-08
7 Summary: Web collaboration tool
8 Summary(pl.UTF-8): 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: f2843189fc24c854414a3e23a4b9ac95
17 Patch0: %{name}-FHS.patch
18 Patch1: %{name}-config.patch
19 Patch2: %{name}-https.patch
20 Patch3: %{name}-includepath.patch
21 Patch4: %{name}-tz.patch
22 Patch5: %{name}-webapps.patch
23 URL: http://www.cowiki.org/
24 BuildRequires: rpmbuild(macros) >= 1.268
25 Requires: apache(mod_dir)
31 Requires: webserver(php) >= 5.0.2
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 %define _webapps /etc/webapps
36 %define _webapp %{name}
37 %define _sysconfdir %{_webapps}/%{_webapp}
38 %define _appdir %{_datadir}/%{_webapp}
41 coWiki is a sophisticated but easy to use web collaboration tool that
42 helps you and your co-workers to create and organize web documents,
43 weblogs and knowledgebases or any other document structures directly
44 in their HTML browser. You may evolve ideas and gain a concomitant XML
45 documentation of your brainstorming without having to concentrate on
46 complicated structural syntaxes.
48 %description -l pl.UTF-8
49 coWiki to wyszukane, ale łatwe w użyciu narzędzie do pracy zespołowej
50 przez WWW pomagające współpracownikom tworzyć i organizować dokumenty
51 WWW, weblogi, bazy wiedzy lub dowolne inne struktury dokumentów
52 bezpośrednio w przeglądarce HTML. Można rozwijać idee i otrzymywać
53 towarzyszącą dokumentację XML burzy mózgów bez potrzeby koncentrowania
54 się na skomplikowanej składni strukturalnej.
57 Summary: coWiki setup package
58 Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji coWiki
59 Group: Applications/WWW
60 Requires: %{name} = %{version}-%{release}
63 Install this package to configure initial coWiki installation. You
64 should uninstall this package when you're done, as it considered
65 insecure to keep the setup files in place.
67 %description setup -l pl.UTF-8
68 Ten pakiet należy zainstalować w celu wstępnej konfiguracji coWiki po
69 pierwszej instalacji. Potem należy go odinstalować, jako że
70 pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
73 %setup -q %{?_snap:-n %{name}-%{version}-interim-%{_snap}}
81 mv includes/cowiki/core.conf-dist .
82 rm {htdocs,includes/cowiki}/.cvsignore
84 rm htdocs/setup/LICENSE # GPL
85 rm -f htdocs/include.path
87 cat <<'EOF' > misc/database/mysql-grant.sql
88 # this schema will grant MySQL database access
89 GRANT SELECT, INSERT, UPDATE, DELETE ON cowiki.* TO 'cowiki'@'localhost' IDENTIFIED BY 'password
95 ; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
100 rm -rf $RPM_BUILD_ROOT
101 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir},/var/cache/%{name}}
102 install -d $RPM_BUILD_ROOT/etc/php/apache{,2handler}.d
104 cp -a htdocs includes misc $RPM_BUILD_ROOT%{_appdir}
105 install core.conf-dist $RPM_BUILD_ROOT%{_sysconfdir}/core.conf
106 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
107 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
109 cp -a php.ini $RPM_BUILD_ROOT/etc/php/apache.d/%{name}.ini
110 cp -a php.ini $RPM_BUILD_ROOT/etc/php/apache2handler.d/%{name}.ini
113 install LICENSE $RPM_BUILD_ROOT%{_appdir}/htdocs/setup
114 install core.conf-dist $RPM_BUILD_ROOT%{_appdir}/includes/cowiki/core.conf-dist
115 touch $RPM_BUILD_ROOT%{_appdir}/htdocs/install.seal
118 rm -rf $RPM_BUILD_ROOT
121 if [ "$1" = 1 ]; then
122 %banner %{name} -e <<EOF
123 Install the database using the appropriate "misc/database/*.sql" schema.
124 You must setup authorization and coWiki root password in:
125 - %{_sysconfdir}/core.conf
131 if [ "$1" = "0" ]; then
133 # FIXME could suffer too many arguments error
134 rm -f /var/cache/%{name}/*
138 chgrp http %{_appdir}/{htdocs,includes/cowiki}
139 chmod g+w %{_appdir}/{htdocs,includes/cowiki}
140 rm -f %{_appdir}/htdocs/install.seal
143 if [ "$1" = "0" ]; then
144 chgrp root %{_appdir}/{htdocs,includes/cowiki}
145 chmod g-w %{_appdir}/{htdocs,includes/cowiki}
146 touch %{_appdir}/htdocs/install.seal
149 %triggerin -- apache1 < 1.3.37-3, apache1-base
150 %webapp_register apache %{_webapp}
152 %triggerun -- apache1 < 1.3.37-3, apache1-base
153 %webapp_unregister apache %{_webapp}
155 %triggerin -- apache < 2.2.0, apache-base
156 %webapp_register httpd %{_webapp}
158 %triggerun -- apache < 2.2.0, apache-base
159 %webapp_unregister httpd %{_webapp}
162 %defattr(644,root,root,755)
163 %doc ChangeLog INSTALL* NEWS
164 %doc README.IDIOM README.PLUGIN SKEL.PLUGIN
166 %dir %attr(750,root,http) %{_sysconfdir}
167 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
168 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
169 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/core.conf
170 %config(noreplace) %verify(not md5 mtime size) /etc/php/apache.d/%{name}.ini
171 %config(noreplace) %verify(not md5 mtime size) /etc/php/apache2handler.d/%{name}.ini
175 %dir %{_appdir}/includes
176 %dir %{_appdir}/includes/cowiki
177 %{_appdir}/includes/cowiki/class
178 %{_appdir}/includes/cowiki/locale
179 %{_appdir}/includes/cowiki/plugin
180 %{_appdir}/includes/cowiki/*.php
181 %dir %{_appdir}/htdocs
182 %{_appdir}/htdocs/img
183 %{_appdir}/htdocs/tpl
184 %{_appdir}/htdocs/*.txt
185 %{_appdir}/htdocs/*.php
186 %{_appdir}/htdocs/favicon.ico
188 %dir %attr(770,root,http) /var/cache/%{name}
191 %config(noreplace,missingok) %verify(not md5 mtime size) %{_appdir}/htdocs/install.seal
194 %defattr(644,root,root,755)
195 %{_appdir}/htdocs/setup
196 %{_appdir}/htdocs/install.pending
197 %{_appdir}/includes/cowiki/core.conf-dist