1 %define subver 2009-01-30
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: http://www.splitbrain.org/_media/projects/dokuwiki/%{name}-rc%{subver}.tgz
12 # Source0-md5: 16c07630fea33407244ce2053ca88988
13 Source1: %{name}-apache.conf
14 Source2: %{name}-lighttpd.conf
15 Source3: %{name}-find-lang.sh
17 # Source4-md5: 623344128960e18f86097dfee213ad4a
19 # Source5-md5: cac3d0f82591a33eda2afa8ae5fe65cb
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 URL: http://wiki.splitbrain.org/wiki:dokuwiki
34 BuildRequires: rpmbuild(macros) >= 1.268
35 Requires: geshi >= 1.0.7.19
38 Requires: webserver(access)
39 Requires: webserver(alias)
40 Requires: webserver(php) >= 4.3.3
42 # can use gz compression to store attic pages
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 %define _webapps /etc/webapps
48 %define _webapp %{name}
49 %define _sysconfdir %{_webapps}/%{_webapp}
50 %define _appdir %{_datadir}/%{_webapp}
51 %define _localstatedir /var/lib/%{name}
54 DokuWiki is a standards compliant, simple to use Wiki, mainly aimed at
55 creating documentation of any kind. It is targeted at developer teams,
56 workgroups and small companies. It has a simple but powerful syntax
57 which makes sure the datafiles remain readable outside the Wiki and
58 eases the creation of structured texts. All data is stored in plain
59 text files - no database is required.
61 %description -l pl.UTF-8
62 DokuWiki to zgodne ze standardami i proste w użyciu Wiki, przeznaczone
63 głównie do tworzenia dokumentów wszelkiego rodzaju. Jest przeznaczone
64 dla zespołów programistów, grup roboczych i małych firm. Ma prostą,
65 ale mającą duże możliwości składnię, dzięki której pliki danych
66 pozostają czytelne poza Wiki, a także ułatwiającą tworzenie tekstów
67 strukturalnych. Wszystkie dane są przechowywane w plikach tekstowych -
68 nie jest wymagana baza danych.
71 Summary: DokuWiki setup package
72 Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji DokuWiki
73 Group: Applications/WWW
74 Requires: %{name} = %{version}-%{release}
77 Install this package to configure initial DokuWiki installation. You
78 should uninstall this package when you're done, as it considered
79 insecure to keep the setup files in place.
81 %description setup -l pl.UTF-8
82 Ten pakiet należy zainstalować w celu wstępnej konfiguracji DokuWiki
83 po pierwszej instalacji. Potem należy go odinstalować, jako że
84 pozostawienie plików instalacyjnych mogłoby być niebezpieczne.
87 %setup -q -n %{name}-rc%{subver}
102 find -name _dummy | xargs rm
103 rm -f lib/index.html lib/plugins/index.html
105 rm -f inc/lang/.htaccess
107 mv conf/words.aspell{.dist,}
109 # use system geshi package
113 # our plugins dir is not writable anyway, nothing to convert
114 rm -rf lib/plugins/upgradeplugindirectory
116 # cleanup backups after patching
117 find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
120 rm -rf $RPM_BUILD_ROOT
121 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_localstatedir},%{_appdir}/{bin,inc,lib}}
123 cp -a *.php $RPM_BUILD_ROOT%{_appdir}
124 cp -a bin/* $RPM_BUILD_ROOT%{_appdir}/bin
125 cp -a inc/* $RPM_BUILD_ROOT%{_appdir}/inc
126 cp -a lib/* $RPM_BUILD_ROOT%{_appdir}/lib
127 cp -a conf/* $RPM_BUILD_ROOT%{_sysconfdir}
128 cp -a data/* $RPM_BUILD_ROOT%{_localstatedir}
129 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
130 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
131 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
132 touch $RPM_BUILD_ROOT%{_sysconfdir}/acronyms.local.conf
133 touch $RPM_BUILD_ROOT%{_sysconfdir}/entities.local.conf
134 touch $RPM_BUILD_ROOT%{_sysconfdir}/interwiki.local.conf
135 touch $RPM_BUILD_ROOT%{_sysconfdir}/license.local.php
136 touch $RPM_BUILD_ROOT%{_sysconfdir}/local.php
137 touch $RPM_BUILD_ROOT%{_sysconfdir}/local.protected.php
138 touch $RPM_BUILD_ROOT%{_sysconfdir}/mime.local.conf
139 touch $RPM_BUILD_ROOT%{_sysconfdir}/smileys.local.conf
141 ln $RPM_BUILD_ROOT%{_appdir}/lib/images/interwiki/{dokubug,bug}.gif
142 cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_appdir}/lib/images/fileicons
143 cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_appdir}/lib/images/interwiki/eventum.gif
146 sh %{SOURCE3} %{name}.lang
149 rm -rf $RPM_BUILD_ROOT
152 chmod 770 %{_sysconfdir}
153 chmod 660 %{_sysconfdir}/dokuwiki.php
156 if [ "$1" = "0" ]; then
157 if [ -f %{_sysconfdir}/dokuwiki.php ]; then
158 chmod 750 %{_sysconfdir}
159 chmod 640 %{_sysconfdir}/dokuwiki.php
163 %triggerin -- apache1 < 1.3.37-3, apache1-base
164 %webapp_register apache %{_webapp}
166 %triggerun -- apache1 < 1.3.37-3, apache1-base
167 %webapp_unregister apache %{_webapp}
169 %triggerin -- apache < 2.2.0, apache-base
170 %webapp_register httpd %{_webapp}
172 %triggerun -- apache < 2.2.0, apache-base
173 %webapp_unregister httpd %{_webapp}
175 %triggerin -- lighttpd
176 %webapp_register lighttpd %{_webapp}
178 %triggerun -- lighttpd
179 %webapp_unregister lighttpd %{_webapp}
182 if [ -d %{_appdir}/data -a ! -L %{_appdir}/data ]; then
183 mv -f %{_appdir}/data/* %{_localstatedir}
184 rm -rf %{_appdir}/data
186 if [ -d %{_appdir}/conf -a ! -L %{_appdir}/conf ]; then
187 mv -f %{_appdir}/conf/* %{_sysconfdir}
188 rm -rf %{_appdir}/conf
192 %files -f %{name}.lang
193 %defattr(644,root,root,755)
195 %dir %attr(750,root,http) %{_sysconfdir}
196 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
197 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
198 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
200 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mediameta.php
201 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/msg
202 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/words.aspell
203 %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/scheme.conf
205 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/acronyms.local.conf
206 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/entities.local.conf
207 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/interwiki.local.conf
208 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/license.local.php
209 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/local.protected.php
210 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.local.conf
211 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/smileys.local.conf
212 %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/local.php
214 # use local.php,local.protected.php, etc for local changes
215 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/acronyms.conf
216 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/dokuwiki.php
217 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/entities.conf
218 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/interwiki.conf
219 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/license.php
220 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/mime.conf
221 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/smileys.conf
223 # samples. perhaps move to %doc instead?
224 %attr(640,root,http) %{_sysconfdir}/mysql.conf.php.example
225 %attr(640,root,http) %{_sysconfdir}/acl.auth.php.dist
226 %attr(640,root,http) %{_sysconfdir}/wordblock.conf
227 %attr(640,root,http) %{_sysconfdir}/local.php.dist
228 %attr(640,root,http) %{_sysconfdir}/users.auth.php.dist
235 %attr(755,root,root) %{_appdir}/bin/dwpage.php
236 %attr(755,root,root) %{_appdir}/bin/indexer.php
237 %attr(755,root,root) %{_appdir}/bin/wantedpages.php
242 %{_appdir}/inc/parser
245 %dir %{_appdir}/lib/plugins
246 %dir %{_appdir}/lib/plugins/acl
247 %{_appdir}/lib/plugins/acl/*.*
248 %{_appdir}/lib/plugins/acl/pix
249 %dir %{_appdir}/lib/plugins/config
250 %{_appdir}/lib/plugins/config/*.*
251 %{_appdir}/lib/plugins/config/settings
252 %dir %{_appdir}/lib/plugins/plugin
253 %{_appdir}/lib/plugins/plugin/*.*
254 %dir %{_appdir}/lib/plugins/revert
255 %{_appdir}/lib/plugins/revert/*.*
256 %dir %{_appdir}/lib/plugins/usermanager
257 %{_appdir}/lib/plugins/usermanager/*.*
258 %{_appdir}/lib/plugins/usermanager/images
259 %{_appdir}/lib/plugins/info
260 %dir %{_appdir}/lib/plugins/popularity
261 %{_appdir}/lib/plugins/popularity/*.*
262 %{_appdir}/lib/plugins/*.php
263 %{_appdir}/lib/images
264 %{_appdir}/lib/scripts
265 %{_appdir}/lib/styles
269 %dir %attr(770,root,http) %{_localstatedir}
270 %dir %attr(770,root,http) %{_localstatedir}/attic
271 %dir %attr(770,root,http) %{_localstatedir}/cache
272 %dir %attr(770,root,http) %{_localstatedir}/index
273 %dir %attr(770,root,http) %{_localstatedir}/locks
274 %dir %attr(770,root,http) %{_localstatedir}/media
275 %dir %attr(770,root,http) %{_localstatedir}/media/wiki
276 %dir %attr(770,root,http) %{_localstatedir}/meta
277 %dir %attr(770,root,http) %{_localstatedir}/pages
278 %dir %attr(770,root,http) %{_localstatedir}/pages/wiki
279 %dir %attr(770,root,http) %{_localstatedir}/pages/playground
280 %dir %attr(770,root,http) %{_localstatedir}/tmp
281 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/media/wiki/dokuwiki-128.png
282 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/pages/wiki/dokuwiki.txt
283 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/pages/wiki/syntax.txt
284 %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/pages/playground/playground.txt
287 %defattr(644,root,root,755)
288 %{_appdir}/install.php