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 Patch18: install.patch
39 URL: http://wiki.splitbrain.org/wiki:dokuwiki
40 BuildRequires: rpmbuild(macros) >= 1.520
41 Requires: geshi >= 1.0.7.19
42 Requires: php-simplepie >= 1.0.1
45 Requires: webserver(access)
46 Requires: webserver(alias)
47 Requires: webserver(php) >= 4.3.3
49 # can use gz compression to store attic pages
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 %define _webapps /etc/webapps
55 %define _webapp %{name}
56 %define _sysconfdir %{_webapps}/%{_webapp}
57 %define _appdir %{_datadir}/%{_webapp}
58 %define _localstatedir /var/lib/%{name}
59 %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot}
62 DokuWiki is a standards compliant, simple to use Wiki, mainly aimed at
63 creating documentation of any kind. It is targeted at developer teams,
64 workgroups and small companies. It has a simple but powerful syntax
65 which makes sure the datafiles remain readable outside the Wiki and
66 eases the creation of structured texts. All data is stored in plain
67 text files - no database is required.
69 %description -l pl.UTF-8
70 DokuWiki to zgodne ze standardami i proste w użyciu Wiki, przeznaczone
71 głównie do tworzenia dokumentów wszelkiego rodzaju. Jest przeznaczone
72 dla zespołów programistów, grup roboczych i małych firm. Ma prostą,
73 ale mającą duże możliwości składnię, dzięki której pliki danych
74 pozostają czytelne poza Wiki, a także ułatwiającą tworzenie tekstów
75 strukturalnych. Wszystkie dane są przechowywane w plikach tekstowych -
76 nie jest wymagana baza danych.
79 Summary: DokuWiki setup package
80 Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji DokuWiki
81 Group: Applications/WWW
82 Requires: %{name} = %{version}-%{release}
85 Install this package to configure initial DokuWiki installation. You
86 should uninstall this package when you're done, as it considered
87 insecure to keep the setup files in place.
89 %description setup -l pl.UTF-8
90 Ten pakiet należy zainstalować w celu wstępnej konfiguracji DokuWiki
91 po pierwszej instalacji. Potem należy go odinstalować, jako że
92 pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
95 %setup -q -n %{name}-2009-02-14
116 find -name _dummy | xargs rm
117 rm -f lib/index.html lib/plugins/index.html
119 rm -f inc/lang/.htaccess
121 mv conf/words.aspell{.dist,}
123 # use system geshi package
127 # use system simplepie package
128 rm -f inc/SimplePie.php
130 # our plugins dir is not writable anyway, nothing to convert
131 rm -rf lib/plugins/upgradeplugindirectory
133 # cleanup backups after patching
134 find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
137 rm -rf $RPM_BUILD_ROOT
138 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_localstatedir},%{_appdir}/{bin,inc,lib}}
140 cp -a *.php $RPM_BUILD_ROOT%{_appdir}
141 cp -a bin/* $RPM_BUILD_ROOT%{_appdir}/bin
142 cp -a inc/* $RPM_BUILD_ROOT%{_appdir}/inc
143 cp -a lib/* $RPM_BUILD_ROOT%{_appdir}/lib
144 cp -a conf/* $RPM_BUILD_ROOT%{_sysconfdir}
145 cp -a data/* $RPM_BUILD_ROOT%{_localstatedir}
146 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
147 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
148 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
149 touch $RPM_BUILD_ROOT%{_sysconfdir}/acronyms.local.conf
150 touch $RPM_BUILD_ROOT%{_sysconfdir}/entities.local.conf
151 touch $RPM_BUILD_ROOT%{_sysconfdir}/interwiki.local.conf
152 touch $RPM_BUILD_ROOT%{_sysconfdir}/license.local.php
153 touch $RPM_BUILD_ROOT%{_sysconfdir}/local.php
154 touch $RPM_BUILD_ROOT%{_sysconfdir}/local.protected.php
155 touch $RPM_BUILD_ROOT%{_sysconfdir}/mime.local.conf
156 touch $RPM_BUILD_ROOT%{_sysconfdir}/smileys.local.conf
157 touch $RPM_BUILD_ROOT%{_sysconfdir}/userstyle.css
159 ln $RPM_BUILD_ROOT%{_appdir}/lib/images/interwiki/{dokubug,bug}.gif
160 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_appdir}/lib/images/fileicons
161 cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_appdir}/lib/images/interwiki/eventum.gif
162 cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_appdir}/lib/images/interwiki/skype.gif
165 %find_lang %{name}.lang
167 # make inc/lang/en/edit.txt as %config
169 /%%lang([^)]\+) \/usr\/share\/dokuwiki\/inc\/lang\/[^/]\+/{
170 # make entry as %%dir
173 # add files inside the %dir
174 s/^%%dir /%%config(noreplace) %%verify(not md5 mtime size) /; s/$/\/*.*/
178 rm -rf $RPM_BUILD_ROOT
181 chmod 770 %{_sysconfdir}
182 chmod 660 %{_sysconfdir}/dokuwiki.php
185 if [ "$1" = "0" ]; then
186 if [ -f %{_sysconfdir}/dokuwiki.php ]; then
187 chmod 750 %{_sysconfdir}
188 chmod 640 %{_sysconfdir}/dokuwiki.php
192 %triggerin -- apache1 < 1.3.37-3, apache1-base
193 %webapp_register apache %{_webapp}
195 %triggerun -- apache1 < 1.3.37-3, apache1-base
196 %webapp_unregister apache %{_webapp}
198 %triggerin -- apache < 2.2.0, apache-base
199 %webapp_register httpd %{_webapp}
201 %triggerun -- apache < 2.2.0, apache-base
202 %webapp_unregister httpd %{_webapp}
204 %triggerin -- lighttpd
205 %webapp_register lighttpd %{_webapp}
207 %triggerun -- lighttpd
208 %webapp_unregister lighttpd %{_webapp}
211 if [ -d %{_appdir}/data -a ! -L %{_appdir}/data ]; then
212 mv -f %{_appdir}/data/* %{_localstatedir}
213 rm -rf %{_appdir}/data
215 if [ -d %{_appdir}/conf -a ! -L %{_appdir}/conf ]; then
216 mv -f %{_appdir}/conf/* %{_sysconfdir}
217 rm -rf %{_appdir}/conf
221 %files -f %{name}.lang
222 %defattr(644,root,root,755)
224 %dir %attr(750,root,http) %{_sysconfdir}
225 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
226 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
227 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
229 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mediameta.php
230 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/msg
231 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/words.aspell
232 %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/scheme.conf
234 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/acronyms.local.conf
235 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/entities.local.conf
236 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/interwiki.local.conf
237 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/license.local.php
238 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/local.protected.php
239 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.local.conf
240 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/smileys.local.conf
241 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/userstyle.css
242 %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/local.php
244 # use local.php,local.protected.php, etc for local changes
245 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/acronyms.conf
246 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/dokuwiki.php
247 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/entities.conf
248 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/interwiki.conf
249 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/license.php
250 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/mime.conf
251 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/smileys.conf
253 # samples. perhaps move to %doc instead?
254 %attr(640,root,http) %{_sysconfdir}/mysql.conf.php.example
255 %attr(640,root,http) %{_sysconfdir}/acl.auth.php.dist
256 %attr(640,root,http) %{_sysconfdir}/wordblock.conf
257 %attr(640,root,http) %{_sysconfdir}/local.php.dist
258 %attr(640,root,http) %{_sysconfdir}/users.auth.php.dist
265 %attr(755,root,root) %{_appdir}/bin/dwpage.php
266 %attr(755,root,root) %{_appdir}/bin/indexer.php
267 %attr(755,root,root) %{_appdir}/bin/wantedpages.php
272 %{_appdir}/inc/parser
275 %dir %{_appdir}/lib/plugins
276 %dir %{_appdir}/lib/plugins/acl
277 %{_appdir}/lib/plugins/acl/*.*
278 %{_appdir}/lib/plugins/acl/pix
279 %dir %{_appdir}/lib/plugins/config
280 %{_appdir}/lib/plugins/config/*.*
281 %{_appdir}/lib/plugins/config/settings
282 %dir %{_appdir}/lib/plugins/plugin
283 %{_appdir}/lib/plugins/plugin/*.*
284 %dir %{_appdir}/lib/plugins/revert
285 %{_appdir}/lib/plugins/revert/*.*
286 %dir %{_appdir}/lib/plugins/usermanager
287 %{_appdir}/lib/plugins/usermanager/*.*
288 %{_appdir}/lib/plugins/usermanager/images
289 %{_appdir}/lib/plugins/info
290 %dir %{_appdir}/lib/plugins/popularity
291 %{_appdir}/lib/plugins/popularity/*.*
292 %{_appdir}/lib/plugins/*.php
293 %{_appdir}/lib/images
294 %{_appdir}/lib/scripts
295 %{_appdir}/lib/styles
299 %dir %attr(770,root,http) %{_localstatedir}
300 %dir %attr(770,root,http) %{_localstatedir}/attic
301 %dir %attr(770,root,http) %{_localstatedir}/cache
302 %dir %attr(770,root,http) %{_localstatedir}/index
303 %dir %attr(770,root,http) %{_localstatedir}/locks
304 %dir %attr(770,root,http) %{_localstatedir}/media
305 %dir %attr(770,root,http) %{_localstatedir}/media/wiki
306 %dir %attr(770,root,http) %{_localstatedir}/meta
307 %dir %attr(770,root,http) %{_localstatedir}/pages
308 %dir %attr(770,root,http) %{_localstatedir}/pages/wiki
309 %dir %attr(770,root,http) %{_localstatedir}/pages/playground
310 %dir %attr(770,root,http) %{_localstatedir}/tmp
311 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/media/wiki/dokuwiki-128.png
312 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/pages/wiki/dokuwiki.txt
313 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/pages/wiki/syntax.txt
314 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/pages/playground/playground.txt
317 %defattr(644,root,root,755)
318 %{_appdir}/install.php