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