]>
Commit | Line | Data |
---|---|---|
d73655e0 | 1 | Summary: PHP-based Wiki webapplication |
b9cde090 | 2 | Summary(pl.UTF-8): Aplikacja WWW Wiki oparta na PHP |
d73655e0 SP |
3 | Name: dokuwiki |
4 | Version: 20070626b | |
7cbddfe6 | 5 | Release: 0.27 |
d73655e0 SP |
6 | License: GPL v2 |
7 | Group: Applications/WWW | |
8 | Source0: http://www.splitbrain.org/_media/projects/dokuwiki/%{name}-2007-06-26b.tgz | |
9 | # Source0-md5: 84e9b5e8e617658bb0264aa3836f23b3 | |
99646b81 ER |
10 | Source1: %{name}-apache.conf |
11 | Source2: %{name}-lighttpd.conf | |
641b29cc ER |
12 | Patch0: %{name}-paths.patch |
13 | Patch1: %{name}-config.patch | |
59f818e0 | 14 | Patch2: %{name}-mysqlauth.patch |
0a785872 | 15 | Patch3: %{name}-config-allow-require.patch |
48993817 | 16 | Patch4: %{name}-geshi.patch |
9e409dbc | 17 | Patch5: %{name}-http_auth-option.patch |
dcd487f1 | 18 | URL: http://wiki.splitbrain.org/wiki:dokuwiki |
d73655e0 | 19 | BuildRequires: rpmbuild(macros) >= 1.268 |
b3528e0c | 20 | Requires: geshi >= 1.0.7.19 |
394e97c5 | 21 | Requires: php(xml) |
d73655e0 | 22 | Requires: webapps |
24a3d556 | 23 | Requires: webserver(alias) |
5e55ff85 ER |
24 | Requires: webserver(php) >= 4.3.3 |
25 | Suggests: php(gd) | |
d73655e0 SP |
26 | BuildArch: noarch |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %define _webapps /etc/webapps | |
30 | %define _webapp %{name} | |
31 | %define _sysconfdir %{_webapps}/%{_webapp} | |
32 | %define _appdir %{_datadir}/%{_webapp} | |
881190a4 | 33 | %define _localstatedir /var/lib/%{name} |
b3528e0c | 34 | %define _phpdir /usr/share/php |
d73655e0 SP |
35 | |
36 | %description | |
37 | DokuWiki is a standards compliant, simple to use Wiki, mainly aimed at | |
38 | creating documentation of any kind. It is targeted at developer teams, | |
39 | workgroups and small companies. It has a simple but powerful syntax | |
40 | which makes sure the datafiles remain readable outside the Wiki and | |
41 | eases the creation of structured texts. All data is stored in plain | |
b9cde090 JB |
42 | text files - no database is required. |
43 | ||
44 | %description -l pl.UTF-8 | |
45 | DokuWiki to zgodne ze standardami i proste w użyciu Wiki, przeznaczone | |
46 | głównie do tworzenia dokumentów wszelkiego rodzaju. Jest przeznaczone | |
47 | dla zespołów programistów, grup roboczych i małych firm. Ma prostą, | |
48 | ale mającą duże możliwości składnię, dzięki której pliki danych | |
49 | pozostają czytelne poza Wiki, a także ułatwiającą tworzenie tekstów | |
50 | strukturalnych. Wszystkie dane są przechowywane w plikach tekstowych - | |
51 | nie jest wymagana baza danych. | |
d73655e0 | 52 | |
641b29cc ER |
53 | %package setup |
54 | Summary: Dokuwiki setup package | |
55 | Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji Dokuwiki | |
56 | Group: Applications/WWW | |
57 | Requires: %{name} = %{version}-%{release} | |
58 | ||
59 | %description setup | |
60 | Install this package to configure initial Dokuwiki installation. You | |
61 | should uninstall this package when you're done, as it considered | |
62 | insecure to keep the setup files in place. | |
63 | ||
64 | %description setup -l pl.UTF-8 | |
65 | Ten pakiet należy zainstalować w celu wstępnej konfiguracji Dokuwiki | |
66 | po pierwszej instalacji. Potem należy go odinstalować, jako że | |
67 | pozostawienie plików instalacyjnych mogłoby być niebezpieczne. | |
68 | ||
d73655e0 SP |
69 | %prep |
70 | %setup -q -n %{name}-2007-06-26b | |
641b29cc ER |
71 | %patch0 -p1 |
72 | %patch1 -p1 | |
59f818e0 | 73 | %patch2 -p1 |
0a785872 | 74 | %patch3 -p1 |
48993817 | 75 | %patch4 -p1 |
9e409dbc | 76 | %patch5 -p1 |
d73655e0 | 77 | |
2d01b400 ER |
78 | # safe file |
79 | mv conf/words.aspell{.dist,} | |
80 | ||
b3528e0c | 81 | # use system geshi package |
48993817 | 82 | rm -f inc/geshi.php |
b3528e0c ER |
83 | rm -rf inc/geshi |
84 | ||
d73655e0 SP |
85 | %install |
86 | rm -rf $RPM_BUILD_ROOT | |
641b29cc | 87 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_localstatedir},%{_appdir}/{bin,inc,lib}} |
d73655e0 SP |
88 | |
89 | cp -a *.php $RPM_BUILD_ROOT%{_appdir} | |
641b29cc ER |
90 | cp -a bin/* $RPM_BUILD_ROOT%{_appdir}/bin |
91 | cp -a inc/* $RPM_BUILD_ROOT%{_appdir}/inc | |
92 | cp -a lib/* $RPM_BUILD_ROOT%{_appdir}/lib | |
881190a4 ER |
93 | cp -a conf/* $RPM_BUILD_ROOT%{_sysconfdir} |
94 | cp -a data/* $RPM_BUILD_ROOT%{_localstatedir} | |
99646b81 ER |
95 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf |
96 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf | |
97 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf | |
7cbddfe6 ER |
98 | touch $RPM_BUILD_ROOT%{_sysconfdir}/local.php |
99 | touch $RPM_BUILD_ROOT%{_sysconfdir}/local.protected.php | |
d73655e0 | 100 | |
2d01b400 ER |
101 | ln $RPM_BUILD_ROOT%{_appdir}/lib/images/interwiki/{dokubug,issue}.gif |
102 | ln $RPM_BUILD_ROOT%{_appdir}/lib/images/interwiki/{dokubug,bug}.gif | |
103 | ||
d73655e0 SP |
104 | %clean |
105 | rm -rf $RPM_BUILD_ROOT | |
106 | ||
641b29cc ER |
107 | %post setup |
108 | chmod 770 %{_sysconfdir} | |
109 | chmod 660 %{_sysconfdir}/dokuwiki.php | |
110 | ||
111 | %postun setup | |
112 | if [ "$1" = "0" ]; then | |
113 | chmod 750 %{_sysconfdir} | |
114 | chmod 640 %{_sysconfdir}/dokuwiki.php | |
115 | fi | |
116 | ||
d73655e0 SP |
117 | %triggerin -- apache1 < 1.3.37-3, apache1-base |
118 | %webapp_register apache %{_webapp} | |
119 | ||
120 | %triggerun -- apache1 < 1.3.37-3, apache1-base | |
121 | %webapp_unregister apache %{_webapp} | |
122 | ||
123 | %triggerin -- apache < 2.2.0, apache-base | |
124 | %webapp_register httpd %{_webapp} | |
125 | ||
126 | %triggerun -- apache < 2.2.0, apache-base | |
127 | %webapp_unregister httpd %{_webapp} | |
128 | ||
99646b81 ER |
129 | %triggerin -- lighttpd |
130 | %webapp_register lighttpd %{_webapp} | |
131 | ||
132 | %triggerun -- lighttpd | |
133 | %webapp_unregister lighttpd %{_webapp} | |
134 | ||
881190a4 ER |
135 | %pretrans |
136 | if [ -d %{_appdir}/data -a ! -L %{_appdir}/data ]; then | |
137 | mv -f %{_appdir}/data/* %{_localstatedir} | |
138 | rm -rf %{_appdir}/data | |
139 | fi | |
140 | if [ -d %{_appdir}/conf -a ! -L %{_appdir}/conf ]; then | |
141 | mv -f %{_appdir}/conf/* %{_sysconfdir} | |
142 | rm -rf %{_appdir}/conf | |
143 | fi | |
144 | exit 0 | |
145 | ||
d73655e0 SP |
146 | %files |
147 | %defattr(644,root,root,755) | |
881190a4 | 148 | %doc README VERSION |
d73655e0 SP |
149 | %dir %attr(750,root,http) %{_sysconfdir} |
150 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
151 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
99646b81 ER |
152 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf |
153 | ||
881190a4 | 154 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/acronyms.conf |
881190a4 | 155 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/entities.conf |
881190a4 ER |
156 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mediameta.php |
157 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.conf | |
158 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/msg | |
881190a4 | 159 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/smileys.conf |
2d01b400 | 160 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/words.aspell |
7cbddfe6 ER |
161 | %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/local.php |
162 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/local.protected.php | |
2d01b400 | 163 | |
7cbddfe6 | 164 | # use local.php,local.protected.php for local changes |
fc7417e4 | 165 | %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/dokuwiki.php |
2d01b400 | 166 | # use interwiki.local.conf for local changes |
fc7417e4 | 167 | %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/interwiki.conf |
b9fff555 ER |
168 | |
169 | %attr(640,root,http) %{_sysconfdir}/mysql.conf.php.example | |
170 | %attr(640,root,http) %{_sysconfdir}/acl.auth.php.dist | |
171 | %attr(640,root,http) %{_sysconfdir}/wordblock.conf | |
172 | %attr(640,root,http) %{_sysconfdir}/local.php.dist | |
173 | %attr(640,root,http) %{_sysconfdir}/users.auth.php.dist | |
881190a4 | 174 | |
641b29cc ER |
175 | %dir %{_appdir} |
176 | %dir %{_appdir}/bin | |
177 | %attr(755,root,root) %{_appdir}/bin/dwpage.php | |
178 | %attr(755,root,root) %{_appdir}/bin/indexer.php | |
179 | %attr(755,root,root) %{_appdir}/bin/wantedpages.php | |
180 | %{_appdir}/inc | |
181 | %{_appdir}/lib | |
182 | %{_appdir}/doku.php | |
183 | %{_appdir}/feed.php | |
184 | %{_appdir}/index.php | |
881190a4 ER |
185 | |
186 | %dir %attr(770,root,http) %{_localstatedir} | |
187 | %dir %attr(770,root,http) %{_localstatedir}/attic | |
188 | %dir %attr(770,root,http) %{_localstatedir}/cache | |
189 | %dir %attr(770,root,http) %{_localstatedir}/index | |
190 | %dir %attr(770,root,http) %{_localstatedir}/locks | |
191 | %dir %attr(770,root,http) %{_localstatedir}/media | |
192 | %dir %attr(770,root,http) %{_localstatedir}/media/wiki | |
193 | %dir %attr(770,root,http) %{_localstatedir}/meta | |
194 | %dir %attr(770,root,http) %{_localstatedir}/pages | |
195 | %dir %attr(770,root,http) %{_localstatedir}/pages/playground | |
196 | %dir %attr(770,root,http) %{_localstatedir}/pages/wiki | |
b9fff555 ER |
197 | %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/attic/_dummy |
198 | %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/cache/_dummy | |
199 | %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/index/_dummy | |
200 | %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/locks/_dummy | |
201 | %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/media/wiki/dokuwiki-128.png | |
202 | %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/meta/_dummy | |
203 | %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/pages/playground/playground.txt | |
204 | %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/pages/wiki/dokuwiki.txt | |
205 | %attr(660,root,http) %config(noreplace,missingok) %verify(not md5 mtime size) %{_localstatedir}/pages/wiki/syntax.txt | |
641b29cc ER |
206 | |
207 | %files setup | |
208 | %defattr(644,root,root,755) | |
209 | %{_appdir}/install.php |