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