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