]> git.pld-linux.org Git - packages/thunderbird.git/blame_incremental - icedove.spec
- fix crashreporter build
[packages/thunderbird.git] / icedove.spec
... / ...
CommitLineData
1# TODO:
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#------------------------------------^
10#
11# Conditional builds
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 system xulrunner
19
20%if %{without gnome}
21%undefine with_gnomeui
22%undefine with_gnomevfs
23%endif
24
25%define enigmail_ver 1.1.2
26
27%if %{without xulrunner}
28# The actual sqlite version (see RHBZ#480989):
29%define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR)
30%endif
31
32Summary: Icedove - email client
33Summary(pl.UTF-8): Icedove - klient poczty
34Name: icedove
35Version: 3.1.2
36Release: 0.8
37License: MPL 1.1 or GPL v2+ or LGPL v2.1+
38Group: X11/Applications/Networking
39Source0: http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/thunderbird-%{version}.source.tar.bz2
40# Source0-md5: 48e80576a7af70e64d30a5162364525a
41Source1: http://www.mozilla-enigmail.org/download/source/enigmail-%{enigmail_ver}.tar.gz
42# Source1-md5: 7d329d5e8afbbb28214ca1995beb09c9
43Source2: %{name}-branding.tar.bz2
44# Source2-md5: 2da351522bdd7f4a3bd8aaff4c776976
45Source3: %{name}-rm_nonfree.sh
46Source4: %{name}.desktop
47Source5: %{name}.sh
48Patch0: %{name}-branding.patch
49Patch1: %{name}-enigmail-shared.patch
50Patch2: %{name}-gcc.patch
51Patch3: %{name}-fonts.patch
52Patch4: %{name}-install.patch
53Patch5: %{name}-hunspell.patch
54Patch6: %{name}-prefs.patch
55Patch7: system-mozldap.patch
56Patch8: %{name}-makefile.patch
57Patch9: %{name}-libpng.patch
58Patch10: %{name}-extensiondir.patch
59URL: http://www.pld-linux.org/Packages/Icedove
60%{?with_gnomevfs:BuildRequires: GConf2-devel >= 1.2.1}
61BuildRequires: automake
62BuildRequires: freetype-devel >= 1:2.1.8
63%{?with_gnomevfs:BuildRequires: gnome-vfs2-devel >= 2.0}
64BuildRequires: gtk+2-devel >= 1:2.0.0
65BuildRequires: hunspell-devel
66BuildRequires: libIDL-devel >= 0.8.0
67%{?with_gnomevfs:BuildRequires: libgnome-devel >= 2.0}
68%{?with_gnomeui:BuildRequires: libgnomeui-devel >= 2.2.0}
69BuildRequires: libjpeg-devel >= 6b
70BuildRequires: libpng-devel >= 1.2.0
71BuildRequires: libstdc++-devel
72BuildRequires: nspr-devel >= 1:4.8
73BuildRequires: nss-devel >= 1:3.12.0
74BuildRequires: pango-devel >= 1:1.1.0
75BuildRequires: pkgconfig
76BuildRequires: sed >= 4.0
77BuildRequires: sqlite3-devel >= 3.6.22
78BuildRequires: startup-notification-devel >= 0.8
79BuildRequires: xorg-lib-libXext-devel
80BuildRequires: xorg-lib-libXinerama-devel
81BuildRequires: xorg-lib-libXt-devel
82BuildRequires: zip
83%if %{with xulrunner}
84%else
85Requires: myspell-common
86Requires: nspr >= 1:4.6.1
87Requires: nss >= 1:3.11.3
88Requires: sqlite3 >= %{sqlite_build_version}
89%endif
90Obsoletes: mozilla-thunderbird
91Obsoletes: mozilla-thunderbird-dictionary-en-US
92BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
93
94%define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+
95
96# iceweasel/icedove/iceape provide their own versions
97%define _noautoreqdep libgfxpsshar.so libgkgfx.so libgtkxtbin.so libjsj.so libxpcom_compat.so libxpcom_core.so libxpistub.so
98%define _noautoprovfiles %{_libdir}/%{name}/components
99# we don't want these to satisfy xulrunner-devel
100%define _noautoprov libgtkembedmoz.so libmozjs.so libxpcom.so libxul.so
101# and as we don't provide them, don't require either
102%define _noautoreq libgtkembedmoz.so libmozjs.so libxpcom.so libxul.so
103
104%description
105Icedove is an open-source,fast and portable email client.
106
107%description -l pl.UTF-8
108Icedove jest open sourcowym, szybkim i przenośnym klientem poczty.
109
110%package addon-lightning
111Summary: An integrated calendar for Icedove
112Summary(pl.UTF-8): Zintegrowany kalendarz dla Icedove
113License: MPL 1.1 or GPL v2+ or LGPL v2.1+
114Group: Applications/Networking
115Requires: %{name} = %{version}-%{release}
116
117%description addon-lightning
118Lightning is an calendar extension to Icedove email client.
119
120%description addon-lightning -l pl.UTF-8
121Lightning to rozszerzenie do klienta poczty Icedove dodające
122funkcjonalność kalendarza.
123
124%package addon-enigmail
125Summary: Extension for the authentication and encryption features provided by GnuPG
126Summary(pl.UTF-8): Rozszerzenie do uwierzytelniania i szyfrowania zapewnianego przez GnuPG
127License: MPL/LGPL
128Group: Applications/Networking
129URL: http://enigmail.mozdev.org/
130Requires: %{name} = %{version}-%{release}
131Requires: gnupg
132Obsoletes: mozilla-thunderbird-addon-enigmail
133
134%description addon-enigmail
135Enigmail is an extension to the Icedove mail client which allows users
136to access the authentication and encryption features provided by
137GnuPG.
138
139Main Features:
140- Encrypt/sign mail when sending, decrypt/authenticate received mail
141- Support for inline-PGP (RFC 2440) and PGP/MIME (RFC 3156)
142- Per-Account based encryption and signing defaults
143- Per-Recipient rules for automated key selection, and
144 enabling/disabling encryption and signing
145- OpenPGP key management interface
146
147%description addon-enigmail -l pl.UTF-8
148Enigmail to rozszerzenie klienta pocztowego Icedove pozwalające
149użytkownikom na dostęp do uwierzytelniania i szyfrowania zapewnianego
150przez GnuPG.
151
152Główne możliwości:
153- szyfrowanie/podpisywanie poczty przy wysyłaniu,
154 odszyfrowywanie/uwierzytelnianie poczty odebranej
155- obsługa inline-PGP (RFC 2440) i PGP/MIME (RFC 3156)
156- ustawienia domyślne szyfrowania i podpisywania dla każdego konta
157- reguły automatycznego wyboru kluczy i włączenia szyfrowania oraz
158 podpisywania dla każdego adresata
159- interfejs do zarządzania kluczami OpenPGP
160
161%prep
162%setup -qc
163mv -f comm-1.9.2 mozilla
164%setup -q -T -D -a2
165cd mozilla
166%{?with_enigmail:tar xvfz %{SOURCE1} -C mailnews/extensions}
167/bin/sh %{SOURCE3}
168%patch0 -p1
169%{?with_enigmail:%patch1 -p1}
170%patch2 -p1
171%patch3 -p1
172%patch4 -p1
173%patch5 -p1
174%patch6 -p1
175%patch7 -p1
176%patch8 -p0
177%patch9 -p0
178%patch10 -p2
179
180%build
181cd mozilla
182export CFLAGS="%{rpmcflags} `%{_bindir}/pkg-config mozilla-nspr --cflags-only-I`"
183export CXXFLAGS="%{rpmcflags} `%{_bindir}/pkg-config mozilla-nspr --cflags-only-I`"
184
185cp -f %{_datadir}/automake/config.* mozilla/build/autoconf
186cp -f %{_datadir}/automake/config.* mozilla/nsprpub/build/autoconf
187cp -f %{_datadir}/automake/config.* directory/c-sdk/config/autoconf
188
189install -d libxul-sdk
190ln -snf %{_libdir}/xulrunner-sdk libxul-sdk/sdk
191
192cat << EOF > .mozconfig
193mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-%{_target_cpu}
194
195# Options for 'configure' (same as command-line options).
196ac_add_options --prefix=%{_prefix}
197ac_add_options --exec-prefix=%{_exec_prefix}
198ac_add_options --bindir=%{_bindir}
199ac_add_options --sbindir=%{_sbindir}
200ac_add_options --sysconfdir=%{_sysconfdir}
201ac_add_options --datadir=%{_datadir}
202ac_add_options --includedir=%{_includedir}
203ac_add_options --libdir=%{_libdir}
204ac_add_options --libexecdir=%{_libexecdir}
205ac_add_options --localstatedir=%{_localstatedir}
206ac_add_options --sharedstatedir=%{_sharedstatedir}
207ac_add_options --mandir=%{_mandir}
208ac_add_options --infodir=%{_infodir}
209%if %{?debug:1}0
210ac_add_options --disable-optimize
211ac_add_options --enable-debug
212ac_add_options --enable-debug-modules
213ac_add_options --enable-debugger-info-modules
214ac_add_options --enable-crash-on-assert
215%else
216ac_add_options --disable-debug
217ac_add_options --disable-debug-modules
218ac_add_options --disable-logging
219ac_add_options --enable-optimize="%{rpmcflags} -Os"
220%endif
221ac_add_options --disable-strip
222ac_add_options --disable-strip-libs
223%if %{with tests}
224ac_add_options --enable-tests
225%else
226ac_add_options --disable-tests
227%endif
228%if %{with gnomeui}
229ac_add_options --enable-gnomeui
230%else
231ac_add_options --disable-gnomeui
232%endif
233%if %{with gnomevfs}
234ac_add_options --enable-gnomevfs
235%else
236ac_add_options --disable-gnomevfs
237%endif
238%if %{with ldap}
239ac_add_options --enable-ldap
240ac_add_options --with-system-ldap
241%else
242ac_add_options --disable-ldap
243%endif
244ac_add_options --disable-crashreporter
245ac_add_options --disable-xterm-updates
246ac_add_options --enable-postscript
247%if %{with lightning}
248ac_add_options --enable-calendar
249%else
250ac_add_options --disable-calendar
251%endif
252ac_add_options --disable-installer
253ac_add_options --disable-jsd
254ac_add_options --disable-updater
255ac_add_options --disable-xprint
256ac_add_options --disable-permissions
257ac_add_options --disable-pref-extensions
258ac_add_options --enable-canvas
259ac_add_options --enable-crypto
260ac_add_options --enable-mathml
261ac_add_options --enable-pango
262ac_add_options --enable-reorder
263ac_add_options --enable-startup-notification
264ac_add_options --enable-svg
265ac_add_options --enable-system-cairo
266ac_add_options --enable-system-hunspell
267ac_add_options --enable-system-sqlite
268ac_add_options --enable-xft
269ac_add_options --enable-application=mail
270ac_add_options --enable-default-toolkit=cairo-gtk2
271ac_add_options --enable-xinerama
272ac_add_options --with-distribution-id=org.pld-linux
273ac_add_options --with-branding=icedove/branding
274%if %{with xulrunner}
275ac_add_options --with-libxul-sdk=$(pwd)/libxul-sdk
276ac_add_options --enable-shared
277%else
278ac_add_options --enable-static
279%endif
280ac_add_options --with-pthreads
281ac_add_options --with-system-bz2
282ac_add_options --with-system-jpeg
283ac_add_options --with-system-nspr
284ac_add_options --with-system-nss
285ac_add_options --with-system-png
286ac_add_options --with-system-zlib
287ac_add_options --enable-single-profile
288ac_add_options --disable-profilesharing
289ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
290EOF
291
292%{__make} -j1 -f client.mk build \
293 STRIP="/bin/true" \
294 CC="%{__cc}" \
295 CXX="%{__cxx}"
296
297%if %{with enigmail}
298top=$(pwd)
299cd mailnews/extensions/enigmail
300./makemake -r -o $top/obj-%{_target_cpu}
301%{__make} -C $top/obj-%{_target_cpu}/mailnews/extensions/enigmail \
302 STRIP="/bin/true" \
303 CC="%{__cc}" \
304 CXX="%{__cxx}"
305%endif
306
307%install
308rm -rf $RPM_BUILD_ROOT
309install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_pixmapsdir},%{_desktopdir}} \
310 $RPM_BUILD_ROOT%{_datadir}/%{name}
311install -d $RPM_BUILD_ROOT%{_libdir}/%{name}
312
313cd mozilla/obj-%{_target_cpu}
314%{__make} -C mail/installer stage-package \
315 DESTDIR=$RPM_BUILD_ROOT \
316 MOZ_PKG_APPDIR=%{_libdir}/%{name} \
317 PKG_SKIP_STRIP=1
318
319# copy manually lightning files, somewhy they are not installed by make
320cp -a mozilla/dist/bin/extensions/calendar-timezones@mozilla.org \
321 mozilla/dist/bin/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103} \
322 $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions
323
324# move arch independant ones to datadir
325mv $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome
326mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults
327mv $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs $RPM_BUILD_ROOT%{_datadir}/%{name}/greprefs
328mv $RPM_BUILD_ROOT%{_libdir}/%{name}/isp $RPM_BUILD_ROOT%{_datadir}/%{name}/isp
329mv $RPM_BUILD_ROOT%{_libdir}/%{name}/modules $RPM_BUILD_ROOT%{_datadir}/%{name}/modules
330mv $RPM_BUILD_ROOT%{_libdir}/%{name}/res $RPM_BUILD_ROOT%{_datadir}/%{name}/res
331ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome
332ln -s ../../share/%{name}/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults
333ln -s ../../share/%{name}/greprefs $RPM_BUILD_ROOT%{_libdir}/%{name}/greprefs
334ln -s ../../share/%{name}/isp $RPM_BUILD_ROOT%{_libdir}/%{name}/isp
335ln -s ../../share/%{name}/modules $RPM_BUILD_ROOT%{_libdir}/%{name}/modules
336ln -s ../../share/%{name}/res $RPM_BUILD_ROOT%{_libdir}/%{name}/res
337
338rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
339ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
340
341%{__sed} -e 's,@LIBDIR@,%{_libdir},' %{SOURCE5} > $RPM_BUILD_ROOT%{_bindir}/icedove
342ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/thunderbird
343ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/mozilla-thunderbird
344
345cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
346cp -a ../icedove/branding/content/icon64.png $RPM_BUILD_ROOT%{_pixmapsdir}/icedove.png
347
348# files created by regxpcom -register
349touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat
350touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat
351
352%if %{with enigmail}
353ext_dir=$RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/\{847b3a00-7ab1-11d4-8f02-006008948af5\}
354install -d $ext_dir/{chrome,components,defaults/preferences}
355cd mozilla/dist/bin
356cp -rfLp chrome/enigmail.jar $ext_dir/chrome
357cp -rfLp chrome/enigmime.jar $ext_dir/chrome
358cp -rfLp components/enig* $ext_dir/components
359cp -rfLp components/libenigmime.so $ext_dir/components
360cp -rfLp components/libipc.so $ext_dir/components
361cp -rfLp components/ipc.xpt $ext_dir/components
362cp -rfLp defaults/preferences/enigmail.js $ext_dir/defaults/preferences
363cd -
364cp -a ../mailnews/extensions/enigmail/package/install.rdf $ext_dir
365cp -a ../mailnews/extensions/enigmail/package/chrome.manifest $ext_dir/chrome.manifest
366%endif
367
368# remove unecessary stuff
369rm $RPM_BUILD_ROOT%{_libdir}/%{name}/README.txt
370rm $RPM_BUILD_ROOT%{_libdir}/%{name}/components/components.list
371rm $RPM_BUILD_ROOT%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/components.list
372
373# never package these
374# nss
375rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{freebl3,nss3,nssckbi,nssdbm3,nssutil3,smime3,softokn3,ssl3}.*
376# nspr
377rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{nspr4,plc4,plds4}.so
378# mozldap
379rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{ldap,ldif,prldap,ssldap}60.so
380
381%clean
382rm -rf $RPM_BUILD_ROOT
383
384%pretrans
385if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
386 mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
387fi
388for d in chrome defaults greprefs icons isp modules res; do
389 if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then
390 install -d %{_datadir}/%{name}
391 mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d
392 fi
393done
394exit 0
395
396%files
397%defattr(644,root,root,755)
398%attr(755,root,root) %{_bindir}/icedove
399%attr(755,root,root) %{_bindir}/mozilla-thunderbird
400%attr(755,root,root) %{_bindir}/thunderbird
401%dir %{_libdir}/%{name}
402%{_libdir}/%{name}/*.ini
403%dir %{_libdir}/%{name}/components
404%attr(755,root,root) %{_libdir}/%{name}/components/*.so
405%{_libdir}/%{name}/components/*.js
406%{_libdir}/%{name}/components/*.xpt
407%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so
408%attr(755,root,root) %{_libdir}/%{name}/libxpcom.so
409%attr(755,root,root) %{_libdir}/%{name}/libxpcom_core.so
410%attr(755,root,root) %{_libdir}/%{name}/*.sh
411%attr(755,root,root) %{_libdir}/%{name}/*-bin
412%attr(755,root,root) %{_libdir}/%{name}/mozilla-xremote-client
413%attr(755,root,root) %{_libdir}/%{name}/icedove
414
415# symlinks
416%{_libdir}/%{name}/chrome
417%{_libdir}/%{name}/defaults
418%{_libdir}/%{name}/dictionaries
419%{_libdir}/%{name}/greprefs
420%{_libdir}/%{name}/isp
421%{_libdir}/%{name}/modules
422%{_libdir}/%{name}/res
423
424%{_pixmapsdir}/*.png
425%{_desktopdir}/*.desktop
426
427%dir %{_datadir}/%{name}
428%{_datadir}/%{name}/chrome
429%{_datadir}/%{name}/defaults
430%{_datadir}/%{name}/greprefs
431%{_datadir}/%{name}/isp
432%{_datadir}/%{name}/modules
433%{_datadir}/%{name}/res
434
435%dir %{_libdir}/%{name}/extensions
436%{_libdir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
437
438# files created by regxpcom -register
439%ghost %{_libdir}/%{name}/components/compreg.dat
440%ghost %{_libdir}/%{name}/components/xpti.dat
441
442%if %{with lightning}
443%files addon-lightning
444%defattr(644,root,root,755)
445%dir %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}
446%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/defaults
447%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome
448%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome.manifest
449%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/install.rdf
450%dir %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components
451%attr(755,root,root) %{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.so
452%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.xpt
453%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.js
454%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules
455%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js
456%{_libdir}/%{name}/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/timezones.sqlite
457
458%{_libdir}/%{name}/extensions/calendar-timezones@mozilla.org
459%endif
460
461%if %{with enigmail}
462%files addon-enigmail
463%defattr(644,root,root,755)
464%dir %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}
465%{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/defaults
466%{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/chrome
467%{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/chrome.manifest
468%{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/install.rdf
469%dir %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components
470%attr(755,root,root) %{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components/*.so
471%{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components/*.xpt
472%{_libdir}/%{name}/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}/components/*.js
473%endif
This page took 0.070583 seconds and 4 git commands to generate.