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