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