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 URL: http://wiki.splitbrain.org/wiki:dokuwiki
35 BuildRequires: rpmbuild(macros) >= 1.520
36 Requires: geshi >= 1.0.7.19
39 Requires: webserver(access)
40 Requires: webserver(alias)
41 Requires: webserver(php) >= 4.3.3
43 # can use gz compression to store attic pages
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 %define _webapps /etc/webapps
49 %define _webapp %{name}
50 %define _sysconfdir %{_webapps}/%{_webapp}
51 %define _appdir %{_datadir}/%{_webapp}
52 %define _localstatedir /var/lib/%{name}
53 %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot}
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
143 touch $RPM_BUILD_ROOT%{_sysconfdir}/userstyle.css
145 ln $RPM_BUILD_ROOT%{_appdir}/lib/images/interwiki/{dokubug,bug}.gif
146 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_appdir}/lib/images/fileicons
147 cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_appdir}/lib/images/interwiki/eventum.gif
148 cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_appdir}/lib/images/interwiki/skype.gif
151 %find_lang %{name}.lang
154 rm -rf $RPM_BUILD_ROOT
157 chmod 770 %{_sysconfdir}
158 chmod 660 %{_sysconfdir}/dokuwiki.php
161 if [ "$1" = "0" ]; then
162 if [ -f %{_sysconfdir}/dokuwiki.php ]; then
163 chmod 750 %{_sysconfdir}
164 chmod 640 %{_sysconfdir}/dokuwiki.php
168 %triggerin -- apache1 < 1.3.37-3, apache1-base
169 %webapp_register apache %{_webapp}
171 %triggerun -- apache1 < 1.3.37-3, apache1-base
172 %webapp_unregister apache %{_webapp}
174 %triggerin -- apache < 2.2.0, apache-base
175 %webapp_register httpd %{_webapp}
177 %triggerun -- apache < 2.2.0, apache-base
178 %webapp_unregister httpd %{_webapp}
180 %triggerin -- lighttpd
181 %webapp_register lighttpd %{_webapp}
183 %triggerun -- lighttpd
184 %webapp_unregister lighttpd %{_webapp}
187 if [ -d %{_appdir}/data -a ! -L %{_appdir}/data ]; then
188 mv -f %{_appdir}/data/* %{_localstatedir}
189 rm -rf %{_appdir}/data
191 if [ -d %{_appdir}/conf -a ! -L %{_appdir}/conf ]; then
192 mv -f %{_appdir}/conf/* %{_sysconfdir}
193 rm -rf %{_appdir}/conf
197 %files -f %{name}.lang
198 %defattr(644,root,root,755)
200 %dir %attr(750,root,http) %{_sysconfdir}
201 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
202 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
203 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
205 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mediameta.php
206 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/msg
207 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/words.aspell
208 %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/scheme.conf
210 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/acronyms.local.conf
211 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/entities.local.conf
212 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/interwiki.local.conf
213 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/license.local.php
214 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/local.protected.php
215 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.local.conf
216 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/smileys.local.conf
217 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/userstyle.css
218 %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/local.php
220 # use local.php,local.protected.php, etc for local changes
221 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/acronyms.conf
222 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/dokuwiki.php
223 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/entities.conf
224 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/interwiki.conf
225 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/license.php
226 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/mime.conf
227 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/smileys.conf
229 # samples. perhaps move to %doc instead?
230 %attr(640,root,http) %{_sysconfdir}/mysql.conf.php.example
231 %attr(640,root,http) %{_sysconfdir}/acl.auth.php.dist
232 %attr(640,root,http) %{_sysconfdir}/wordblock.conf
233 %attr(640,root,http) %{_sysconfdir}/local.php.dist
234 %attr(640,root,http) %{_sysconfdir}/users.auth.php.dist
241 %attr(755,root,root) %{_appdir}/bin/dwpage.php
242 %attr(755,root,root) %{_appdir}/bin/indexer.php
243 %attr(755,root,root) %{_appdir}/bin/wantedpages.php
248 %{_appdir}/inc/parser
251 %dir %{_appdir}/lib/plugins
252 %dir %{_appdir}/lib/plugins/acl
253 %{_appdir}/lib/plugins/acl/*.*
254 %{_appdir}/lib/plugins/acl/pix
255 %dir %{_appdir}/lib/plugins/config
256 %{_appdir}/lib/plugins/config/*.*
257 %{_appdir}/lib/plugins/config/settings
258 %dir %{_appdir}/lib/plugins/plugin
259 %{_appdir}/lib/plugins/plugin/*.*
260 %dir %{_appdir}/lib/plugins/revert
261 %{_appdir}/lib/plugins/revert/*.*
262 %dir %{_appdir}/lib/plugins/usermanager
263 %{_appdir}/lib/plugins/usermanager/*.*
264 %{_appdir}/lib/plugins/usermanager/images
265 %{_appdir}/lib/plugins/info
266 %dir %{_appdir}/lib/plugins/popularity
267 %{_appdir}/lib/plugins/popularity/*.*
268 %{_appdir}/lib/plugins/*.php
269 %{_appdir}/lib/images
270 %{_appdir}/lib/scripts
271 %{_appdir}/lib/styles
275 %dir %attr(770,root,http) %{_localstatedir}
276 %dir %attr(770,root,http) %{_localstatedir}/attic
277 %dir %attr(770,root,http) %{_localstatedir}/cache
278 %dir %attr(770,root,http) %{_localstatedir}/index
279 %dir %attr(770,root,http) %{_localstatedir}/locks
280 %dir %attr(770,root,http) %{_localstatedir}/media
281 %dir %attr(770,root,http) %{_localstatedir}/media/wiki
282 %dir %attr(770,root,http) %{_localstatedir}/meta
283 %dir %attr(770,root,http) %{_localstatedir}/pages
284 %dir %attr(770,root,http) %{_localstatedir}/pages/wiki
285 %dir %attr(770,root,http) %{_localstatedir}/pages/playground
286 %dir %attr(770,root,http) %{_localstatedir}/tmp
287 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/media/wiki/dokuwiki-128.png
288 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/pages/wiki/dokuwiki.txt
289 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/pages/wiki/syntax.txt
290 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/pages/playground/playground.txt
293 %defattr(644,root,root,755)
294 %{_appdir}/install.php