]>
Commit | Line | Data |
---|---|---|
d73655e0 | 1 | Summary: PHP-based Wiki webapplication |
b9cde090 | 2 | Summary(pl.UTF-8): Aplikacja WWW Wiki oparta na PHP |
d73655e0 | 3 | Name: dokuwiki |
107aba6f | 4 | Version: 20091110 |
3aa37b5a | 5 | Release: 0.8 |
d73655e0 SP |
6 | License: GPL v2 |
7 | Group: Applications/WWW | |
107aba6f ER |
8 | Source0: http://dev.splitbrain.org/download/snapshots/dokuwiki-latest.tgz |
9 | # Source0-md5: 9da3e5c3a7b40b5a229b38e52b6fcf70 | |
99646b81 ER |
10 | Source1: %{name}-apache.conf |
11 | Source2: %{name}-lighttpd.conf | |
db16581c ER |
12 | Source3: jude.png |
13 | # Source3-md5: 623344128960e18f86097dfee213ad4a | |
14 | Source4: eventum.gif | |
15 | # Source4-md5: cac3d0f82591a33eda2afa8ae5fe65cb | |
16 | Source5: http://forum.skype.com/style_emoticons/skype/skype.png | |
17 | # Source5-md5: 25c355be038267dc9fdb724b628000b9 | |
dff16d0a ER |
18 | Source6: pld_button.png |
19 | # Source6-md5: 185afa921e81bd726b9f0f9f0909dc6e | |
107aba6f | 20 | Patch66: %{name}-config.patch |
641b29cc | 21 | Patch0: %{name}-paths.patch |
59f818e0 | 22 | Patch2: %{name}-mysqlauth.patch |
0a785872 | 23 | Patch3: %{name}-config-allow-require.patch |
48993817 | 24 | Patch4: %{name}-geshi.patch |
9e409dbc | 25 | Patch5: %{name}-http_auth-option.patch |
ff1d703f | 26 | Patch6: %{name}-nice_exit.patch |
19f4a739 | 27 | Patch7: %{name}-mail-headerencodequotes.patch |
e79c8784 | 28 | Patch8: %{name}-notify-respect-minor.patch |
6bda8de4 | 29 | Patch9: %{name}-media-userinfo.patch |
aea2faa7 | 30 | Patch10: %{name}-mailtext.patch |
1bf63c70 | 31 | Patch11: %{name}-notifyns.patch |
e21b2065 | 32 | Patch12: %{name}-mailthreads.patch |
369ed483 | 33 | Patch13: %{name}-media-directlink.patch |
e5ce8ca9 | 34 | Patch14: interwiki-outputonly.patch |
ae5a5f57 | 35 | Patch15: simplepie.patch |
bba17ba4 | 36 | Patch18: install.patch |
dff16d0a | 37 | Patch19: pld-branding.patch |
a3e2b241 | 38 | Patch20: fixprivilegeescalationbug.diff |
3aa37b5a | 39 | URL: http://www.dokuwiki.org/dokuwiki |
db16581c | 40 | BuildRequires: rpmbuild(macros) >= 1.520 |
b3528e0c | 41 | Requires: geshi >= 1.0.7.19 |
ae5a5f57 | 42 | Requires: php-simplepie >= 1.0.1 |
394e97c5 | 43 | Requires: php(xml) |
d73655e0 | 44 | Requires: webapps |
105a71ba | 45 | Requires: webserver(access) |
24a3d556 | 46 | Requires: webserver(alias) |
5e55ff85 ER |
47 | Requires: webserver(php) >= 4.3.3 |
48 | Suggests: php(gd) | |
083e173b ER |
49 | # can use gz compression to store attic pages |
50 | Suggests: php(zlib) | |
d73655e0 SP |
51 | BuildArch: noarch |
52 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
53 | ||
54 | %define _webapps /etc/webapps | |
55 | %define _webapp %{name} | |
56 | %define _sysconfdir %{_webapps}/%{_webapp} | |
57 | %define _appdir %{_datadir}/%{_webapp} | |
881190a4 | 58 | %define _localstatedir /var/lib/%{name} |
db16581c | 59 | %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot} |
d73655e0 SP |
60 | |
61 | %description | |
62 | DokuWiki is a standards compliant, simple to use Wiki, mainly aimed at | |
63 | creating documentation of any kind. It is targeted at developer teams, | |
64 | workgroups and small companies. It has a simple but powerful syntax | |
65 | which makes sure the datafiles remain readable outside the Wiki and | |
66 | eases the creation of structured texts. All data is stored in plain | |
b9cde090 JB |
67 | text files - no database is required. |
68 | ||
69 | %description -l pl.UTF-8 | |
70 | DokuWiki to zgodne ze standardami i proste w użyciu Wiki, przeznaczone | |
71 | głównie do tworzenia dokumentów wszelkiego rodzaju. Jest przeznaczone | |
72 | dla zespołów programistów, grup roboczych i małych firm. Ma prostą, | |
73 | ale mającą duże możliwości składnię, dzięki której pliki danych | |
74 | pozostają czytelne poza Wiki, a także ułatwiającą tworzenie tekstów | |
75 | strukturalnych. Wszystkie dane są przechowywane w plikach tekstowych - | |
76 | nie jest wymagana baza danych. | |
d73655e0 | 77 | |
641b29cc | 78 | %package setup |
4c94baaa JB |
79 | Summary: DokuWiki setup package |
80 | Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji DokuWiki | |
641b29cc ER |
81 | Group: Applications/WWW |
82 | Requires: %{name} = %{version}-%{release} | |
83 | ||
84 | %description setup | |
4c94baaa | 85 | Install this package to configure initial DokuWiki installation. You |
641b29cc ER |
86 | should uninstall this package when you're done, as it considered |
87 | insecure to keep the setup files in place. | |
88 | ||
89 | %description setup -l pl.UTF-8 | |
4c94baaa | 90 | Ten pakiet należy zainstalować w celu wstępnej konfiguracji DokuWiki |
641b29cc ER |
91 | po pierwszej instalacji. Potem należy go odinstalować, jako że |
92 | pozostawienie plików instalacyjnych mogłoby być niebezpieczne. | |
93 | ||
d73655e0 | 94 | %prep |
107aba6f | 95 | %setup -q -n %{name} |
641b29cc | 96 | %patch0 -p1 |
59f818e0 | 97 | %patch2 -p1 |
0a785872 | 98 | %patch3 -p1 |
48993817 | 99 | %patch4 -p1 |
9e409dbc | 100 | %patch5 -p1 |
ff1d703f | 101 | %patch6 -p1 |
19f4a739 | 102 | %patch7 -p1 |
e79c8784 | 103 | %patch8 -p1 |
6bda8de4 | 104 | %patch9 -p1 |
aea2faa7 | 105 | %patch10 -p1 |
1bf63c70 | 106 | %patch11 -p1 |
e21b2065 | 107 | %patch12 -p1 |
369ed483 | 108 | %patch13 -p1 |
e5ce8ca9 | 109 | %patch14 -p1 |
ae5a5f57 | 110 | %patch15 -p1 |
bba17ba4 | 111 | %patch18 -p1 |
a3e2b241 ER |
112 | %patch19 -p1 |
113 | %patch20 -p1 | |
d73655e0 | 114 | |
107aba6f ER |
115 | %patch66 -p1 |
116 | ||
7df7f76f | 117 | find -name _dummy | xargs rm |
3aa37b5a | 118 | find -name '*-darcs-backup*' | xargs rm |
a3e2b241 | 119 | rm lib/index.html lib/plugins/index.html inc/lang/.htaccess |
7df7f76f | 120 | |
2d01b400 ER |
121 | # safe file |
122 | mv conf/words.aspell{.dist,} | |
123 | ||
b3528e0c | 124 | # use system geshi package |
48993817 | 125 | rm -f inc/geshi.php |
b3528e0c ER |
126 | rm -rf inc/geshi |
127 | ||
ae5a5f57 ER |
128 | # use system simplepie package |
129 | rm -f inc/SimplePie.php | |
130 | ||
7df7f76f ER |
131 | # our plugins dir is not writable anyway, nothing to convert |
132 | rm -rf lib/plugins/upgradeplugindirectory | |
133 | ||
107aba6f ER |
134 | # flash source |
135 | rm -rf lib/_fla | |
136 | ||
08b33253 ER |
137 | # cleanup backups after patching |
138 | find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
139 | ||
107aba6f ER |
140 | %build |
141 | md5=$(md5sum -b conf/dokuwiki.php | awk '{print $1}') | |
142 | if ! grep $md5 install.php; then | |
143 | : update %{name}-config.patch oudated | |
144 | exit 1 | |
145 | fi | |
146 | ||
d73655e0 SP |
147 | %install |
148 | rm -rf $RPM_BUILD_ROOT | |
641b29cc | 149 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_localstatedir},%{_appdir}/{bin,inc,lib}} |
d73655e0 SP |
150 | |
151 | cp -a *.php $RPM_BUILD_ROOT%{_appdir} | |
641b29cc ER |
152 | cp -a bin/* $RPM_BUILD_ROOT%{_appdir}/bin |
153 | cp -a inc/* $RPM_BUILD_ROOT%{_appdir}/inc | |
154 | cp -a lib/* $RPM_BUILD_ROOT%{_appdir}/lib | |
881190a4 ER |
155 | cp -a conf/* $RPM_BUILD_ROOT%{_sysconfdir} |
156 | cp -a data/* $RPM_BUILD_ROOT%{_localstatedir} | |
107aba6f ER |
157 | cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf |
158 | cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf | |
159 | cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf | |
a4053ed1 ER |
160 | touch $RPM_BUILD_ROOT%{_sysconfdir}/acronyms.local.conf |
161 | touch $RPM_BUILD_ROOT%{_sysconfdir}/entities.local.conf | |
162 | touch $RPM_BUILD_ROOT%{_sysconfdir}/interwiki.local.conf | |
7df7f76f ER |
163 | touch $RPM_BUILD_ROOT%{_sysconfdir}/license.local.php |
164 | touch $RPM_BUILD_ROOT%{_sysconfdir}/local.php | |
165 | touch $RPM_BUILD_ROOT%{_sysconfdir}/local.protected.php | |
a4053ed1 ER |
166 | touch $RPM_BUILD_ROOT%{_sysconfdir}/mime.local.conf |
167 | touch $RPM_BUILD_ROOT%{_sysconfdir}/smileys.local.conf | |
d6d39525 | 168 | touch $RPM_BUILD_ROOT%{_sysconfdir}/userstyle.css |
d73655e0 | 169 | |
2d01b400 | 170 | ln $RPM_BUILD_ROOT%{_appdir}/lib/images/interwiki/{dokubug,bug}.gif |
107aba6f | 171 | cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_appdir}/lib/images/fileicons/jide.png |
db16581c ER |
172 | cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_appdir}/lib/images/interwiki/eventum.gif |
173 | cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_appdir}/lib/images/interwiki/skype.gif | |
dff16d0a | 174 | cp -a %{SOURCE6} $RPM_BUILD_ROOT%{_appdir}/lib/tpl/default/images/button-pld.png |
2d01b400 | 175 | |
fe631b5b | 176 | # find locales |
db16581c | 177 | %find_lang %{name}.lang |
fe631b5b | 178 | |
b607609a ER |
179 | # make inc/lang/en/edit.txt as %config |
180 | %{__sed} -i -e ' | |
181 | /%%lang([^)]\+) \/usr\/share\/dokuwiki\/inc\/lang\/[^/]\+/{ | |
182 | # make entry as %%dir | |
183 | s/^/%%dir /; p | |
184 | ||
185 | # add files inside the %dir | |
186 | s/^%%dir /%%config(noreplace) %%verify(not md5 mtime size) /; s/$/\/*.*/ | |
187 | }' %{name}.lang | |
188 | ||
d73655e0 SP |
189 | %clean |
190 | rm -rf $RPM_BUILD_ROOT | |
191 | ||
641b29cc ER |
192 | %post setup |
193 | chmod 770 %{_sysconfdir} | |
194 | chmod 660 %{_sysconfdir}/dokuwiki.php | |
195 | ||
196 | %postun setup | |
197 | if [ "$1" = "0" ]; then | |
1bf63c70 ER |
198 | if [ -f %{_sysconfdir}/dokuwiki.php ]; then |
199 | chmod 750 %{_sysconfdir} | |
200 | chmod 640 %{_sysconfdir}/dokuwiki.php | |
201 | fi | |
641b29cc ER |
202 | fi |
203 | ||
d73655e0 SP |
204 | %triggerin -- apache1 < 1.3.37-3, apache1-base |
205 | %webapp_register apache %{_webapp} | |
206 | ||
207 | %triggerun -- apache1 < 1.3.37-3, apache1-base | |
208 | %webapp_unregister apache %{_webapp} | |
209 | ||
210 | %triggerin -- apache < 2.2.0, apache-base | |
211 | %webapp_register httpd %{_webapp} | |
212 | ||
213 | %triggerun -- apache < 2.2.0, apache-base | |
214 | %webapp_unregister httpd %{_webapp} | |
215 | ||
99646b81 ER |
216 | %triggerin -- lighttpd |
217 | %webapp_register lighttpd %{_webapp} | |
218 | ||
219 | %triggerun -- lighttpd | |
220 | %webapp_unregister lighttpd %{_webapp} | |
221 | ||
881190a4 ER |
222 | %pretrans |
223 | if [ -d %{_appdir}/data -a ! -L %{_appdir}/data ]; then | |
224 | mv -f %{_appdir}/data/* %{_localstatedir} | |
225 | rm -rf %{_appdir}/data | |
226 | fi | |
227 | if [ -d %{_appdir}/conf -a ! -L %{_appdir}/conf ]; then | |
228 | mv -f %{_appdir}/conf/* %{_sysconfdir} | |
229 | rm -rf %{_appdir}/conf | |
230 | fi | |
231 | exit 0 | |
232 | ||
fe631b5b | 233 | %files -f %{name}.lang |
d73655e0 | 234 | %defattr(644,root,root,755) |
08b33253 | 235 | %doc README |
d73655e0 SP |
236 | %dir %attr(750,root,http) %{_sysconfdir} |
237 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
238 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
99646b81 ER |
239 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf |
240 | ||
881190a4 | 241 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mediameta.php |
881190a4 | 242 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/msg |
2d01b400 | 243 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/words.aspell |
7df7f76f | 244 | %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/scheme.conf |
a4053ed1 | 245 | |
a4053ed1 ER |
246 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/acronyms.local.conf |
247 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/entities.local.conf | |
248 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/interwiki.local.conf | |
7df7f76f ER |
249 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/license.local.php |
250 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/local.protected.php | |
a4053ed1 ER |
251 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.local.conf |
252 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/smileys.local.conf | |
d6d39525 | 253 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/userstyle.css |
7df7f76f | 254 | %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/local.php |
2d01b400 | 255 | |
a4053ed1 | 256 | # use local.php,local.protected.php, etc for local changes |
a4053ed1 | 257 | %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/acronyms.conf |
7df7f76f | 258 | %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/dokuwiki.php |
a4053ed1 | 259 | %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/entities.conf |
fc7417e4 | 260 | %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/interwiki.conf |
7df7f76f | 261 | %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/license.php |
a4053ed1 ER |
262 | %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/mime.conf |
263 | %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/smileys.conf | |
b9fff555 | 264 | |
a4053ed1 | 265 | # samples. perhaps move to %doc instead? |
b9fff555 ER |
266 | %attr(640,root,http) %{_sysconfdir}/mysql.conf.php.example |
267 | %attr(640,root,http) %{_sysconfdir}/acl.auth.php.dist | |
268 | %attr(640,root,http) %{_sysconfdir}/wordblock.conf | |
269 | %attr(640,root,http) %{_sysconfdir}/local.php.dist | |
270 | %attr(640,root,http) %{_sysconfdir}/users.auth.php.dist | |
881190a4 | 271 | |
641b29cc | 272 | %dir %{_appdir} |
fe631b5b ER |
273 | %{_appdir}/doku.php |
274 | %{_appdir}/feed.php | |
275 | %{_appdir}/index.php | |
641b29cc ER |
276 | %dir %{_appdir}/bin |
277 | %attr(755,root,root) %{_appdir}/bin/dwpage.php | |
278 | %attr(755,root,root) %{_appdir}/bin/indexer.php | |
279 | %attr(755,root,root) %{_appdir}/bin/wantedpages.php | |
fe631b5b ER |
280 | |
281 | %dir %{_appdir}/inc | |
282 | %{_appdir}/inc/*.php | |
283 | %{_appdir}/inc/auth | |
284 | %{_appdir}/inc/parser | |
285 | ||
286 | %dir %{_appdir}/lib | |
287 | %dir %{_appdir}/lib/plugins | |
288 | %dir %{_appdir}/lib/plugins/acl | |
289 | %{_appdir}/lib/plugins/acl/*.* | |
08b33253 | 290 | %{_appdir}/lib/plugins/acl/pix |
fe631b5b ER |
291 | %dir %{_appdir}/lib/plugins/config |
292 | %{_appdir}/lib/plugins/config/*.* | |
107aba6f | 293 | %{_appdir}/lib/plugins/config/images |
fe631b5b ER |
294 | %{_appdir}/lib/plugins/config/settings |
295 | %dir %{_appdir}/lib/plugins/plugin | |
296 | %{_appdir}/lib/plugins/plugin/*.* | |
107aba6f | 297 | %{_appdir}/lib/plugins/plugin/classes |
fe631b5b ER |
298 | %dir %{_appdir}/lib/plugins/revert |
299 | %{_appdir}/lib/plugins/revert/*.* | |
300 | %dir %{_appdir}/lib/plugins/usermanager | |
301 | %{_appdir}/lib/plugins/usermanager/*.* | |
302 | %{_appdir}/lib/plugins/usermanager/images | |
fe631b5b | 303 | %{_appdir}/lib/plugins/info |
08b33253 ER |
304 | %dir %{_appdir}/lib/plugins/popularity |
305 | %{_appdir}/lib/plugins/popularity/*.* | |
fe631b5b ER |
306 | %{_appdir}/lib/plugins/*.php |
307 | %{_appdir}/lib/images | |
308 | %{_appdir}/lib/scripts | |
309 | %{_appdir}/lib/styles | |
310 | %{_appdir}/lib/tpl | |
311 | %{_appdir}/lib/exe | |
881190a4 ER |
312 | |
313 | %dir %attr(770,root,http) %{_localstatedir} | |
314 | %dir %attr(770,root,http) %{_localstatedir}/attic | |
315 | %dir %attr(770,root,http) %{_localstatedir}/cache | |
316 | %dir %attr(770,root,http) %{_localstatedir}/index | |
317 | %dir %attr(770,root,http) %{_localstatedir}/locks | |
318 | %dir %attr(770,root,http) %{_localstatedir}/media | |
319 | %dir %attr(770,root,http) %{_localstatedir}/media/wiki | |
320 | %dir %attr(770,root,http) %{_localstatedir}/meta | |
321 | %dir %attr(770,root,http) %{_localstatedir}/pages | |
881190a4 | 322 | %dir %attr(770,root,http) %{_localstatedir}/pages/wiki |
08b33253 | 323 | %dir %attr(770,root,http) %{_localstatedir}/tmp |
b9fff555 | 324 | %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/media/wiki/dokuwiki-128.png |
b9fff555 ER |
325 | %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/pages/wiki/dokuwiki.txt |
326 | %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/pages/wiki/syntax.txt | |
641b29cc ER |
327 | |
328 | %files setup | |
329 | %defattr(644,root,root,755) | |
330 | %{_appdir}/install.php |