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
14 Source3: %{name}-find-lang.sh
16 # Source4-md5: 623344128960e18f86097dfee213ad4a
18 # Source5-md5: cac3d0f82591a33eda2afa8ae5fe65cb
19 Source6: http://forum.skype.com/style_emoticons/skype/skype.png
20 # Source6-md5: 25c355be038267dc9fdb724b628000b9
21 Patch0: %{name}-paths.patch
22 Patch1: %{name}-config.patch
23 Patch2: %{name}-mysqlauth.patch
24 Patch3: %{name}-config-allow-require.patch
25 Patch4: %{name}-geshi.patch
26 Patch5: %{name}-http_auth-option.patch
27 Patch6: %{name}-nice_exit.patch
28 Patch7: %{name}-mail-headerencodequotes.patch
29 Patch8: %{name}-notify-respect-minor.patch
30 Patch9: %{name}-media-userinfo.patch
31 Patch10: %{name}-mailtext.patch
32 Patch11: %{name}-notifyns.patch
33 Patch12: %{name}-mailthreads.patch
34 Patch13: %{name}-media-directlink.patch
35 URL: http://wiki.splitbrain.org/wiki:dokuwiki
36 BuildRequires: rpmbuild(macros) >= 1.268
37 Requires: geshi >= 1.0.7.19
40 Requires: webserver(access)
41 Requires: webserver(alias)
42 Requires: webserver(php) >= 4.3.3
44 # can use gz compression to store attic pages
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 %define _webapps /etc/webapps
50 %define _webapp %{name}
51 %define _sysconfdir %{_webapps}/%{_webapp}
52 %define _appdir %{_datadir}/%{_webapp}
53 %define _localstatedir /var/lib/%{name}
56 DokuWiki is a standards compliant, simple to use Wiki, mainly aimed at
57 creating documentation of any kind. It is targeted at developer teams,
58 workgroups and small companies. It has a simple but powerful syntax
59 which makes sure the datafiles remain readable outside the Wiki and
60 eases the creation of structured texts. All data is stored in plain
61 text files - no database is required.
63 %description -l pl.UTF-8
64 DokuWiki to zgodne ze standardami i proste w użyciu Wiki, przeznaczone
65 głównie do tworzenia dokumentów wszelkiego rodzaju. Jest przeznaczone
66 dla zespołów programistów, grup roboczych i małych firm. Ma prostą,
67 ale mającą duże możliwości składnię, dzięki której pliki danych
68 pozostają czytelne poza Wiki, a także ułatwiającą tworzenie tekstów
69 strukturalnych. Wszystkie dane są przechowywane w plikach tekstowych -
70 nie jest wymagana baza danych.
73 Summary: DokuWiki setup package
74 Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji DokuWiki
75 Group: Applications/WWW
76 Requires: %{name} = %{version}-%{release}
79 Install this package to configure initial DokuWiki installation. You
80 should uninstall this package when you're done, as it considered
81 insecure to keep the setup files in place.
83 %description setup -l pl.UTF-8
84 Ten pakiet należy zainstalować w celu wstępnej konfiguracji DokuWiki
85 po pierwszej instalacji. Potem należy go odinstalować, jako że
86 pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
89 %setup -q -n %{name}-2009-02-14
105 find -name _dummy | xargs rm
106 rm -f lib/index.html lib/plugins/index.html
108 rm -f inc/lang/.htaccess
110 mv conf/words.aspell{.dist,}
112 # use system geshi package
116 # our plugins dir is not writable anyway, nothing to convert
117 rm -rf lib/plugins/upgradeplugindirectory
119 # cleanup backups after patching
120 find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
123 rm -rf $RPM_BUILD_ROOT
124 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_localstatedir},%{_appdir}/{bin,inc,lib}}
126 cp -a *.php $RPM_BUILD_ROOT%{_appdir}
127 cp -a bin/* $RPM_BUILD_ROOT%{_appdir}/bin
128 cp -a inc/* $RPM_BUILD_ROOT%{_appdir}/inc
129 cp -a lib/* $RPM_BUILD_ROOT%{_appdir}/lib
130 cp -a conf/* $RPM_BUILD_ROOT%{_sysconfdir}
131 cp -a data/* $RPM_BUILD_ROOT%{_localstatedir}
132 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
133 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
134 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
135 touch $RPM_BUILD_ROOT%{_sysconfdir}/acronyms.local.conf
136 touch $RPM_BUILD_ROOT%{_sysconfdir}/entities.local.conf
137 touch $RPM_BUILD_ROOT%{_sysconfdir}/interwiki.local.conf
138 touch $RPM_BUILD_ROOT%{_sysconfdir}/license.local.php
139 touch $RPM_BUILD_ROOT%{_sysconfdir}/local.php
140 touch $RPM_BUILD_ROOT%{_sysconfdir}/local.protected.php
141 touch $RPM_BUILD_ROOT%{_sysconfdir}/mime.local.conf
142 touch $RPM_BUILD_ROOT%{_sysconfdir}/smileys.local.conf
144 ln $RPM_BUILD_ROOT%{_appdir}/lib/images/interwiki/{dokubug,bug}.gif
145 cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_appdir}/lib/images/fileicons
146 cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_appdir}/lib/images/interwiki/eventum.gif
147 cp -a %{SOURCE6} $RPM_BUILD_ROOT%{_appdir}/lib/images/interwiki/skype.gif
150 sh %{SOURCE3} %{name}.lang
153 rm -rf $RPM_BUILD_ROOT
156 chmod 770 %{_sysconfdir}
157 chmod 660 %{_sysconfdir}/dokuwiki.php
160 if [ "$1" = "0" ]; then
161 if [ -f %{_sysconfdir}/dokuwiki.php ]; then
162 chmod 750 %{_sysconfdir}
163 chmod 640 %{_sysconfdir}/dokuwiki.php
167 %triggerin -- apache1 < 1.3.37-3, apache1-base
168 %webapp_register apache %{_webapp}
170 %triggerun -- apache1 < 1.3.37-3, apache1-base
171 %webapp_unregister apache %{_webapp}
173 %triggerin -- apache < 2.2.0, apache-base
174 %webapp_register httpd %{_webapp}
176 %triggerun -- apache < 2.2.0, apache-base
177 %webapp_unregister httpd %{_webapp}
179 %triggerin -- lighttpd
180 %webapp_register lighttpd %{_webapp}
182 %triggerun -- lighttpd
183 %webapp_unregister lighttpd %{_webapp}
186 if [ -d %{_appdir}/data -a ! -L %{_appdir}/data ]; then
187 mv -f %{_appdir}/data/* %{_localstatedir}
188 rm -rf %{_appdir}/data
190 if [ -d %{_appdir}/conf -a ! -L %{_appdir}/conf ]; then
191 mv -f %{_appdir}/conf/* %{_sysconfdir}
192 rm -rf %{_appdir}/conf
196 %files -f %{name}.lang
197 %defattr(644,root,root,755)
199 %dir %attr(750,root,http) %{_sysconfdir}
200 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
201 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
202 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
204 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mediameta.php
205 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/msg
206 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/words.aspell
207 %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/scheme.conf
209 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/acronyms.local.conf
210 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/entities.local.conf
211 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/interwiki.local.conf
212 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/license.local.php
213 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/local.protected.php
214 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.local.conf
215 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/smileys.local.conf
216 %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/local.php
218 # use local.php,local.protected.php, etc for local changes
219 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/acronyms.conf
220 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/dokuwiki.php
221 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/entities.conf
222 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/interwiki.conf
223 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/license.php
224 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/mime.conf
225 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/smileys.conf
227 # samples. perhaps move to %doc instead?
228 %attr(640,root,http) %{_sysconfdir}/mysql.conf.php.example
229 %attr(640,root,http) %{_sysconfdir}/acl.auth.php.dist
230 %attr(640,root,http) %{_sysconfdir}/wordblock.conf
231 %attr(640,root,http) %{_sysconfdir}/local.php.dist
232 %attr(640,root,http) %{_sysconfdir}/users.auth.php.dist
239 %attr(755,root,root) %{_appdir}/bin/dwpage.php
240 %attr(755,root,root) %{_appdir}/bin/indexer.php
241 %attr(755,root,root) %{_appdir}/bin/wantedpages.php
246 %{_appdir}/inc/parser
249 %dir %{_appdir}/lib/plugins
250 %dir %{_appdir}/lib/plugins/acl
251 %{_appdir}/lib/plugins/acl/*.*
252 %{_appdir}/lib/plugins/acl/pix
253 %dir %{_appdir}/lib/plugins/config
254 %{_appdir}/lib/plugins/config/*.*
255 %{_appdir}/lib/plugins/config/settings
256 %dir %{_appdir}/lib/plugins/plugin
257 %{_appdir}/lib/plugins/plugin/*.*
258 %dir %{_appdir}/lib/plugins/revert
259 %{_appdir}/lib/plugins/revert/*.*
260 %dir %{_appdir}/lib/plugins/usermanager
261 %{_appdir}/lib/plugins/usermanager/*.*
262 %{_appdir}/lib/plugins/usermanager/images
263 %{_appdir}/lib/plugins/info
264 %dir %{_appdir}/lib/plugins/popularity
265 %{_appdir}/lib/plugins/popularity/*.*
266 %{_appdir}/lib/plugins/*.php
267 %{_appdir}/lib/images
268 %{_appdir}/lib/scripts
269 %{_appdir}/lib/styles
273 %dir %attr(770,root,http) %{_localstatedir}
274 %dir %attr(770,root,http) %{_localstatedir}/attic
275 %dir %attr(770,root,http) %{_localstatedir}/cache
276 %dir %attr(770,root,http) %{_localstatedir}/index
277 %dir %attr(770,root,http) %{_localstatedir}/locks
278 %dir %attr(770,root,http) %{_localstatedir}/media
279 %dir %attr(770,root,http) %{_localstatedir}/media/wiki
280 %dir %attr(770,root,http) %{_localstatedir}/meta
281 %dir %attr(770,root,http) %{_localstatedir}/pages
282 %dir %attr(770,root,http) %{_localstatedir}/pages/wiki
283 %dir %attr(770,root,http) %{_localstatedir}/pages/playground
284 %dir %attr(770,root,http) %{_localstatedir}/tmp
285 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/media/wiki/dokuwiki-128.png
286 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/pages/wiki/dokuwiki.txt
287 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/pages/wiki/syntax.txt
288 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/pages/playground/playground.txt
291 %defattr(644,root,root,755)
292 %{_appdir}/install.php