]> git.pld-linux.org Git - packages/thunderbird.git/blame - thunderbird.spec
up to 52.2.1
[packages/thunderbird.git] / thunderbird.spec
CommitLineData
c4ddd260 1# TODO:
283702b9 2# - build with system mozldap
210a9feb 3# - fix startup crash "TypeError: a is null"
c4ddd260 4#
44be9ed4 5# Conditional builds
8b3db612 6%bcond_with tests # enable tests (whatever they check)
210a9feb 7%bcond_without gtk3 # GTK+ 3.x instead of 2.x
44be9ed4 8%bcond_without ldap # disable e-mail address lookups in LDAP directories
e820c55e 9%bcond_without lightning # disable Sunbird/Lightning calendar
506cce80 10%bcond_without official # official Thunderbird branding
765a3a27 11%bcond_with crashreporter # report crashes to crash-stats.mozilla.com
a97d3356
JR
12# - disabled shared_js - https://bugzilla.mozilla.org/show_bug.cgi?id=1039964
13%bcond_with shared_js # shared libmozjs library [broken]
99b97bc4 14%bcond_with system_icu # build with system ICU (disabled due to crashes with system icu 58.2)
88149483 15
f4114a7f 16%if 0%{?_enable_debug_packages} != 1
765a3a27
ER
17%undefine crashreporter
18%endif
19
8b3db612 20%define nspr_ver 4.13.1
5b7bcd89 21%define nss_ver 3.28.5
44be9ed4 22
7d981f69
ER
23# The actual sqlite version (see RHBZ#480989):
24%define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR)
7d981f69 25
cae5b55b
JR
26Summary: Thunderbird - email client
27Summary(pl.UTF-8): Thunderbird - klient poczty
28Name: thunderbird
7849563a 29Version: 52.2.1
1e1b81a7 30Release: 1
3366507a 31License: MPL v2.0
2d289b25 32Group: X11/Applications/Mail
cae5b55b 33Source0: http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/%{version}/source/%{name}-%{version}.source.tar.xz
7849563a 34# Source0-md5: df6ddc52046acd66503756c094c30e21
dd12359d
JR
35Source1: %{name}.desktop
36Source2: %{name}.sh
37Patch0: prefs.patch
38Patch1: no-subshell.patch
39Patch2: enable-addons.patch
210a9feb 40Patch3: mozilla-1245783.patch
cae5b55b 41URL: http://www.mozilla.org/projects/thunderbird/
6458b220 42BuildRequires: GConf2-devel >= 1.2.1
51a3b6db 43BuildRequires: alsa-lib-devel
44be9ed4 44BuildRequires: automake
51a3b6db 45BuildRequires: bzip2-devel
e820c55e
JB
46BuildRequires: cairo-devel >= 1.10
47BuildRequires: dbus-glib-devel >= 0.60
5b7bcd89 48BuildRequires: fontconfig-devel >= 2.7.0
44be9ed4 49BuildRequires: freetype-devel >= 1:2.1.8
6f32f966 50BuildRequires: glib2-devel >= 1:2.20
d0b96b40
JR
51BuildRequires: gstreamer0.10-devel
52BuildRequires: gstreamer0.10-plugins-base-devel
99b97bc4
JR
53%{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.18.0}
54%{?with_gtk3:BuildRequires: gtk+3-devel >= 3.4.0}
5e9bb798 55BuildRequires: hunspell-devel
44be9ed4 56BuildRequires: libIDL-devel >= 0.8.0
d0b96b40 57BuildRequires: libevent-devel
5b7bcd89 58BuildRequires: libffi-devel > 3.0.9
99b97bc4 59%{?with_system_icu:BuildRequires: libicu-devel >= 58.1}
51a3b6db 60BuildRequires: libiw-devel
e82da7a1 61# requires libjpeg-turbo implementing at least libjpeg 6b API
44be9ed4 62BuildRequires: libjpeg-devel >= 6b
e82da7a1 63BuildRequires: libjpeg-turbo-devel
e820c55e 64BuildRequires: libpng-devel >= 1.4.1
44be9ed4 65BuildRequires: libstdc++-devel
5b7bcd89 66BuildRequires: libvpx-devel >= 1.5.0
d0b96b40 67BuildRequires: mozldap-devel
f4114a7f
ER
68BuildRequires: nspr-devel >= 1:%{nspr_ver}
69BuildRequires: nss-devel >= 1:%{nss_ver}
62096d2c 70BuildRequires: pango-devel >= 1:1.22.0
e820c55e 71BuildRequires: perl-base >= 1:5.6
5b7bcd89 72BuildRequires: pixman-devel >= 0.19.2
1c62cadb 73BuildRequires: pkgconfig
e820c55e 74BuildRequires: python >= 1:2.5
cae5b55b 75BuildRequires: python-virtualenv
44be9ed4 76BuildRequires: sed >= 4.0
5b7bcd89 77BuildRequires: sqlite3-devel >= 3.17.0
1c62cadb 78BuildRequires: startup-notification-devel >= 0.8
ffb12c8e 79BuildRequires: virtualenv
44be9ed4 80BuildRequires: xorg-lib-libXext-devel
44be9ed4 81BuildRequires: xorg-lib-libXinerama-devel
44be9ed4 82BuildRequires: xorg-lib-libXt-devel
5745d706 83BuildRequires: yasm
1c62cadb 84BuildRequires: zip
6f32f966 85Requires: glib2 >= 1:2.20
99b97bc4
JR
86%{!?with_gtk3:Requires: gtk+2 >= 2:2.18.0}
87%{?with_gtk3:Requires: gtk+3 >= 3.4.0}
5b7bcd89 88Requires: libvpx >= 1.5.0
44be9ed4 89Requires: myspell-common
f4114a7f
ER
90Requires: nspr >= 1:%{nspr_ver}
91Requires: nss >= 1:%{nss_ver}
62096d2c 92Requires: pango >= 1:1.22.0
4b6bc367 93Requires: sqlite3 >= %{sqlite_build_version}
4f34f106 94Requires(post): mktemp >= 1.5-18
e82da7a1 95Requires: libjpeg-turbo
99b97bc4 96Obsoletes: icedove
44be9ed4 97Obsoletes: mozilla-thunderbird
98Obsoletes: mozilla-thunderbird-dictionary-en-US
cae5b55b 99Conflicts: thunderbird-lang-resources < %{version}
44be9ed4 100BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
101
9e366f18
AM
102%define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+
103
cae5b55b 104# firefox/thunderbird/seamonkey provide their own versions
44be9ed4 105%define _noautoprovfiles %{_libdir}/%{name}/components
99b97bc4 106
fb7d4f06 107# we don't want these to satisfy packages depending on xulrunner
6f32f966 108%define _noautoprov libmozalloc.so libmozjs.so libxul.so
44be9ed4 109# and as we don't provide them, don't require either
6f32f966 110%define _noautoreq libmozalloc.so libmozjs.so libxul.so
44be9ed4 111
7a5e9406 112%define topdir %{_builddir}/thunderbird-%{version}
9e7875fc
ER
113%define objdir %{topdir}/obj-%{_target_cpu}
114
44be9ed4 115%description
cae5b55b 116Thunderbird is an open-source, fast and portable email client.
44be9ed4 117
118%description -l pl.UTF-8
cae5b55b 119Thunderbird jest mającym otwarte źródła, szybkim i przenośnym klientem
6b327de6 120poczty.
44be9ed4 121
6578c165 122%package addon-lightning
cae5b55b
JR
123Summary: An integrated calendar for Thunderbird
124Summary(pl.UTF-8): Zintegrowany kalendarz dla Thunderbird
6578c165 125License: MPL 1.1 or GPL v2+ or LGPL v2.1+
126Group: Applications/Networking
127Requires: %{name} = %{version}-%{release}
99b97bc4 128Obsoletes: icedove-addon-lightning
6578c165 129
130%description addon-lightning
cae5b55b 131Lightning is an calendar extension to Thunderbird email client.
6578c165 132
133%description addon-lightning -l pl.UTF-8
cae5b55b 134Lightning to rozszerzenie do klienta poczty Thunderbird dodające
6578c165 135funkcjonalność kalendarza.
136
44be9ed4 137%prep
cae5b55b 138%setup -q
dd12359d
JR
139%patch0 -p1
140%patch1 -p1
f53f9bcd 141%patch2 -p1
dd12359d 142%patch3 -p1
d0b96b40 143
44be9ed4 144%build
fbac75ca 145cat << EOF > .mozconfig
9e7875fc 146mk_add_options MOZ_OBJDIR=%{objdir}
cb0e4412 147
765a3a27
ER
148%if %{with crashreporter}
149export MOZ_DEBUG_SYMBOLS=1
150%endif
151
59c5a0e8 152# Options for 'configure' (same as command-line options).
44be9ed4 153ac_add_options --prefix=%{_prefix}
44be9ed4 154%if %{?debug:1}0
59c5a0e8 155ac_add_options --disable-optimize
44be9ed4 156ac_add_options --enable-debug
157ac_add_options --enable-debug-modules
59c5a0e8
SP
158ac_add_options --enable-debugger-info-modules
159ac_add_options --enable-crash-on-assert
44be9ed4 160%else
161ac_add_options --disable-debug
59c5a0e8 162ac_add_options --enable-optimize="%{rpmcflags} -Os"
44be9ed4 163%endif
88149483 164ac_add_options --disable-strip
210a9feb 165ac_add_options --disable-install-strip
44be9ed4 166%if %{with tests}
167ac_add_options --enable-tests
210a9feb 168ac_add_options --enable-mochitest
44be9ed4 169%else
170ac_add_options --disable-tests
171%endif
3366507a
JB
172%if %{with lightning}
173ac_add_options --enable-calendar
44be9ed4 174%else
3366507a 175ac_add_options --disable-calendar
44be9ed4 176%endif
765a3a27
ER
177%if %{with crashreporter}
178ac_add_options --enable-crashreporter
179%else
59c5a0e8 180ac_add_options --disable-crashreporter
765a3a27 181%endif
99b97bc4 182#ac_add_options --disable-elf-hack
8b3db612 183ac_add_options --disable-gconf
3366507a 184ac_add_options --disable-gnomeui
8b3db612 185ac_add_options --disable-necko-wifi
88149483 186ac_add_options --disable-updater
8b3db612
JR
187ac_add_options --enable-alsa
188ac_add_options --enable-chrome-format=omni
3366507a 189ac_add_options --enable-application=mail
3366507a
JB
190ac_add_options --enable-default-toolkit=%{?with_gtk3:cairo-gtk3}%{!?with_gtk3:cairo-gtk2}
191ac_add_options --enable-gio
8b3db612 192ac_add_options --enable-readline
3366507a
JB
193%if %{with ldap}
194ac_add_options --enable-ldap
3366507a
JB
195%else
196ac_add_options --disable-ldap
197%endif
a97d3356 198%{?with_shared_js:ac_add_options --enable-shared-js}
88149483 199ac_add_options --enable-startup-notification
44be9ed4 200ac_add_options --enable-system-cairo
210a9feb 201ac_add_options --enable-system-ffi
5e9bb798 202ac_add_options --enable-system-hunspell
7d981f69 203ac_add_options --enable-system-sqlite
210a9feb 204ac_add_options --enable-url-classifier
506cce80 205%{?with_official:ac_add_options --enable-official-branding}
3366507a
JB
206ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
207ac_add_options --with-distribution-id=org.pld-linux
88149483
ER
208ac_add_options --with-pthreads
209ac_add_options --with-system-bz2
99b97bc4 210ac_add_options --with%{!?with_system_icu:out}-system-icu
44be9ed4 211ac_add_options --with-system-jpeg
d0b96b40
JR
212ac_add_options --with-system-libevent
213ac_add_options --with-system-libvpx
44be9ed4 214ac_add_options --with-system-nspr
215ac_add_options --with-system-nss
216ac_add_options --with-system-png
217ac_add_options --with-system-zlib
210a9feb 218ac_add_options --with-x
44be9ed4 219EOF
220
d0b96b40 221mkdir -p %{objdir}/config
7a5e9406 222ln -sf %{topdir}/mozilla/config/*.mk %{objdir}/config
d0b96b40 223
90e998ba 224%{__make} -j1 -f client.mk build \
210a9feb
JR
225 AUTOCONF=/usr/bin/autoconf2_13 \
226 MOZ_MAKE_FLAGS="%{_smp_mflags}"
44be9ed4 227
765a3a27
ER
228%if %{with crashreporter}
229# create debuginfo for crash-stats.mozilla.com
230%{__make} -j1 -C obj-%{_target_cpu} buildsymbols
231%endif
232
44be9ed4 233%install
234rm -rf $RPM_BUILD_ROOT
99b97bc4 235install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/plugins,%{_datadir}/%{name},%{_pixmapsdir},%{_desktopdir}}
44be9ed4 236
9e7875fc 237cd %{objdir}
ecf04393 238%{__make} -C mail/installer stage-package \
44be9ed4 239 DESTDIR=$RPM_BUILD_ROOT \
d0b96b40 240 installdir=%{_libdir}/%{name} \
44be9ed4 241 PKG_SKIP_STRIP=1
242
cae5b55b 243cp -a dist/thunderbird/* $RPM_BUILD_ROOT%{_libdir}/%{name}/
d0b96b40 244
9b40a2c3 245# Enable crash reporter for Thunderbird application
765a3a27
ER
246%if %{with crashreporter}
247%{__sed} -i -e 's/\[Crash Reporter\]/[Crash Reporter]\nEnabled=1/' $RPM_BUILD_ROOT%{_libdir}/%{name}/application.ini
248
249# Add debuginfo for crash-stats.mozilla.com
51a3b6db 250install -d $RPM_BUILD_ROOT%{_exec_prefix}/lib/debug%{_libdir}/%{name}
3a30e2d7 251cp -a dist/%{name}-%{version}.en-US.linux-*.crashreporter-symbols.zip $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/%{name}
765a3a27
ER
252%endif
253
99b97bc4
JR
254%{__sed} -e 's,@LIBDIR@,%{_libdir},' %{SOURCE2} > $RPM_BUILD_ROOT%{_bindir}/%{name}
255cp -p dist/thunderbird/chrome/icons/default/default48.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
78c9ef4f 256cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
c6ec3c1c 257
99b97bc4
JR
258# use system dict
259%{__rm} -rv $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
44be9ed4 260ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
99b97bc4 261ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/hyphenation
e6bc19b3 262
99b97bc4
JR
263# move arch independant ones to datadir
264mv $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome
265mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults
266mv $RPM_BUILD_ROOT%{_libdir}/%{name}/isp $RPM_BUILD_ROOT%{_datadir}/%{name}/isp
267ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome
268ln -s ../../share/%{name}/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults
269ln -s ../../share/%{name}/isp $RPM_BUILD_ROOT%{_libdir}/%{name}/isp
52fc61e6 270
283702b9 271# mozldap
d0b96b40
JR
272%{__sed} -i '/lib\(ldap\|ldif\|prldap\)60.so/d' $RPM_BUILD_ROOT%{_libdir}/%{name}/dependentlibs.list
273%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{ldap,ldif,prldap}60.so
283702b9 274
99b97bc4
JR
275# remove unecessary stuff
276%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/removed-files
277
44be9ed4 278%clean
279rm -rf $RPM_BUILD_ROOT
280
281%pretrans
282if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
283 mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
284fi
99b97bc4 285for d in chrome defaults icons isp modules res; do
44be9ed4 286 if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then
287 install -d %{_datadir}/%{name}
288 mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d
289 fi
290done
291exit 0
292
e8f4ba81 293%post
99b97bc4
JR
294%update_desktop_database_post
295# make temporary HOME, as it attempts to touch files in $HOME/.mozilla
296# dangerous if you run this with sudo with keep_env += HOME
297# also TMPDIR could be pointing to sudo user's homedir so we reset that too.
298export HOME=$(mktemp -d)
299unset TMPDIR TMP || :
300umask 022
301%{_libdir}/%{name}/thunderbird -register
302rm -rf $HOME
303
304%postun
305%update_desktop_database_postun
e8f4ba81 306
44be9ed4 307%files
308%defattr(644,root,root,755)
99b97bc4 309%attr(755,root,root) %{_bindir}/%{name}
44be9ed4 310%dir %{_libdir}/%{name}
99b97bc4
JR
311%dir %{_libdir}/%{name}/plugins
312
313%if %{with gtk3}
314%dir %{_libdir}/%{name}/gtk2
315%attr(755,root,root) %{_libdir}/%{name}/gtk2/libmozgtk.so
316%attr(755,root,root) %{_libdir}/%{name}/libmozgtk.so
317%endif
318%attr(755,root,root) %{_libdir}/%{name}/liblgpllibs.so
319%{?with_shared_js:%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so}
210a9feb 320%attr(755,root,root) %{_libdir}/%{name}/libmozsandbox.so
99b97bc4 321%attr(755,root,root) %{_libdir}/%{name}/libxul.so
73d54cb2
JB
322%attr(755,root,root) %{_libdir}/%{name}/*.sh
323%attr(755,root,root) %{_libdir}/%{name}/*-bin
99b97bc4 324%attr(755,root,root) %{_libdir}/%{name}/plugin-container
cae5b55b 325%attr(755,root,root) %{_libdir}/%{name}/thunderbird
99b97bc4
JR
326
327%{_libdir}/%{name}/application.ini
328%{_libdir}/%{name}/blocklist.xml
a367af64 329%{_libdir}/%{name}/dependentlibs.list
99b97bc4 330%{_libdir}/%{name}/omni.ja
73d54cb2 331%{_libdir}/%{name}/platform.ini
210a9feb
JR
332%{!?with_system_icu:%{_libdir}/%{name}/icudt58l.dat}
333
334%dir %{_libdir}/%{name}/fonts
335%{_libdir}/%{name}/fonts/EmojiOneMozilla.ttf
44be9ed4 336
765a3a27
ER
337%if %{with crashreporter}
338%attr(755,root,root) %{_libdir}/%{name}/crashreporter
339%{_libdir}/%{name}/crashreporter.ini
340%{_libdir}/%{name}/Throbber-small.gif
341%endif
342
44be9ed4 343%dir %{_libdir}/%{name}/extensions
99b97bc4
JR
344%{_libdir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi
345
346%dir %{_libdir}/%{name}/distribution
347%dir %{_libdir}/%{name}/distribution/extensions
348
349# symlinks
350%{_libdir}/%{name}/chrome
351%{_libdir}/%{name}/defaults
352%{_libdir}/%{name}/dictionaries
353%{_libdir}/%{name}/hyphenation
354%{_libdir}/%{name}/isp
6578c165 355
99b97bc4
JR
356%{_pixmapsdir}/*.png
357%{_desktopdir}/*.desktop
52fc61e6 358
99b97bc4
JR
359%dir %{_datadir}/%{name}
360%{_datadir}/%{name}/chrome
361%{_datadir}/%{name}/defaults
362%{_datadir}/%{name}/isp
d0b96b40 363
6578c165 364%if %{with lightning}
365%files addon-lightning
366%defattr(644,root,root,755)
3a30e2d7
JR
367%dir %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}
368%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/app.ini
369%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome.jar
370%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome.manifest
371%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/defaults
372%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/install.rdf
373%dir %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components
3a30e2d7
JR
374%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.js
375%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*manifest
376%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/components/*.xpt
377%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/modules
378%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js
379%dir %{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/timezones
380%{_libdir}/%{name}/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/timezones/zones.json
6578c165 381%endif
This page took 0.119648 seconds and 4 git commands to generate.