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