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