]> git.pld-linux.org Git - packages/squirrelmail.git/blob - squirrelmail.spec
694a8e6fac3bc0343beb8408997620162f6466e7
[packages/squirrelmail.git] / squirrelmail.spec
1 Summary:        The SquirrelMail, a WebMail package
2 Summary(pl.UTF-8):      Wiewiórcza Poczta, Poczta przez WWW
3 Summary(pt_BR.UTF-8):   O SquirrelMail é um webmail
4 Name:           squirrelmail
5 Version:        1.4.21
6 Release:        5
7 License:        GPL v2+
8 Group:          Applications/Mail
9 Source0:        http://dl.sourceforge.net/squirrelmail/%{name}-%{version}.tar.bz2
10 # Source0-md5:  44d2fe85d6fc3092bf4f11e6e928f9dc
11 %define         locales_ver             1.4.18
12 %define         all_locales_date        20090526
13 Source1:        http://dl.sourceforge.net/squirrelmail/all_locales-%{locales_ver}-%{all_locales_date}.tar.bz2
14 # Source1-md5:  ddb51e99e87b2aa8180cebe07de89fa2
15 %define         compatibility_ver       2.0.16-1.0
16 Source2:        http://www.squirrelmail.org/plugins/compatibility-%{compatibility_ver}.tar.gz
17 # Source2-md5:  d472fb353cdf0c8d56489b5d5523d0dc
18 Source3:        %{name}-apache.conf
19 Source4:        %{name}-cp1250_charset_encode.php
20 Source5:        %{name}-httpd.conf
21 Patch0:         %{name}-config.patch
22 Patch1:         %{name}-squirrelspell.patch
23 Patch2:         %{name}-ad_ldap.patch
24 Patch3:         %{name}-hide_abook_info.patch
25 URL:            http://www.squirrelmail.org/
26 BuildRequires:  bind-devel
27 BuildRequires:  gettext-devel
28 BuildRequires:  rpmbuild(macros) >= 1.264
29 Requires:       php(gettext)
30 Requires:       php(pcre)
31 Requires:       php(posix)
32 Requires:       php(session)
33 Requires:       webapps
34 Requires:       webserver
35 Requires:       webserver(php)
36 Provides:       squirrelmail-compatibility = %{compatibility_ver}
37 Provides:       webmail
38 Conflicts:      apache-base < 2.4.0-1
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 %define         _squirreldir    %{_datadir}/%{name}
42 %define         _squirreldata   /var/lib/%{name}
43 %define         _webapps                /etc/webapps
44 %define         _webapp                 %{name}
45 %define         _sysconfdir             %{_webapps}/%{_webapp}
46
47 %description
48 This package contains the Squirrelmail, a webmail system which allows
49 you check mail by any cookie-aware WWW browser. It includes built-in
50 pure PHP support for the IMAP and SMTP protocols, and all pages render
51 in pure HTML 4.0 (with no Javascript) for maximum compatibility across
52 browsers. It has very few requirements and is very easy to configure
53 and install. SquirrelMail has a all the functionality you would want
54 from an email client, including strong MIME support, address books,
55 and folder manipulation.
56
57 %description -l pl.UTF-8
58 Pakiet zawiera Wiewiórczą Pocztę, system pozwalający sprawdzać pocztę
59 przez dowolną, obsługującą ciasteczka przeglądarkę WWW. Pakiet używa
60 wbudowanej w PHP obsługi protokołów IMAP i SMTP, a serwowane strony
61 używają tylko HTML 4.0 (bez Javascriptu) po to, żeby udostępniać
62 zasoby na możliwie dużą ilość typów przeglądarek http. Pakiet jest
63 łatwy w instalacji i konfigurowaniu, a także ma wszystkie obecnie
64 wymagane cechy dobrego klienta pocztowego jak obsługa MIME, książka
65 adresowa i wsparcie dla przechowywania listów w folderach.
66
67 %description -l pt_BR.UTF-8
68 O SquirrelMail é um webmail baseado. Ele inclui suporte em PHP puro
69 para os protocolos IMAP e SMTP e todas as páginas são montadas em puro
70 HTML 4.0 (sem nenhum Javascript) para máxima compatibilidade entre
71 navegadores. Ele possui poucas exigências e é muito fácil de se
72 configurar e instalar. O SquirrelMail possui todas as funcionalidades
73 que você poderia desejar em um cliente de e-mail, incluindo um forte
74 suporte a MIME, livros de endereços e manipulação de pastas.
75
76 %package -n %{name}-plugin-filters
77 Summary:        A squirrel interface for various filters
78 Summary(pl.UTF-8):      Wiewiórczy interfejs do różnych filterów
79 Group:          Applications/Mail
80 Requires:       %{name} = %{version}-%{release}
81 Provides:       squirremail-filters
82 Provides:       webmail-filters
83 Obsoletes:      squirremail-filters
84
85 %description -n %{name}-plugin-filters
86 This package contains an interface for various filters.
87
88 %description -n %{name}-plugin-filters -l pl.UTF-8
89 Ten pakiet zawiera interfejs do różnych filtrów.
90
91 %package -n %{name}-plugin-ispell
92 Summary:        A squirrel interface to ispell
93 Summary(pl.UTF-8):      Wiewiórczy interfejs do ispella
94 Group:          Applications/Mail
95 Requires:       %{name} = %{version}-%{release}
96 Requires:       ispell
97 Provides:       squirrelmail-ispell
98 Provides:       webmail-spellcheck
99 Obsoletes:      squirrelmail-ispell
100
101 %description -n %{name}-plugin-ispell
102 This package contains an interface to ispell and it allows you to
103 check mail against typos and common mistakes.
104
105 %description -n %{name}-plugin-ispell -l pl.UTF-8
106 Pakiet zawiera interfejs do ispella pozwalający sprawdzić pocztę pod
107 kątem źle wpisanych słów i ortografii.
108
109 %package -n %{name}-plugin-mailfetch
110 Summary:        A squirrel pop3 plug-in
111 Summary(pl.UTF-8):      Wiewiórcza wtyczka pop3
112 Group:          Applications/Mail
113 Requires:       %{name} = %{version}-%{release}
114 Provides:       squirrelmail-mailfetch
115 Obsoletes:      squirrelmail-mailfetch
116
117 %description -n %{name}-plugin-mailfetch
118 This package contains an interface to pop3 servers, it allows you to
119 fetch mail from this kind of servers.
120
121 %description -n %{name}-plugin-mailfetch -l pl.UTF-8
122 Pakiet zawiera interfejs do serwerów pop3, pozwala ściągać z nich
123 pocztę za pomocą usługi pop3.
124
125 %package -n %{name}-plugin-newmail
126 Summary:        A new mail notify plug-in
127 Summary(pl.UTF-8):      Wtyczka informująca o nowej poczcie
128 Group:          Applications/Mail
129 Requires:       %{name} = %{version}-%{release}
130 Requires:       %{name}-plugin-ispell = %{version}-%{release}
131 Provides:       squirrelmail-newmail
132 Obsoletes:      squirrelmail-newmail
133
134 %description -n %{name}-plugin-newmail
135 A Squirrel new mail notify plug-in.
136
137 %description -n %{name}-plugin-newmail -l pl.UTF-8
138 Wiewiórcza wtyczka informująca o nowej poczcie.
139
140 %prep
141 %setup -q -a1
142 tar -xzf %{SOURCE2} -C plugins
143
144 # locales for not present plugins
145 rm -f locale/*/LC_MESSAGES/{abook_group,address_add,admin_add,amavisnewsql,archive_mail,askuserinfo,attachment_doc,autocomplete,avelsieve,block_attach,block_sender,bounce,change_ldappass,change_merakpass,change_mysqlpass,change_passwd,check_quota,chg_sasl_passwd,contactclean,cookie_warning,courier_vacation,custom_from,disk_quota,empty_folders,enews,extract,file_manager,folder_sizes,gpg,got_hotmail,image_buttons,japanese_input,junkfolder,ldap_abook,ldapquery,left_css,login_alias,mark_read,naguser,notes,online_users,preview_pane,qmailadmin_login,quota_usage,restrict_senders,rewrap,sasql,select_range,sent_confirmation,serversidefilter,show_headers,show_user_and_ip,smallcal,smime,startup_folder,tmda,tmdatools,taglines,templates,timeout_user,twc_weather,unsafe_image_rules,useracl,user_special_mailboxes,vadmin,view_as_html,virus_scan,vkeyboard,vpopmail,windows,yelp}.mo
146
147 # missing (bind)textdomain calls?
148 # compatibility
149
150 %patch0 -p1
151 %patch1 -p1
152 %patch2 -p1
153 %patch3 -p1
154 patch -p2 < plugins/compatibility/patches/compatibility_patch-1.4.10.diff
155 rm -rf plugins/compatibility/patches*
156
157 find locale -name '*.po' | xargs rm -f
158
159 %build
160 %{__make} -C plugins/filters/bulkquery \
161         CC="%{__cc}" \
162         CFLAGS="%{rpmcflags} " \
163         LDFLAGS="%{rpmldflags} -lpthread -llwres" \
164
165 %install
166 rm -rf $RPM_BUILD_ROOT
167 install -d $RPM_BUILD_ROOT{%{_squirreldir}/{config,data},%{_sbindir}} \
168         $RPM_BUILD_ROOT{%{_datadir}/docs/squirrel,%{_squirreldata}/{prefs,data}} \
169         $RPM_BUILD_ROOT%{_sysconfdir}
170
171 install plugins/filters/bulkquery/bulkquery $RPM_BUILD_ROOT%{_sbindir}
172 rm -f plugins/filters/bulkquery/*.{in,out,c} plugins/filters/bulkquery/bulkquery
173
174 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
175 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
176
177 cp -aR * $RPM_BUILD_ROOT%{_squirreldir}
178
179 install %{SOURCE4} $RPM_BUILD_ROOT%{_squirreldir}/functions/encode/cp1250.php
180
181 find $RPM_BUILD_ROOT%{_squirreldir} -name '*.po' -o -name '*.pot' | xargs rm -f
182
183 # junk:
184 rm -f $RPM_BUILD_ROOT%{_squirreldir}/plugins/{make_archive.pl,README.plugins}
185
186 ln -s %{_sbindir}/bulkquery $RPM_BUILD_ROOT%{_squirreldir}/plugins/filters/bulkquery/bulkquery
187
188 ##---{ move configuration to etc: }---##
189 cp $RPM_BUILD_ROOT{%{_squirreldir}/config/config_default.php,%{_sysconfdir}/config.php}
190 ln -sf %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_squirreldir}/config/config.php
191
192 ##---{ move plugins configuration to etc: }---##
193 # filters:
194 mv $RPM_BUILD_ROOT%{_squirreldir}/plugins/filters/setup.php $RPM_BUILD_ROOT%{_sysconfdir}/filters_setup.php
195 ln -s %{_sysconfdir}/filters_setup.php $RPM_BUILD_ROOT%{_squirreldir}/plugins/filters/setup.php
196
197 ##---{ Other manipulations: }---##
198 mv $RPM_BUILD_ROOT%{_squirreldir}/plugins/filters/bulkquery/README $RPM_BUILD_ROOT%{_squirreldir}/plugins/filters/README.bulkquery
199 mv $RPM_BUILD_ROOT%{_squirreldir}/plugins/filters/bulkquery/INSTALL $RPM_BUILD_ROOT%{_squirreldir}/plugins/filters/INSTALL.bulkquery
200
201 %clean
202 rm -rf $RPM_BUILD_ROOT
203
204 %triggerin -- apache1 < 1.3.37-3, apache1-base
205 %webapp_register apache %{_webapp}
206
207 %triggerun -- apache1 < 1.3.37-3, apache1-base
208 %webapp_unregister apache %{_webapp}
209
210 %triggerin -- apache-base
211 %webapp_register httpd %{_webapp}
212
213 %triggerun -- apache-base
214 %webapp_unregister httpd %{_webapp}
215
216 %triggerpostun -- squirrelmail < 1.4.5-4.1
217 if [ -f /home/services/httpd/html/squirrel/config/config.php.rpmsave ]; then
218         echo "Moving old config file to %{_sysconfdir}/config.php"
219         mv -f %{_sysconfdir}/config.php{,.rpmnew}
220         mv -f /home/services/httpd/html/squirrel/config/config.php.rpmsave %{_sysconfdir}/config.php
221 fi
222
223 if [ -f /etc/squirrelmail/config.php.rpmsave ]; then
224         echo "Moving old config file to %{_sysconfdir}/config.php"
225         mv -f %{_sysconfdir}/config.php{,.rpmnew}
226         mv -f /etc/squirrelmail/config.php.rpmsave %{_sysconfdir}/config.php
227 fi
228
229 # nuke very-old config location (this mostly for Ra)
230 if [ -f /etc/httpd/httpd.conf ]; then
231         sed -i -e "/^Include.*squirrelmail.conf/d" /etc/httpd/httpd.conf
232         httpd_reload=1
233 fi
234
235 # migrate from httpd (apache2) config dir
236 if [ -f /etc/httpd/squirrelmail.conf.rpmsave ]; then
237         cp -f %{_sysconfdir}/httpd.conf{,.rpmnew}
238         mv -f /etc/httpd/squirrelmail.conf.rpmsave %{_sysconfdir}/httpd.conf
239         httpd_reload=1
240 fi
241
242 if [ -d /etc/httpd/webapps.d ]; then
243         /usr/sbin/webapp register httpd %{_webapp}
244         httpd_reload=1
245 fi
246
247 # place new config location, as trigger puts config only on first install, do it here.
248 if [ -L /etc/httpd/httpd.conf/99_squirrelmail.conf ]; then
249         rm -f /etc/httpd/httpd.conf/99_squirrelmail.conf
250         /usr/sbin/webapp register httpd %{_webapp}
251         httpd_reload=1
252 fi
253
254 if [ "$httpd_reload" ]; then
255         %service -q httpd reload
256 fi
257
258 %files
259 %defattr(644,root,root,755)
260 %doc doc/AUTHORS doc/ChangeLog ChangeLog.locales doc/README doc/ReleaseNotes ReleaseNotes.locales doc/UPGRADE doc/*.txt doc/*.html
261 %doc doc/release_notes_archive/*/*
262
263 %dir %attr(750,root,http) %{_sysconfdir}
264 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
265 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
266 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
267
268 %dir %{_squirreldir}
269 %{_squirreldir}/class
270 %attr(640,root,http) %{_squirreldir}/data/.htaccess
271 %attr(640,root,http) %{_squirreldir}/data/*
272 %{_squirreldir}/index.php
273 %attr(744,root,root) %{_squirreldir}/configure
274 %attr(750,root,http) %dir %{_squirreldir}/config
275 %attr(640,root,http) %{_squirreldir}/config/.htaccess
276 %attr(744,root,root) %{_squirreldir}/config/*.pl
277 %attr(640,root,http) %config(noreplace) %{_squirreldir}/config/*.php
278 %{_squirreldir}/functions
279 %dir %{_squirreldir}/help
280 %attr(640,root,http) %{_squirreldir}/help/.htaccess
281 %{_squirreldir}/help/index.php
282 %{_squirreldir}/help/en_US
283 %lang(bg) %{_squirreldir}/help/bg_BG
284 %lang(ca) %{_squirreldir}/help/ca_ES
285 %lang(cs) %{_squirreldir}/help/cs_CZ
286 %lang(cy) %{_squirreldir}/help/cy_GB
287 %lang(da) %{_squirreldir}/help/da_DK
288 %lang(de) %{_squirreldir}/help/de_DE
289 %lang(es) %{_squirreldir}/help/es_ES
290 %lang(fa) %{_squirreldir}/help/fa_IR
291 %lang(fi) %{_squirreldir}/help/fi_FI
292 %lang(fr) %{_squirreldir}/help/fr_FR
293 %lang(id) %{_squirreldir}/help/id_ID
294 %lang(it) %{_squirreldir}/help/it_IT
295 %lang(ja) %{_squirreldir}/help/ja_JP
296 %lang(ko) %{_squirreldir}/help/ko_KR
297 %lang(lt) %{_squirreldir}/help/lt_LT
298 %lang(nl) %{_squirreldir}/help/nl_NL
299 %lang(pl) %{_squirreldir}/help/pl_PL
300 %lang(pt) %{_squirreldir}/help/pt_PT
301 %lang(pt_BR) %{_squirreldir}/help/pt_BR
302 %lang(ru) %{_squirreldir}/help/ru_RU
303 %lang(sk) %{_squirreldir}/help/sk_SK
304 %lang(sl) %{_squirreldir}/help/sl_SI
305 %lang(sr) %{_squirreldir}/help/sr_YU
306 %lang(sv) %{_squirreldir}/help/sv_SE
307 %lang(uk) %{_squirreldir}/help/uk_UA
308 %lang(zh_CN) %{_squirreldir}/help/zh_CN
309 %{_squirreldir}/images
310 %{_squirreldir}/include
311 %dir %{_squirreldir}/locale
312 %attr(640,root,http) %{_squirreldir}/locale/.htaccess
313 %{_squirreldir}/locale/index.php
314 %{_squirreldir}/locale/timezones.cfg
315 %lang(ar) %{_squirreldir}/locale/ar
316 %lang(bg) %{_squirreldir}/locale/bg_BG
317 %lang(bn) %{_squirreldir}/locale/bn_BD
318 %lang(bn) %{_squirreldir}/locale/bn_IN
319 %lang(ca) %{_squirreldir}/locale/ca_ES
320 %lang(da) %{_squirreldir}/locale/da_DK
321 %lang(de) %{_squirreldir}/locale/de_DE
322 %lang(cs) %{_squirreldir}/locale/cs_CZ
323 %lang(cy) %{_squirreldir}/locale/cy_GB
324 %lang(el) %{_squirreldir}/locale/el_GR
325 %lang(es) %{_squirreldir}/locale/es_ES
326 %lang(et) %{_squirreldir}/locale/et_EE
327 %lang(eu) %{_squirreldir}/locale/eu_ES
328 %lang(fa) %{_squirreldir}/locale/fa_IR
329 %lang(fi) %{_squirreldir}/locale/fi_FI
330 %lang(fo) %{_squirreldir}/locale/fo_FO
331 %lang(fr) %{_squirreldir}/locale/fr_FR
332 %lang(fy) %{_squirreldir}/locale/fy
333 %lang(he) %{_squirreldir}/locale/he_IL
334 %lang(hr) %{_squirreldir}/locale/hr_HR
335 %lang(hu) %{_squirreldir}/locale/hu_HU
336 %lang(id) %{_squirreldir}/locale/id_ID
337 %lang(is) %{_squirreldir}/locale/is_IS
338 %lang(it) %{_squirreldir}/locale/it_IT
339 %lang(ja) %{_squirreldir}/locale/ja_JP
340 %lang(ka) %{_squirreldir}/locale/ka
341 %lang(km) %{_squirreldir}/locale/km
342 %lang(ko) %{_squirreldir}/locale/ko_KR
343 %lang(lt) %{_squirreldir}/locale/lt_LT
344 %lang(lv) %{_squirreldir}/locale/lv_LV
345 %lang(mk) %{_squirreldir}/locale/mk
346 %lang(ms) %{_squirreldir}/locale/ms_MY
347 %lang(nb) %{_squirreldir}/locale/nb_NO
348 %lang(nl) %{_squirreldir}/locale/nl_NL
349 %lang(nn) %{_squirreldir}/locale/nn_NO
350 %lang(pl) %{_squirreldir}/locale/pl_PL
351 %lang(pt) %{_squirreldir}/locale/pt_PT
352 %lang(pt_BR) %{_squirreldir}/locale/pt_BR
353 %lang(ro) %{_squirreldir}/locale/ro_RO
354 %lang(ru) %{_squirreldir}/locale/ru_RU
355 %lang(sr) %{_squirreldir}/locale/sr_YU
356 %lang(sv) %{_squirreldir}/locale/sv_SE
357 %lang(sk) %{_squirreldir}/locale/sk_SK
358 %lang(sl) %{_squirreldir}/locale/sl_SI
359 %lang(ta) %{_squirreldir}/locale/ta_LK
360 %lang(tr) %{_squirreldir}/locale/tr_TR
361 %lang(uk) %{_squirreldir}/locale/uk_UA
362 %lang(ug) %{_squirreldir}/locale/ug
363 %lang(vi) %{_squirreldir}/locale/vi_VN
364 %lang(zh_CN) %{_squirreldir}/locale/zh_CN
365 %lang(zh_TW) %{_squirreldir}/locale/zh_TW
366 %dir %{_squirreldir}/plugins
367 %{_squirreldir}/plugins/administrator
368 %{_squirreldir}/plugins/bug_report
369 %{_squirreldir}/plugins/calendar
370 %{_squirreldir}/plugins/compatibility
371 %{_squirreldir}/plugins/delete_move_next
372 %{_squirreldir}/plugins/demo
373 %{_squirreldir}/plugins/fortune
374 %{_squirreldir}/plugins/index.php
375 %{_squirreldir}/plugins/info
376 %{_squirreldir}/plugins/listcommands
377 %{_squirreldir}/plugins/message_details
378 %{_squirreldir}/plugins/sent_subfolders
379 %{_squirreldir}/plugins/spamcop
380 %{_squirreldir}/plugins/test
381 %{_squirreldir}/plugins/translate
382 %{_squirreldir}/src
383 %{_squirreldir}/themes
384 %attr(710,root,http) %dir %{_squirreldata}
385 %attr(730,root,http) %dir %{_squirreldata}/prefs
386 %attr(730,root,http) %dir %{_squirreldata}/data
387 # To be removed. Just for compatibility with existing configurations:
388 %attr(730,root,http) %dir %{_squirreldir}/data
389
390 %files -n %{name}-plugin-filters
391 %defattr(644,root,root,755)
392 %doc plugins/filters/README
393 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/filters_setup.php
394 %attr(755,root,root) %{_sbindir}/bulkquery
395 %dir %{_squirreldir}/plugins/filters
396 %dir %{_squirreldir}/plugins/filters/bulkquery
397 %{_squirreldir}/plugins/filters/*.php
398 %{_squirreldir}/plugins/filters/bulkquery/*.php
399
400 %files -n %{name}-plugin-ispell
401 %defattr(644,root,root,755)
402 %{_squirreldir}/plugins/squirrelspell
403
404 %files -n %{name}-plugin-mailfetch
405 %defattr(644,root,root,755)
406 %doc plugins/mail_fetch/README
407 %dir %{_squirreldir}/plugins/mail_fetch
408 %{_squirreldir}/plugins/mail_fetch/*.php
409
410 %files -n %{name}-plugin-newmail
411 %defattr(644,root,root,755)
412 %doc plugins/newmail/{HISTORY,README}
413 %dir %{_squirreldir}/plugins/newmail
414 %{_squirreldir}/plugins/newmail/*.php
415 %{_squirreldir}/plugins/newmail/sounds
This page took 0.089249 seconds and 2 git commands to generate.