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