]>
Commit | Line | Data |
---|---|---|
600b6f8b | 1 | # TODO: |
511d91cd | 2 | # - prepare config for lighttpd |
600b6f8b | 3 | # - it has PEAR boundled inside - use system ones |
32abe254 | 4 | # - use pear-deps system? |
a87cdb0e | 5 | # - use system js/tiny_mce |
32abe254 | 6 | # - package: http://blog.ilohamail.org/ and remove boundled classess from it |
600b6f8b | 7 | # |
600b6f8b | 8 | Summary: RoundCube Webmail |
07c0744d | 9 | Summary(pl.UTF-8): RoundCube Webmail - poczta przez WWW |
600b6f8b | 10 | Name: roundcubemail |
68e85cf8 | 11 | Version: 0.1 |
84f90938 | 12 | Release: 7 |
600b6f8b PG |
13 | License: GPL v2 |
14 | Group: Applications/WWW | |
84f90938 | 15 | Source0: http://dl.sourceforge.net/roundcubemail/%{name}-%{version}.tar.gz |
16 | # Source0-md5: 556c6d766519d2f646a94e8dbcecbf2d | |
32abe254 | 17 | Source1: %{name}.config |
94ca3383 | 18 | Source2: %{name}.logrotate |
600b6f8b | 19 | Patch0: %{name}-config.patch |
74ebebd0 | 20 | Patch1: %{name}-faq-page.patch |
074807fb | 21 | Patch2: %{name}-tz.patch |
600b6f8b PG |
22 | URL: http://www.roundcube.net/ |
23 | BuildRequires: rpmbuild(macros) >= 1.268 | |
a87cdb0e | 24 | BuildRequires: sed >= 4.0 |
3727377d | 25 | Requires: %{name}-skin |
e06157c8 | 26 | Requires: php(pcre) |
c2e8deee | 27 | Requires: php(sockets) |
32abe254 | 28 | # Some php-database backend. Suggests? |
600b6f8b | 29 | Requires: webapps |
3c073b7f SP |
30 | Suggests: php(gd) |
31 | Suggests: php(iconv) | |
32 | Suggests: php(mcrypt) | |
f29a5139 | 33 | Suggests: php(openssl) |
728c87a3 | 34 | Suggests: php-pecl-fileinfo |
7e68a9e0 | 35 | Conflicts: logrotate < 3.7-4 |
600b6f8b PG |
36 | BuildArch: noarch |
37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
38 | ||
39 | %define _webapps /etc/webapps | |
5737afb2 | 40 | %define _webapp roundcube |
600b6f8b PG |
41 | %define _sysconfdir %{_webapps}/%{_webapp} |
42 | %define _appdir %{_datadir}/%{_webapp} | |
43 | %define _appdatadir /var/lib/roundcube | |
8f3a4fab | 44 | %define _applogdir /var/log/roundcube |
e324f8fc | 45 | %define _archivelogdir /var/log/archive/roundcube |
600b6f8b PG |
46 | |
47 | %description | |
48 | RoundCube Webmail is a browser-based multilingual IMAP client with an | |
49 | application-like user interface. It provides full functionality you | |
50 | expect from an e-mail client, including MIME support, address book, | |
51 | folder manipulation and message filters. RoundCube Webmail is written | |
52 | in PHP and requires the MySQL database. The user interface is fully | |
53 | skinnable using XHTML and CSS 2. | |
54 | ||
d9bffeff JR |
55 | %description -l pl.UTF-8 |
56 | RoundCube Webmail to oparty na przeglądarce wielojęzyczny klient PHP z | |
57 | interfejsem użytkownika podobnym do aplikacji. Udostępnia pełną | |
58 | funkcjonalność jakiej można oczekiwać od klienta pocztowego, w tym | |
59 | obsługę MIME, książkę adresową, operacje na folderach i filtry | |
60 | wiadomości. RoundCube Webmail jest napisany w PHP i wymaga bazy danych | |
61 | MySQL. Interfejs użytkownika można w pełni obudować skórką przy użyciu | |
5d23c484 JB |
62 | XHTML-a i CSS 2. |
63 | ||
a10cd471 | 64 | %package setup |
00ff8410 | 65 | Summary: Installer script for RoundCube Webmail |
a210006f | 66 | Summary(pl.UTF-8): Skrypt instalacyjny RoundCube Webmaila |
00ff8410 | 67 | Group: Applications/WWW |
8b170957 | 68 | Requires: %{name} = %{version}-%{release} |
00ff8410 | 69 | |
a10cd471 | 70 | %description setup |
a210006f JB |
71 | This package provides installer script for RoundCube Webmail. |
72 | ||
73 | %description setup -l pl.UTF-8 | |
74 | Ten pakiet zawiera skrypt instalacyjny RoundCube Webmaila. | |
00ff8410 | 75 | |
3727377d ER |
76 | %package skin-default |
77 | Summary: Default skin for RoundCube Webmail | |
205b27a0 | 78 | Summary(pl.UTF-8): Domyślna skórka dla RoundCube Webmaila |
3727377d ER |
79 | Group: Applications/WWW |
80 | Provides: %{name}-skin | |
81 | ||
82 | %description skin-default | |
83 | Default skin for RoundCube Webmail. | |
84 | ||
205b27a0 JB |
85 | %description skin-default -l pl.UTF-8 |
86 | Domyślna skórka dla RoundCube Webmaila. | |
87 | ||
600b6f8b | 88 | %prep |
84f90938 | 89 | %setup -q |
600b6f8b | 90 | %patch0 -p1 |
74ebebd0 | 91 | %patch1 -p1 |
074807fb | 92 | %patch2 -p1 |
600b6f8b | 93 | |
5737afb2 ER |
94 | find -name .svn | xargs -r rm -rf |
95 | ||
a87cdb0e | 96 | # undos the source |
74ebebd0 | 97 | find '(' -name '*.php' -o -name '*.inc' -o -name '*.js' -o -name '*.css' ')' -print0 | xargs -0 sed -i -e 's,\r$,,' |
a87cdb0e | 98 | |
600b6f8b PG |
99 | %install |
100 | rm -rf $RPM_BUILD_ROOT | |
e324f8fc | 101 | install -d $RPM_BUILD_ROOT{%{_appdatadir},%{_applogdir},%{_archivelogdir},%{_sysconfdir}} \ |
98cf2bae | 102 | $RPM_BUILD_ROOT{%{_appdir}/{bin,config,installer,program,skins},/etc/logrotate.d} |
600b6f8b PG |
103 | |
104 | # Main application part: | |
59b0d169 | 105 | cp -a program/* $RPM_BUILD_ROOT%{_appdir}/program |
6af22bc8 | 106 | cp -a bin/*.php $RPM_BUILD_ROOT%{_appdir}/bin |
59b0d169 | 107 | cp -a index.php $RPM_BUILD_ROOT%{_appdir} |
600b6f8b | 108 | |
3727377d | 109 | # Skins installation |
59b0d169 | 110 | cp -a skins/* $RPM_BUILD_ROOT%{_appdir}/skins |
600b6f8b | 111 | |
98cf2bae SP |
112 | # Installer part |
113 | cp -a installer/* $RPM_BUILD_ROOT%{_appdir}/installer | |
114 | ||
600b6f8b PG |
115 | ## Configuration: |
116 | install config/db.inc.php.dist $RPM_BUILD_ROOT%{_sysconfdir}/db.inc.php | |
117 | install config/main.inc.php.dist $RPM_BUILD_ROOT%{_sysconfdir}/main.inc.php | |
118 | ln -sf %{_sysconfdir}/db.inc.php $RPM_BUILD_ROOT%{_appdir}/config/db.inc.php | |
119 | ln -sf %{_sysconfdir}/main.inc.php $RPM_BUILD_ROOT%{_appdir}/config/main.inc.php | |
120 | ||
32abe254 PG |
121 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf |
122 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf | |
94ca3383 | 123 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} |
32abe254 | 124 | |
5d23c484 JB |
125 | %clean |
126 | rm -rf $RPM_BUILD_ROOT | |
127 | ||
a87cdb0e ER |
128 | %pretrans |
129 | if [ ! -f %{_sysconfdir}/db.inc.php -o ! -f %{_sysconfdir}/main.inc.php ]; then | |
130 | # import configs from previously manually installed site | |
131 | d=/home/services/httpd/html/config | |
132 | echo >&2 "Importing site configs from $d" | |
133 | mkdir -p %{_sysconfdir} | |
134 | if [ -f $d/db.inc.php ]; then | |
135 | [ -f %{_sysconfdir}/db.inc.php ] && mv -f %{_sysconfdir}/db.inc.php{,.rpmorig} | |
59b0d169 | 136 | cp -af $d/db.inc.php %{_sysconfdir}/db.inc.php |
a87cdb0e ER |
137 | fi |
138 | if [ -f $d/main.inc.php ]; then | |
139 | [ -f %{_sysconfdir}/main.inc.php ] && mv -f %{_sysconfdir}/main.inc.php{,.rpmorig} | |
59b0d169 | 140 | cp -af $d/main.inc.php %{_sysconfdir}/main.inc.php |
a87cdb0e ER |
141 | fi |
142 | fi | |
143 | ||
59b0d169 ER |
144 | %post |
145 | if [ "$1" = 0 ]; then | |
146 | %banner -e %{name} <<'EOF' | |
147 | To customize installed languages set | |
148 | %%_install_langs in /etc/rpm/macros | |
149 | ||
150 | EOF | |
151 | fi | |
152 | ||
4fddc0f8 | 153 | %triggerin -- apache1 < 1.3.37-3, apache1-base |
600b6f8b PG |
154 | %webapp_register apache %{_webapp} |
155 | ||
4fddc0f8 | 156 | %triggerun -- apache1 < 1.3.37-3, apache1-base |
600b6f8b PG |
157 | %webapp_unregister apache %{_webapp} |
158 | ||
159 | %triggerin -- apache < 2.2.0, apache-base | |
160 | %webapp_register httpd %{_webapp} | |
161 | ||
162 | %triggerun -- apache < 2.2.0, apache-base | |
163 | %webapp_unregister httpd %{_webapp} | |
164 | ||
600b6f8b PG |
165 | %files |
166 | %defattr(644,root,root,755) | |
167 | %doc CHANGELOG INSTALL README UPGRADING SQL | |
168 | %dir %attr(750,root,http) %{_sysconfdir} | |
32abe254 PG |
169 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf |
170 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
600b6f8b | 171 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.php |
496e37a6 | 172 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name} |
600b6f8b | 173 | %dir %{_appdir} |
7e88f091 | 174 | %{_appdir}/*.php |
6af22bc8 ER |
175 | %dir %{_appdir}/bin |
176 | %{_appdir}/bin/*.php | |
600b6f8b PG |
177 | %dir %{_appdir}/config |
178 | %{_appdir}/config/*.php | |
179 | %dir %{_appdir}/program | |
59b0d169 ER |
180 | %{_appdir}/program/*.gif |
181 | %{_appdir}/program/include | |
182 | %{_appdir}/program/js | |
183 | %{_appdir}/program/lib | |
184 | %{_appdir}/program/steps | |
185 | %dir %{_appdir}/program/localization | |
186 | %{_appdir}/program/localization/index.inc | |
074807fb | 187 | |
59b0d169 | 188 | %lang(am) %{_appdir}/program/localization/am |
511d91cd | 189 | %lang(ar) %{_appdir}/program/localization/ar |
59b0d169 | 190 | %lang(bg) %{_appdir}/program/localization/bg |
475566bd | 191 | %lang(bs) %{_appdir}/program/localization/bs_BA |
59b0d169 ER |
192 | %lang(ca) %{_appdir}/program/localization/ca |
193 | %lang(cz) %{_appdir}/program/localization/cz | |
194 | %lang(da) %{_appdir}/program/localization/da | |
313f268c | 195 | %lang(de) %{_appdir}/program/localization/de_DE |
074807fb | 196 | %lang(de_CH) %{_appdir}/program/localization/de_CH |
59b0d169 | 197 | %lang(el) %{_appdir}/program/localization/el |
313f268c | 198 | %lang(en_GB) %{_appdir}/program/localization/en_GB |
59b0d169 | 199 | %lang(en_US) %{_appdir}/program/localization/en_US |
94ca3383 | 200 | %lang(eo) %{_appdir}/program/localization/eo |
59b0d169 ER |
201 | %lang(es) %{_appdir}/program/localization/es |
202 | %lang(et) %{_appdir}/program/localization/et_EE | |
203 | %lang(eu) %{_appdir}/program/localization/eu | |
511d91cd | 204 | %lang(fa) %{_appdir}/program/localization/fa |
59b0d169 ER |
205 | %lang(fi) %{_appdir}/program/localization/fi |
206 | %lang(fr) %{_appdir}/program/localization/fr | |
475566bd | 207 | %lang(ga) %{_appdir}/program/localization/ga_IE |
b576bb6b | 208 | %lang(ge) %{_appdir}/program/localization/ge |
94ca3383 | 209 | %lang(gl) %{_appdir}/program/localization/gl |
b576bb6b SP |
210 | %lang(he) %{_appdir}/program/localization/he |
211 | %lang(hi) %{_appdir}/program/localization/hi | |
59b0d169 ER |
212 | %lang(hr) %{_appdir}/program/localization/hr |
213 | %lang(hu) %{_appdir}/program/localization/hu | |
b576bb6b SP |
214 | %lang(id) %{_appdir}/program/localization/id_ID |
215 | %lang(is) %{_appdir}/program/localization/is | |
59b0d169 ER |
216 | %lang(it) %{_appdir}/program/localization/it |
217 | %lang(ja) %{_appdir}/program/localization/ja | |
b576bb6b | 218 | %lang(kr) %{_appdir}/program/localization/kr |
59b0d169 ER |
219 | %lang(lt) %{_appdir}/program/localization/lt |
220 | %lang(lv) %{_appdir}/program/localization/lv | |
e0ad2b16 | 221 | %lang(mk) %{_appdir}/program/localization/mk |
475566bd | 222 | %lang(ms) %{_appdir}/program/localization/ms_MY |
59b0d169 | 223 | %lang(nb) %{_appdir}/program/localization/nb_NO |
b576bb6b | 224 | %lang(ne) %{_appdir}/program/localization/ne |
313f268c | 225 | %lang(nl) %{_appdir}/program/localization/nl_NL |
b576bb6b SP |
226 | %lang(nl_BE) %{_appdir}/program/localization/nl_BE |
227 | %lang(nn) %{_appdir}/program/localization/nn_NO | |
59b0d169 | 228 | %lang(pl) %{_appdir}/program/localization/pl |
313f268c | 229 | %lang(pt) %{_appdir}/program/localization/pt_PT |
074807fb | 230 | %lang(pt_BR) %{_appdir}/program/localization/pt_BR |
59b0d169 ER |
231 | %lang(ro) %{_appdir}/program/localization/ro |
232 | %lang(ru) %{_appdir}/program/localization/ru | |
233 | %lang(se) %{_appdir}/program/localization/se | |
234 | %lang(si) %{_appdir}/program/localization/si | |
235 | %lang(sk) %{_appdir}/program/localization/sk | |
074807fb | 236 | %lang(sl) %{_appdir}/program/localization/sl |
475566bd JB |
237 | %lang(sq) %{_appdir}/program/localization/sq_AL |
238 | %lang(sr) %{_appdir}/program/localization/sr_cyrillic | |
239 | %lang(sr@latin) %{_appdir}/program/localization/sr_latin | |
240 | %lang(th) %{_appdir}/program/localization/th_TH | |
59b0d169 | 241 | %lang(tr) %{_appdir}/program/localization/tr |
511d91cd | 242 | %lang(uk) %{_appdir}/program/localization/uk |
b576bb6b | 243 | %lang(vn) %{_appdir}/program/localization/vn |
511d91cd | 244 | %lang(zh_CN) %{_appdir}/program/localization/zh_CN |
074807fb | 245 | %lang(zh_TW) %{_appdir}/program/localization/zh_TW |
59b0d169 | 246 | |
290a707d | 247 | %dir %{_appdir}/skins |
8f3a4fab | 248 | %dir %attr(770,root,http) %{_applogdir} |
e324f8fc | 249 | %dir %attr(751,root,logs) %{_archivelogdir} |
600b6f8b | 250 | %dir %attr(770,root,http) %{_appdatadir} |
8f3a4fab | 251 | # %ghost logfile |
3727377d | 252 | |
a10cd471 | 253 | %files setup |
00ff8410 SP |
254 | %defattr(644,root,root,755) |
255 | %dir %{_appdir}/installer | |
256 | %{_appdir}/installer/*.php | |
257 | %{_appdir}/installer/client.js | |
258 | %{_appdir}/installer/styles.css | |
259 | %{_appdir}/installer/welcome.html | |
260 | %{_appdir}/installer/images | |
261 | ||
3727377d ER |
262 | %files skin-default |
263 | %defattr(644,root,root,755) | |
264 | %{_appdir}/skins/default |