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