3 # - separate spec for enigmail
6 %bcond_without enigmail # don't build enigmail - GPG/PGP support
7 %bcond_without gnomeui # disable gnomeui support
8 %bcond_without gnomevfs # disable GNOME comp. (gconf+libgnome+gnomevfs) and gnomevfs ext.
9 %bcond_without gnome # disable all GNOME components (gnome+gnomeui+gnomevfs)
10 %bcond_without ldap # disable e-mail address lookups in LDAP directories
11 %bcond_without lightning # disable sunbird calendar
14 %undefine with_gnomeui
15 %undefine with_gnomevfs
17 %define enigmail_ver 1.0.1
19 Summary: Icedove - email client
20 Summary(pl.UTF-8): Icedove - klient poczty
24 License: MPL 1.1 or GPL v2+ or LGPL v2.1+
25 Group: Applications/Networking
26 Source0: http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/thunderbird-%{version}.source.tar.bz2
27 # Source0-md5: f004aa5ddf2a30b5df96e06df416b0c9
28 Source1: http://www.mozilla-enigmail.org/download/source/enigmail-%{enigmail_ver}.tar.gz
29 # Source1-md5: 508ca9ab0396afb49e82eda88014924b
30 Source2: %{name}-branding.tar.bz2
31 # Source2-md5: 2da351522bdd7f4a3bd8aaff4c776976
32 Source3: %{name}-rm_nonfree.sh
33 Source4: %{name}.desktop
35 Source6: %{name}-enigmail.manifest
36 Patch0: %{name}-branding.patch
37 Patch1: %{name}-enigmail-shared.patch
38 Patch2: %{name}-gcc.patch
39 Patch3: %{name}-fonts.patch
40 Patch4: %{name}-install.patch
41 Patch5: %{name}-hunspell.patch
42 Patch6: %{name}-prefs.patch
43 Patch7: %{name}-breakpad.patch
44 Patch8: %{name}-libpng.patch
45 Patch9: %{name}-condstore.patch
46 URL: http://www.pld-linux.org/Packages/Icedove
47 %{?with_gnomevfs:BuildRequires: GConf2-devel >= 1.2.1}
48 BuildRequires: automake
49 BuildRequires: freetype-devel >= 1:2.1.8
50 %{?with_gnomevfs:BuildRequires: gnome-vfs2-devel >= 2.0}
51 BuildRequires: gtk+2-devel >= 1:2.0.0
52 BuildRequires: hunspell-devel
53 BuildRequires: libIDL-devel >= 0.8.0
54 %{?with_gnomevfs:BuildRequires: libgnome-devel >= 2.0}
55 %{?with_gnomeui:BuildRequires: libgnomeui-devel >= 2.2.0}
56 BuildRequires: libjpeg-devel >= 6b
57 BuildRequires: libpng-devel >= 1.2.0
58 BuildRequires: libstdc++-devel
59 BuildRequires: nspr-devel >= 1:4.8
60 BuildRequires: nss-devel >= 1:3.12.0
61 BuildRequires: pango-devel >= 1:1.1.0
62 BuildRequires: pkgconfig
63 BuildRequires: sed >= 4.0
64 BuildRequires: startup-notification-devel >= 0.8
65 BuildRequires: xorg-lib-libXext-devel
66 BuildRequires: xorg-lib-libXinerama-devel
67 BuildRequires: xorg-lib-libXt-devel
69 Requires: myspell-common
70 Requires: nspr >= 1:4.6.1
71 Requires: nss >= 1:3.11.3
72 Obsoletes: mozilla-thunderbird
73 Obsoletes: mozilla-thunderbird-dictionary-en-US
74 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
76 %define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+
78 # iceweasel/icedove/iceape provide their own versions
79 %define _noautoreqdep libgfxpsshar.so libgkgfx.so libgtkxtbin.so libjsj.so libxpcom_compat.so libxpcom_core.so libxpistub.so
80 %define _noautoprovfiles %{_libdir}/%{name}/components
81 # we don't want these to satisfy xulrunner-devel
82 %define _noautoprov libgtkembedmoz.so libldap50.so libmozjs.so libprldap50.so libssldap50.so libxpcom.so libxul.so
83 # and as we don't provide them, don't require either
84 %define _noautoreq libgtkembedmoz.so libldap50.so libmozjs.so libprldap50.so libssldap50.so libxpcom.so libxul.so
87 Icedove is an open-source,fast and portable email client.
89 %description -l pl.UTF-8
90 Icedove jest open sourcowym, szybkim i przenośnym klientem poczty.
92 %package addon-lightning
93 Summary: An integrated calendar for Icedove
94 Summary(pl.UTF-8): Zintegrowany kalendarz dla Icedove
95 License: MPL 1.1 or GPL v2+ or LGPL v2.1+
96 Group: Applications/Networking
97 Requires: %{name} = %{version}-%{release}
99 %description addon-lightning
100 Lightning is an calendar extension to Icedove email client.
102 %description addon-lightning -l pl.UTF-8
103 Lightning to rozszerzenie do klienta poczty Icedove dodające
104 funkcjonalność kalendarza.
106 %package addon-enigmail
107 Summary: Extension for the authentication and encryption features provided by GnuPG
108 Summary(pl.UTF-8): Rozszerzenie do uwierzytelniania i szyfrowania zapewnianego przez GnuPG
110 Group: Applications/Networking
111 URL: http://enigmail.mozdev.org/
112 Requires: %{name} = %{version}-%{release}
114 Obsoletes: mozilla-thunderbird-addon-enigmail
116 %description addon-enigmail
117 Enigmail is an extension to the Icedove mail client which allows users
118 to access the authentication and encryption features provided by
122 - Encrypt/sign mail when sending, decrypt/authenticate received mail
123 - Support for inline-PGP (RFC 2440) and PGP/MIME (RFC 3156)
124 - Per-Account based encryption and signing defaults
125 - Per-Recipient rules for automated key selection, and
126 enabling/disabling encryption and signing
127 - OpenPGP key management interface
129 %description addon-enigmail -l pl.UTF-8
130 Enigmail to rozszerzenie klienta pocztowego Icedove pozwalające
131 użytkownikom na dostęp do uwierzytelniania i szyfrowania zapewnianego
135 - szyfrowanie/podpisywanie poczty przy wysyłaniu,
136 odszyfrowywanie/uwierzytelnianie poczty odebranej
137 - obsługa inline-PGP (RFC 2440) i PGP/MIME (RFC 3156)
138 - ustawienia domyślne szyfrowania i podpisywania dla każdego konta
139 - reguły automatycznego wyboru kluczy i włączenia szyfrowania oraz
140 podpisywania dla każdego adresata
141 - interfejs do zarządzania kluczami OpenPGP
145 mv -f comm-1.9.1 mozilla
148 %{?with_enigmail:tar xvfz %{SOURCE1} -C mailnews/extensions}
151 %{?with_enigmail:%patch1 -p1}
163 export CFLAGS="%{rpmcflags} `%{_bindir}/pkg-config mozilla-nspr --cflags-only-I`"
164 export CXXFLAGS="%{rpmcflags} `%{_bindir}/pkg-config mozilla-nspr --cflags-only-I`"
166 cp -f %{_datadir}/automake/config.* mozilla/build/autoconf
167 cp -f %{_datadir}/automake/config.* mozilla/nsprpub/build/autoconf
168 cp -f %{_datadir}/automake/config.* directory/c-sdk/config/autoconf
170 cat << 'EOF' > .mozconfig
171 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu}
173 # Options for 'configure' (same as command-line options).
174 ac_add_options --prefix=%{_prefix}
175 ac_add_options --exec-prefix=%{_exec_prefix}
176 ac_add_options --bindir=%{_bindir}
177 ac_add_options --sbindir=%{_sbindir}
178 ac_add_options --sysconfdir=%{_sysconfdir}
179 ac_add_options --datadir=%{_datadir}
180 ac_add_options --includedir=%{_includedir}
181 ac_add_options --libdir=%{_libdir}
182 ac_add_options --libexecdir=%{_libexecdir}
183 ac_add_options --localstatedir=%{_localstatedir}
184 ac_add_options --sharedstatedir=%{_sharedstatedir}
185 ac_add_options --mandir=%{_mandir}
186 ac_add_options --infodir=%{_infodir}
188 ac_add_options --disable-optimize
189 ac_add_options --enable-debug
190 ac_add_options --enable-debug-modules
191 ac_add_options --enable-debugger-info-modules
192 ac_add_options --enable-crash-on-assert
194 ac_add_options --disable-debug
195 ac_add_options --disable-debug-modules
196 ac_add_options --disable-logging
197 ac_add_options --enable-optimize="%{rpmcflags} -Os"
200 ac_add_options --enable-tests
202 ac_add_options --disable-tests
205 ac_add_options --enable-gnomeui
207 ac_add_options --disable-gnomeui
210 ac_add_options --enable-gnomevfs
212 ac_add_options --disable-gnomevfs
215 ac_add_options --enable-ldap
217 ac_add_options --disable-ldap
219 ac_add_options --disable-crashreporter
220 ac_add_options --disable-updater
221 ac_add_options --disable-xterm-updates
222 ac_add_options --enable-ldap
223 ac_add_options --enable-postscript
224 ac_add_options --enable-startup-notification
225 %if %{with lightning}
226 ac_add_options --enable-calendar
228 ac_add_options --disable-calendar
230 ac_add_options --disable-installer
231 ac_add_options --disable-jsd
232 ac_add_options --disable-xprint
233 ac_add_options --disable-permissions
234 ac_add_options --disable-pref-extensions
235 ac_add_options --enable-canvas
236 ac_add_options --enable-crypto
237 ac_add_options --enable-default-toolkit="gtk2"
238 ac_add_options --enable-mathml
239 ac_add_options --enable-optimize="%{rpmcflags}"
240 ac_add_options --enable-pango
241 ac_add_options --enable-reorder
242 ac_add_options --enable-static
243 ac_add_options --disable-strip
244 ac_add_options --disable-strip-libs
245 ac_add_options --enable-system-cairo
246 ac_add_options --enable-system-hunspell
247 ac_add_options --enable-svg
248 ac_add_options --enable-xft
249 ac_add_options --enable-application=mail
250 ac_add_options --enable-default-toolkit=cairo-gtk2
251 ac_add_options --enable-xinerama
252 ac_add_options --with-system-jpeg
253 ac_add_options --with-system-nspr
254 ac_add_options --with-system-nss
255 ac_add_options --with-system-png
256 ac_add_options --with-system-zlib
257 ac_add_options --with-pthreads
258 ac_add_options --enable-single-profile
259 ac_add_options --disable-profilesharing
260 ac_add_options --with-distribution-id=org.pld-linux
261 ac_add_options --with-branding=icedove/branding
262 ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
265 %{__make} -j1 -f client.mk build \
271 cd mailnews/extensions/enigmail
273 %{__make} -C ../../../obj-%{_target_cpu}/mailnews/extensions/enigmail \
280 rm -rf $RPM_BUILD_ROOT
281 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_pixmapsdir},%{_desktopdir}} \
282 $RPM_BUILD_ROOT%{_datadir}/%{name}
283 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}
286 %{__make} -C obj-%{_target_cpu}/mail/installer stage-package \
287 DESTDIR=$RPM_BUILD_ROOT \
288 MOZ_PKG_APPDIR=%{_libdir}/%{name} \
291 # move arch independant ones to datadir
292 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome
293 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults
294 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs $RPM_BUILD_ROOT%{_datadir}/%{name}/greprefs
295 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/isp $RPM_BUILD_ROOT%{_datadir}/%{name}/isp
296 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/res $RPM_BUILD_ROOT%{_datadir}/%{name}/res
297 ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome
298 ln -s ../../share/%{name}/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults
299 ln -s ../../share/%{name}/greprefs $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs
300 ln -s ../../share/%{name}/isp $RPM_BUILD_ROOT%{_libdir}/%{name}/isp
301 ln -s ../../share/%{name}/res $RPM_BUILD_ROOT%{_libdir}/%{name}/res
303 rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
304 ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
306 %{__sed} -e 's,@LIBDIR@,%{_libdir},' %{SOURCE5} > $RPM_BUILD_ROOT%{_bindir}/icedove
307 ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/thunderbird
308 ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/mozilla-thunderbird
310 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
313 _enig_dir=$RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/\{847b3a00-7ab1-11d4-8f02-006008948af5\}
314 install -d $_enig_dir/chrome
315 install -d $_enig_dir/components
316 install -d $_enig_dir/defaults/preferences
317 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome/enigmail.jar $_enig_dir/chrome
318 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/components/enig* $_enig_dir/components
319 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/components/libenigmime.so $_enig_dir/components
320 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/components/ipc.xpt $_enig_dir/components
321 mv -f $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults/preferences/enigmail.js $_enig_dir/defaults/preferences
322 cp -f mailnews/extensions/enigmail/package/install.rdf $_enig_dir
323 rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults/preferences
324 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome/enigmail-en-US.jar
325 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome/enigmail-skin.jar
326 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome/enigmime.jar
327 rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/components/enig*
328 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/components/libenigmime.so
329 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/components/ipc.xpt
330 cp -f %{SOURCE6} $_enig_dir/chrome.manifest
331 cp -f icedove/branding/content/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/icedove.png
335 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/dirver
338 rm -rf $RPM_BUILD_ROOT
341 if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
342 mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
344 for d in chrome defaults greprefs icons isp res; do
345 if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then
346 install -d %{_datadir}/%{name}
347 mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d
353 %defattr(644,root,root,755)
354 %attr(755,root,root) %{_bindir}/icedove
355 %attr(755,root,root) %{_bindir}/mozilla-thunderbird
356 %attr(755,root,root) %{_bindir}/thunderbird
357 %dir %{_libdir}/%{name}
358 %{_libdir}/%{name}/*.ini
359 %dir %{_libdir}/%{name}/components
360 %attr(755,root,root) %{_libdir}/%{name}/components/*.so
361 %{_libdir}/%{name}/components/*.js
362 %{_libdir}/%{name}/components/*.xpt
363 %attr(755,root,root) %{_libdir}/%{name}/*.so
364 %attr(755,root,root) %{_libdir}/%{name}/*.sh
365 %attr(755,root,root) %{_libdir}/%{name}/*-bin
366 %attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client
367 %attr(755,root,root) %{_libdir}/%{name}/icedove
370 %{_libdir}/%{name}/chrome
371 %{_libdir}/%{name}/defaults
372 %{_libdir}/%{name}/dictionaries
373 %{_libdir}/%{name}/greprefs
374 %{_libdir}/%{name}/isp
375 %{_libdir}/%{name}/res
377 %{_libdir}/%{name}/dependentlibs.list
379 %{_desktopdir}/*.desktop
381 %dir %{_datadir}/%{name}
382 %{_datadir}/%{name}/chrome
383 %{_datadir}/%{name}/defaults
384 %{_datadir}/%{name}/greprefs
385 %{_datadir}/%{name}/isp
386 %{_datadir}/%{name}/res
388 %dir %{_libdir}/%{name}/modules
389 %{_libdir}/%{name}/modules/*.js*
390 %dir %{_libdir}/%{name}/modules/activity
391 %{_libdir}/%{name}/modules/activity/*.js
392 %dir %{_libdir}/%{name}/modules/gloda
393 %{_libdir}/%{name}/modules/gloda/*.js
395 %dir %{_libdir}/%{name}/extensions
396 %{_libdir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
398 %if %{with lightning}
399 %files addon-lightning
400 %defattr(644,root,root,755)
401 %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}
402 %{_libdir}/%{name}/extensions/calendar-timezones@mozilla.org
406 %files addon-enigmail
407 %defattr(644,root,root,755)
408 %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}