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