2 # - separate spec for enigmail
3 # - fix icedove (building) and installing nss/nspr libs!
4 # - build with system mozldap
5 # - about dialog broken:
6 #XML Parsing Error: undefined entity
7 #Location: chrome://messenger/content/aboutDialog.xul
8 #Line Number 27, Column 37: <description id="copyright">&logoTrademark;</description>
9 #------------------------------------^
12 %bcond_without enigmail # don't build enigmail - GPG/PGP support
13 %bcond_without gnomeui # disable gnomeui support
14 %bcond_without gnomevfs # disable GNOME comp. (gconf+libgnome+gnomevfs) and gnomevfs ext.
15 %bcond_without gnome # disable all GNOME components (gnome+gnomeui+gnomevfs)
16 %bcond_without ldap # disable e-mail address lookups in LDAP directories
17 %bcond_without lightning # disable sunbird calendar
18 %bcond_with xulrunner # build with xulrunner
19 %bcond_with crashreporter # report crashes to crash-stats.mozilla.com
22 %undefine with_gnomeui
23 %undefine with_gnomevfs
26 %if %{?_enable_debug_packages} != 1
27 %undefine crashreporter
30 %define enigmail_ver 1.1.2
32 %if %{without xulrunner}
33 # The actual sqlite version (see RHBZ#480989):
34 %define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR)
37 Summary: Icedove - email client
38 Summary(pl.UTF-8): Icedove - klient poczty
42 License: MPL 1.1 or GPL v2+ or LGPL v2.1+
43 Group: X11/Applications/Networking
44 Source0: http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/thunderbird-%{version}.source.tar.bz2
45 # Source0-md5: 48e80576a7af70e64d30a5162364525a
46 Source1: http://www.mozilla-enigmail.org/download/source/enigmail-%{enigmail_ver}.tar.gz
47 # Source1-md5: 7d329d5e8afbbb28214ca1995beb09c9
48 Source2: %{name}-branding.tar.bz2
49 # Source2-md5: 85fdf877e2f1bc41329d8086ef5cf0f1
50 Source3: %{name}-rm_nonfree.sh
51 Source4: %{name}.desktop
53 Patch0: %{name}-branding.patch
54 Patch1: %{name}-enigmail-shared.patch
55 Patch2: %{name}-gcc.patch
56 Patch3: %{name}-fonts.patch
57 Patch4: %{name}-install.patch
58 Patch5: %{name}-hunspell.patch
59 Patch6: %{name}-prefs.patch
60 Patch7: system-mozldap.patch
61 Patch8: %{name}-makefile.patch
62 Patch9: %{name}-libpng.patch
63 Patch10: %{name}-extensiondir.patch
64 Patch11: crashreporter.patch
65 URL: http://www.pld-linux.org/Packages/Icedove
66 %{?with_gnomevfs:BuildRequires: GConf2-devel >= 1.2.1}
67 BuildRequires: alsa-lib-devel
68 BuildRequires: automake
69 BuildRequires: bzip2-devel
70 BuildRequires: freetype-devel >= 1:2.1.8
71 %{?with_gnomevfs:BuildRequires: gnome-vfs2-devel >= 2.0}
72 BuildRequires: gtk+2-devel >= 1:2.0.0
73 BuildRequires: hunspell-devel
74 BuildRequires: libIDL-devel >= 0.8.0
75 %{?with_gnomevfs:BuildRequires: libgnome-devel >= 2.0}
76 %{?with_gnomeui:BuildRequires: libgnome-keyring-devel}
77 %{?with_gnomeui:BuildRequires: libgnomeui-devel >= 2.2.0}
78 BuildRequires: libiw-devel
79 BuildRequires: libjpeg-devel >= 6b
80 BuildRequires: libnotify-devel >= 0.4
81 BuildRequires: libpng-devel >= 1.2.0
82 BuildRequires: libstdc++-devel
83 BuildRequires: nspr-devel >= 1:4.8
84 BuildRequires: nss-devel >= 1:3.12.0
85 BuildRequires: pango-devel >= 1:1.1.0
86 BuildRequires: pkgconfig
87 BuildRequires: sed >= 4.0
88 BuildRequires: sqlite3-devel >= 3.6.22
89 BuildRequires: startup-notification-devel >= 0.8
90 BuildRequires: xorg-lib-libXext-devel
91 BuildRequires: xorg-lib-libXinerama-devel
92 BuildRequires: xorg-lib-libXt-devel
96 Requires: myspell-common
97 Requires: nspr >= 1:4.6.1
98 Requires: nss >= 1:3.11.3
99 Requires: sqlite3 >= %{sqlite_build_version}
101 Obsoletes: mozilla-thunderbird
102 Obsoletes: mozilla-thunderbird-dictionary-en-US
103 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
105 %define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+
107 # iceweasel/icedove/iceape provide their own versions
108 %define _noautoreqdep libgfxpsshar.so libgkgfx.so libgtkxtbin.so libjsj.so libxpcom_compat.so libxpcom_core.so libxpistub.so
109 %define _noautoprovfiles %{_libdir}/%{name}/components
110 # we don't want these to satisfy xulrunner-devel
111 %define _noautoprov libgtkembedmoz.so libmozjs.so libxpcom.so libxul.so
112 # and as we don't provide them, don't require either
113 %define _noautoreq libgtkembedmoz.so libmozjs.so libxpcom.so libxul.so
115 %define topdir %{_builddir}/%{name}-%{version}
116 %define objdir %{topdir}/obj-%{_target_cpu}
119 Icedove is an open-source,fast and portable email client.
121 %description -l pl.UTF-8
122 Icedove jest open sourcowym, szybkim i przenośnym klientem poczty.
124 %package addon-lightning
125 Summary: An integrated calendar for Icedove
126 Summary(pl.UTF-8): Zintegrowany kalendarz dla Icedove
127 License: MPL 1.1 or GPL v2+ or LGPL v2.1+
128 Group: Applications/Networking
129 Requires: %{name} = %{version}-%{release}
131 %description addon-lightning
132 Lightning is an calendar extension to Icedove email client.
134 %description addon-lightning -l pl.UTF-8
135 Lightning to rozszerzenie do klienta poczty Icedove dodające
136 funkcjonalność kalendarza.
138 %package addon-enigmail
139 Summary: Extension for the authentication and encryption features provided by GnuPG
140 Summary(pl.UTF-8): Rozszerzenie do uwierzytelniania i szyfrowania zapewnianego przez GnuPG
142 Group: Applications/Networking
143 URL: http://enigmail.mozdev.org/
144 Requires: %{name} = %{version}-%{release}
146 Obsoletes: mozilla-thunderbird-addon-enigmail
148 %description addon-enigmail
149 Enigmail is an extension to the Icedove mail client which allows users
150 to access the authentication and encryption features provided by
154 - Encrypt/sign mail when sending, decrypt/authenticate received mail
155 - Support for inline-PGP (RFC 2440) and PGP/MIME (RFC 3156)
156 - Per-Account based encryption and signing defaults
157 - Per-Recipient rules for automated key selection, and
158 enabling/disabling encryption and signing
159 - OpenPGP key management interface
161 %description addon-enigmail -l pl.UTF-8
162 Enigmail to rozszerzenie klienta pocztowego Icedove pozwalające
163 użytkownikom na dostęp do uwierzytelniania i szyfrowania zapewnianego
167 - szyfrowanie/podpisywanie poczty przy wysyłaniu,
168 odszyfrowywanie/uwierzytelnianie poczty odebranej
169 - obsługa inline-PGP (RFC 2440) i PGP/MIME (RFC 3156)
170 - ustawienia domyślne szyfrowania i podpisywania dla każdego konta
171 - reguły automatycznego wyboru kluczy i włączenia szyfrowania oraz
172 podpisywania dla każdego adresata
173 - interfejs do zarządzania kluczami OpenPGP
177 mv -f comm-1.9.2 mozilla
180 %{?with_enigmail:tar xvfz %{SOURCE1} -C mailnews/extensions}
183 %{?with_enigmail:%patch1 -p1}
197 cp -f %{_datadir}/automake/config.* mozilla/build/autoconf
198 cp -f %{_datadir}/automake/config.* mozilla/nsprpub/build/autoconf
199 cp -f %{_datadir}/automake/config.* directory/c-sdk/config/autoconf
201 install -d libxul-sdk
202 ln -snf %{_libdir}/xulrunner-sdk libxul-sdk/sdk
204 cat << EOF > .mozconfig
205 mk_add_options MOZ_OBJDIR=%{objdir}
207 export CFLAGS="%{rpmcflags}"
208 export CXXFLAGS="%{rpmcflags}"
210 %if %{with crashreporter}
211 export MOZ_DEBUG_SYMBOLS=1
214 # Options for 'configure' (same as command-line options).
215 ac_add_options --prefix=%{_prefix}
216 ac_add_options --exec-prefix=%{_exec_prefix}
217 ac_add_options --bindir=%{_bindir}
218 ac_add_options --sbindir=%{_sbindir}
219 ac_add_options --sysconfdir=%{_sysconfdir}
220 ac_add_options --datadir=%{_datadir}
221 ac_add_options --includedir=%{_includedir}
222 ac_add_options --libdir=%{_libdir}
223 ac_add_options --libexecdir=%{_libexecdir}
224 ac_add_options --localstatedir=%{_localstatedir}
225 ac_add_options --sharedstatedir=%{_sharedstatedir}
226 ac_add_options --mandir=%{_mandir}
227 ac_add_options --infodir=%{_infodir}
229 ac_add_options --disable-optimize
230 ac_add_options --enable-debug
231 ac_add_options --enable-debug-modules
232 ac_add_options --enable-debugger-info-modules
233 ac_add_options --enable-crash-on-assert
235 ac_add_options --disable-debug
236 ac_add_options --disable-debug-modules
237 ac_add_options --disable-logging
238 ac_add_options --enable-optimize="%{rpmcflags} -Os"
240 ac_add_options --disable-strip
241 ac_add_options --disable-strip-libs
243 ac_add_options --enable-tests
245 ac_add_options --disable-tests
248 ac_add_options --enable-gnomeui
250 ac_add_options --disable-gnomeui
253 ac_add_options --enable-gnomevfs
255 ac_add_options --disable-gnomevfs
258 ac_add_options --enable-ldap
259 ac_add_options --with-system-ldap
261 ac_add_options --disable-ldap
263 %if %{with crashreporter}
264 ac_add_options --enable-crashreporter
266 ac_add_options --disable-crashreporter
268 ac_add_options --disable-xterm-updates
269 ac_add_options --enable-postscript
270 %if %{with lightning}
271 ac_add_options --enable-calendar
273 ac_add_options --disable-calendar
275 ac_add_options --disable-installer
276 ac_add_options --disable-jsd
277 ac_add_options --disable-updater
278 ac_add_options --disable-xprint
279 ac_add_options --disable-permissions
280 ac_add_options --disable-pref-extensions
281 ac_add_options --enable-canvas
282 ac_add_options --enable-crypto
283 ac_add_options --enable-mathml
284 ac_add_options --enable-pango
285 ac_add_options --enable-reorder
286 ac_add_options --enable-startup-notification
287 ac_add_options --enable-svg
288 ac_add_options --enable-system-cairo
289 ac_add_options --enable-system-hunspell
290 ac_add_options --enable-system-sqlite
291 ac_add_options --enable-xft
292 ac_add_options --enable-application=mail
293 ac_add_options --enable-default-toolkit=cairo-gtk2
294 ac_add_options --enable-xinerama
295 ac_add_options --with-distribution-id=org.pld-linux
296 ac_add_options --with-branding=icedove/branding
297 %if %{with xulrunner}
298 ac_add_options --with-libxul-sdk=$(pwd)/libxul-sdk
299 ac_add_options --enable-shared
301 ac_add_options --enable-static
303 ac_add_options --with-pthreads
304 ac_add_options --with-system-bz2
305 ac_add_options --with-system-jpeg
306 ac_add_options --with-system-nspr
307 ac_add_options --with-system-nss
308 ac_add_options --with-system-png
309 ac_add_options --with-system-zlib
310 ac_add_options --enable-single-profile
311 ac_add_options --disable-profilesharing
312 ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
315 %{__make} -j1 -f client.mk build \
317 MOZ_MAKE_FLAGS="%{?_smp_mflags}" \
321 %if %{with crashreporter}
322 # create debuginfo for crash-stats.mozilla.com
323 %{__make} -j1 -C obj-%{_target_cpu} buildsymbols
327 cd mailnews/extensions/enigmail
328 ./makemake -r -o %{objdir}
329 %{__make} -C %{objdir}/mailnews/extensions/enigmail \
336 rm -rf $RPM_BUILD_ROOT
337 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name},%{_datadir}/%{name},%{_pixmapsdir},%{_desktopdir}}
340 %{__make} -C mail/installer stage-package \
341 DESTDIR=$RPM_BUILD_ROOT \
342 MOZ_PKG_APPDIR=%{_libdir}/%{name} \
345 # Enable crash reporter for Firefox application
346 %if %{with crashreporter}
347 %{__sed} -i -e 's/\[Crash Reporter\]/[Crash Reporter]\nEnabled=1/' $RPM_BUILD_ROOT%{_libdir}/%{name}/application.ini
349 # Add debuginfo for crash-stats.mozilla.com
350 install -d $RPM_BUILD_ROOT%{_exec_prefix}/lib/debug%{_libdir}/%{name}
351 cp -a mozilla/dist/%{name}-%{version}.en-US.linux-*.crashreporter-symbols.zip $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/%{name}
354 # copy manually lightning files, somewhy they are not installed by make
355 cp -a mozilla/dist/bin/extensions/calendar-timezones@mozilla.org \
356 mozilla/dist/bin/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103} \
357 $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions
359 # move arch independant ones to datadir
360 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome
361 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults
362 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs $RPM_BUILD_ROOT%{_datadir}/%{name}/greprefs
363 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/isp $RPM_BUILD_ROOT%{_datadir}/%{name}/isp
364 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/modules $RPM_BUILD_ROOT%{_datadir}/%{name}/modules
365 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/res $RPM_BUILD_ROOT%{_datadir}/%{name}/res
366 ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome
367 ln -s ../../share/%{name}/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults
368 ln -s ../../share/%{name}/greprefs $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs
369 ln -s ../../share/%{name}/isp $RPM_BUILD_ROOT%{_libdir}/%{name}/isp
370 ln -s ../../share/%{name}/modules $RPM_BUILD_ROOT%{_libdir}/%{name}/modules
371 ln -s ../../share/%{name}/res $RPM_BUILD_ROOT%{_libdir}/%{name}/res
373 rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
374 ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
376 %{__sed} -e 's,@LIBDIR@,%{_libdir},' %{SOURCE5} > $RPM_BUILD_ROOT%{_bindir}/icedove
377 ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/thunderbird
378 ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/mozilla-thunderbird
380 cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
381 cp -a %{topdir}/mozilla/icedove/branding/content/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
383 # files created by regxpcom -register
384 touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat
385 touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat
388 ext_dir=$RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/\{847b3a00-7ab1-11d4-8f02-006008948af5\}
389 install -d $ext_dir/{chrome,components,defaults/preferences}
391 cp -rfLp chrome/enigmail.jar $ext_dir/chrome
392 cp -rfLp chrome/enigmime.jar $ext_dir/chrome
393 cp -rfLp components/enig* $ext_dir/components
394 cp -rfLp components/libenigmime.so $ext_dir/components
395 cp -rfLp components/libipc.so $ext_dir/components
396 cp -rfLp components/ipc.xpt $ext_dir/components
397 cp -rfLp defaults/preferences/enigmail.js $ext_dir/defaults/preferences
399 cp -a %{topdir}/mozilla/mailnews/extensions/enigmail/package/install.rdf $ext_dir
400 cp -a %{topdir}/mozilla/mailnews/extensions/enigmail/package/chrome.manifest $ext_dir/chrome.manifest
403 # remove unecessary stuff
404 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/README.txt
405 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/components/components.list
406 rm $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/components.list
408 # never package these
410 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{freebl3,nss3,nssckbi,nssdbm3,nssutil3,smime3,softokn3,ssl3}.*
412 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{nspr4,plc4,plds4}.so
414 rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{ldap,ldif,prldap,ssldap}60.so
417 rm -rf $RPM_BUILD_ROOT
420 if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
421 mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
423 for d in chrome defaults greprefs icons isp modules res; do
424 if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then
425 install -d %{_datadir}/%{name}
426 mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d
432 %defattr(644,root,root,755)
433 %attr(755,root,root) %{_bindir}/icedove
434 %attr(755,root,root) %{_bindir}/mozilla-thunderbird
435 %attr(755,root,root) %{_bindir}/thunderbird
436 %dir %{_libdir}/%{name}
437 %{_libdir}/%{name}/application.ini
438 %{_libdir}/%{name}/platform.ini
439 %dir %{_libdir}/%{name}/components
440 %attr(755,root,root) %{_libdir}/%{name}/components/*.so
441 %{_libdir}/%{name}/components/*.js
442 %{_libdir}/%{name}/components/*.xpt
443 %attr(755,root,root) %{_libdir}/%{name}/libmozjs.so
444 %attr(755,root,root) %{_libdir}/%{name}/libxpcom.so
445 %attr(755,root,root) %{_libdir}/%{name}/libxpcom_core.so
446 %attr(755,root,root) %{_libdir}/%{name}/*.sh
447 %attr(755,root,root) %{_libdir}/%{name}/*-bin
448 %attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client
449 %attr(755,root,root) %{_libdir}/%{name}/icedove
452 %{_libdir}/%{name}/chrome
453 %{_libdir}/%{name}/defaults
454 %{_libdir}/%{name}/dictionaries
455 %{_libdir}/%{name}/greprefs
456 %{_libdir}/%{name}/isp
457 %{_libdir}/%{name}/modules
458 %{_libdir}/%{name}/res
461 %{_desktopdir}/*.desktop
463 %dir %{_datadir}/%{name}
464 %{_datadir}/%{name}/chrome
465 %{_datadir}/%{name}/defaults
466 %{_datadir}/%{name}/greprefs
467 %{_datadir}/%{name}/isp
468 %{_datadir}/%{name}/modules
469 %{_datadir}/%{name}/res
471 %if %{with crashreporter}
472 %attr(755,root,root) %{_libdir}/%{name}/crashreporter
473 %{_libdir}/%{name}/crashreporter.ini
474 %{_libdir}/%{name}/Throbber-small.gif
477 %dir %{_libdir}/%{name}/extensions
478 %{_libdir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
480 # files created by regxpcom -register
481 %ghost %{_libdir}/%{name}/components/compreg.dat
482 %ghost %{_libdir}/%{name}/components/xpti.dat
484 %if %{with lightning}
485 %files addon-lightning
486 %defattr(644,root,root,755)
487 %dir %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}
488 %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/defaults
489 %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome
490 %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome.manifest
491 %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/install.rdf
492 %dir %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components
493 %attr(755,root,root) %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.so
494 %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.xpt
495 %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.js
496 %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules
497 %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js
498 %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/timezones.sqlite
500 %{_libdir}/%{name}/extensions/calendar-timezones@mozilla.org
504 %files addon-enigmail
505 %defattr(644,root,root,755)
506 %dir %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}
507 %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/defaults
508 %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/chrome
509 %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/chrome.manifest
510 %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/install.rdf
511 %dir %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components
512 %attr(755,root,root) %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components/*.so
513 %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components/*.xpt
514 %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components/*.js