1 %define subver 2009-02-14b
2 %define ver %(echo %{subver} | tr -d -)
3 Summary: PHP-based Wiki webapplication
4 Summary(pl.UTF-8): Aplikacja WWW Wiki oparta na PHP
9 Group: Applications/WWW
10 Source0: http://www.splitbrain.org/_media/projects/dokuwiki/%{name}-%{subver}.tgz
11 # Source0-md5: c75c4781b8698041c3c9b6b0fec2ac2e
12 Source1: %{name}-apache.conf
13 Source2: %{name}-lighttpd.conf
15 # Source3-md5: 623344128960e18f86097dfee213ad4a
17 # Source4-md5: cac3d0f82591a33eda2afa8ae5fe65cb
18 Source5: http://forum.skype.com/style_emoticons/skype/skype.png
19 # Source5-md5: 25c355be038267dc9fdb724b628000b9
20 Patch0: %{name}-paths.patch
21 Patch1: %{name}-config.patch
22 Patch2: %{name}-mysqlauth.patch
23 Patch3: %{name}-config-allow-require.patch
24 Patch4: %{name}-geshi.patch
25 Patch5: %{name}-http_auth-option.patch
26 Patch6: %{name}-nice_exit.patch
27 Patch7: %{name}-mail-headerencodequotes.patch
28 Patch8: %{name}-notify-respect-minor.patch
29 Patch9: %{name}-media-userinfo.patch
30 Patch10: %{name}-mailtext.patch
31 Patch11: %{name}-notifyns.patch
32 Patch12: %{name}-mailthreads.patch
33 Patch13: %{name}-media-directlink.patch
34 Patch14: interwiki-outputonly.patch
35 Patch15: simplepie.patch
36 Patch16: cliapps.patch
37 Patch17: plugin_exists-check.patch
38 URL: http://wiki.splitbrain.org/wiki:dokuwiki
39 BuildRequires: rpmbuild(macros) >= 1.520
40 Requires: geshi >= 1.0.7.19
41 Requires: php-simplepie >= 1.0.1
44 Requires: webserver(access)
45 Requires: webserver(alias)
46 Requires: webserver(php) >= 4.3.3
48 # can use gz compression to store attic pages
51 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 %define _webapps /etc/webapps
54 %define _webapp %{name}
55 %define _sysconfdir %{_webapps}/%{_webapp}
56 %define _appdir %{_datadir}/%{_webapp}
57 %define _localstatedir /var/lib/%{name}
58 %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot}
61 DokuWiki is a standards compliant, simple to use Wiki, mainly aimed at
62 creating documentation of any kind. It is targeted at developer teams,
63 workgroups and small companies. It has a simple but powerful syntax
64 which makes sure the datafiles remain readable outside the Wiki and
65 eases the creation of structured texts. All data is stored in plain
66 text files - no database is required.
68 %description -l pl.UTF-8
69 DokuWiki to zgodne ze standardami i proste w użyciu Wiki, przeznaczone
70 głównie do tworzenia dokumentów wszelkiego rodzaju. Jest przeznaczone
71 dla zespołów programistów, grup roboczych i małych firm. Ma prostą,
72 ale mającą duże możliwości składnię, dzięki której pliki danych
73 pozostają czytelne poza Wiki, a także ułatwiającą tworzenie tekstów
74 strukturalnych. Wszystkie dane są przechowywane w plikach tekstowych -
75 nie jest wymagana baza danych.
78 Summary: DokuWiki setup package
79 Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji DokuWiki
80 Group: Applications/WWW
81 Requires: %{name} = %{version}-%{release}
84 Install this package to configure initial DokuWiki installation. You
85 should uninstall this package when you're done, as it considered
86 insecure to keep the setup files in place.
88 %description setup -l pl.UTF-8
89 Ten pakiet należy zainstalować w celu wstępnej konfiguracji DokuWiki
90 po pierwszej instalacji. Potem należy go odinstalować, jako że
91 pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
94 %setup -q -n %{name}-2009-02-14
114 find -name _dummy | xargs rm
115 rm -f lib/index.html lib/plugins/index.html
117 rm -f inc/lang/.htaccess
119 mv conf/words.aspell{.dist,}
121 # use system geshi package
125 # use system simplepie package
126 rm -f inc/SimplePie.php
128 # our plugins dir is not writable anyway, nothing to convert
129 rm -rf lib/plugins/upgradeplugindirectory
131 # cleanup backups after patching
132 find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
135 rm -rf $RPM_BUILD_ROOT
136 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_localstatedir},%{_appdir}/{bin,inc,lib}}
138 cp -a *.php $RPM_BUILD_ROOT%{_appdir}
139 cp -a bin/* $RPM_BUILD_ROOT%{_appdir}/bin
140 cp -a inc/* $RPM_BUILD_ROOT%{_appdir}/inc
141 cp -a lib/* $RPM_BUILD_ROOT%{_appdir}/lib
142 cp -a conf/* $RPM_BUILD_ROOT%{_sysconfdir}
143 cp -a data/* $RPM_BUILD_ROOT%{_localstatedir}
144 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
145 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
146 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
147 touch $RPM_BUILD_ROOT%{_sysconfdir}/acronyms.local.conf
148 touch $RPM_BUILD_ROOT%{_sysconfdir}/entities.local.conf
149 touch $RPM_BUILD_ROOT%{_sysconfdir}/interwiki.local.conf
150 touch $RPM_BUILD_ROOT%{_sysconfdir}/license.local.php
151 touch $RPM_BUILD_ROOT%{_sysconfdir}/local.php
152 touch $RPM_BUILD_ROOT%{_sysconfdir}/local.protected.php
153 touch $RPM_BUILD_ROOT%{_sysconfdir}/mime.local.conf
154 touch $RPM_BUILD_ROOT%{_sysconfdir}/smileys.local.conf
155 touch $RPM_BUILD_ROOT%{_sysconfdir}/userstyle.css
157 ln $RPM_BUILD_ROOT%{_appdir}/lib/images/interwiki/{dokubug,bug}.gif
158 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_appdir}/lib/images/fileicons
159 cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_appdir}/lib/images/interwiki/eventum.gif
160 cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_appdir}/lib/images/interwiki/skype.gif
163 %find_lang %{name}.lang
165 # make inc/lang/en/edit.txt as %config
167 /%%lang([^)]\+) \/usr\/share\/dokuwiki\/inc\/lang\/[^/]\+/{
168 # make entry as %%dir
171 # add files inside the %dir
172 s/^%%dir /%%config(noreplace) %%verify(not md5 mtime size) /; s/$/\/*.*/
176 rm -rf $RPM_BUILD_ROOT
179 chmod 770 %{_sysconfdir}
180 chmod 660 %{_sysconfdir}/dokuwiki.php
183 if [ "$1" = "0" ]; then
184 if [ -f %{_sysconfdir}/dokuwiki.php ]; then
185 chmod 750 %{_sysconfdir}
186 chmod 640 %{_sysconfdir}/dokuwiki.php
190 %triggerin -- apache1 < 1.3.37-3, apache1-base
191 %webapp_register apache %{_webapp}
193 %triggerun -- apache1 < 1.3.37-3, apache1-base
194 %webapp_unregister apache %{_webapp}
196 %triggerin -- apache < 2.2.0, apache-base
197 %webapp_register httpd %{_webapp}
199 %triggerun -- apache < 2.2.0, apache-base
200 %webapp_unregister httpd %{_webapp}
202 %triggerin -- lighttpd
203 %webapp_register lighttpd %{_webapp}
205 %triggerun -- lighttpd
206 %webapp_unregister lighttpd %{_webapp}
209 if [ -d %{_appdir}/data -a ! -L %{_appdir}/data ]; then
210 mv -f %{_appdir}/data/* %{_localstatedir}
211 rm -rf %{_appdir}/data
213 if [ -d %{_appdir}/conf -a ! -L %{_appdir}/conf ]; then
214 mv -f %{_appdir}/conf/* %{_sysconfdir}
215 rm -rf %{_appdir}/conf
219 %files -f %{name}.lang
220 %defattr(644,root,root,755)
222 %dir %attr(750,root,http) %{_sysconfdir}
223 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
224 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
225 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
227 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mediameta.php
228 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/msg
229 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/words.aspell
230 %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/scheme.conf
232 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/acronyms.local.conf
233 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/entities.local.conf
234 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/interwiki.local.conf
235 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/license.local.php
236 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/local.protected.php
237 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.local.conf
238 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/smileys.local.conf
239 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/userstyle.css
240 %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/local.php
242 # use local.php,local.protected.php, etc for local changes
243 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/acronyms.conf
244 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/dokuwiki.php
245 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/entities.conf
246 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/interwiki.conf
247 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/license.php
248 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/mime.conf
249 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/smileys.conf
251 # samples. perhaps move to %doc instead?
252 %attr(640,root,http) %{_sysconfdir}/mysql.conf.php.example
253 %attr(640,root,http) %{_sysconfdir}/acl.auth.php.dist
254 %attr(640,root,http) %{_sysconfdir}/wordblock.conf
255 %attr(640,root,http) %{_sysconfdir}/local.php.dist
256 %attr(640,root,http) %{_sysconfdir}/users.auth.php.dist
263 %attr(755,root,root) %{_appdir}/bin/dwpage.php
264 %attr(755,root,root) %{_appdir}/bin/indexer.php
265 %attr(755,root,root) %{_appdir}/bin/wantedpages.php
270 %{_appdir}/inc/parser
273 %dir %{_appdir}/lib/plugins
274 %dir %{_appdir}/lib/plugins/acl
275 %{_appdir}/lib/plugins/acl/*.*
276 %{_appdir}/lib/plugins/acl/pix
277 %dir %{_appdir}/lib/plugins/config
278 %{_appdir}/lib/plugins/config/*.*
279 %{_appdir}/lib/plugins/config/settings
280 %dir %{_appdir}/lib/plugins/plugin
281 %{_appdir}/lib/plugins/plugin/*.*
282 %dir %{_appdir}/lib/plugins/revert
283 %{_appdir}/lib/plugins/revert/*.*
284 %dir %{_appdir}/lib/plugins/usermanager
285 %{_appdir}/lib/plugins/usermanager/*.*
286 %{_appdir}/lib/plugins/usermanager/images
287 %{_appdir}/lib/plugins/info
288 %dir %{_appdir}/lib/plugins/popularity
289 %{_appdir}/lib/plugins/popularity/*.*
290 %{_appdir}/lib/plugins/*.php
291 %{_appdir}/lib/images
292 %{_appdir}/lib/scripts
293 %{_appdir}/lib/styles
297 %dir %attr(770,root,http) %{_localstatedir}
298 %dir %attr(770,root,http) %{_localstatedir}/attic
299 %dir %attr(770,root,http) %{_localstatedir}/cache
300 %dir %attr(770,root,http) %{_localstatedir}/index
301 %dir %attr(770,root,http) %{_localstatedir}/locks
302 %dir %attr(770,root,http) %{_localstatedir}/media
303 %dir %attr(770,root,http) %{_localstatedir}/media/wiki
304 %dir %attr(770,root,http) %{_localstatedir}/meta
305 %dir %attr(770,root,http) %{_localstatedir}/pages
306 %dir %attr(770,root,http) %{_localstatedir}/pages/wiki
307 %dir %attr(770,root,http) %{_localstatedir}/pages/playground
308 %dir %attr(770,root,http) %{_localstatedir}/tmp
309 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/media/wiki/dokuwiki-128.png
310 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/pages/wiki/dokuwiki.txt
311 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/pages/wiki/syntax.txt
312 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/pages/playground/playground.txt
315 %defattr(644,root,root,755)
316 %{_appdir}/install.php