[packages/thunderbird] - cleaned up build/install/files - builds but crashes with "TypeError: a is null"
baggins
baggins at pld-linux.org
Wed Mar 15 07:26:03 CET 2017
commit 99b97bc4cfe7423231f0f3dd1ac892faf00f279d
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Wed Mar 15 07:25:21 2017 +0100
- cleaned up build/install/files
- builds but crashes with "TypeError: a is null"
thunderbird.spec | 188 ++++++++++++++++++++++---------------------------------
1 file changed, 75 insertions(+), 113 deletions(-)
---
diff --git a/thunderbird.spec b/thunderbird.spec
index 1ed4373..f5a4ab9 100644
--- a/thunderbird.spec
+++ b/thunderbird.spec
@@ -5,10 +5,10 @@
%bcond_with gtk3 # GTK+ 3.x instead of 2.x
%bcond_without ldap # disable e-mail address lookups in LDAP directories
%bcond_without lightning # disable Sunbird/Lightning calendar
-%bcond_with xulrunner # system xulrunner
%bcond_with crashreporter # report crashes to crash-stats.mozilla.com
# - disabled shared_js - https://bugzilla.mozilla.org/show_bug.cgi?id=1039964
%bcond_with shared_js # shared libmozjs library [broken]
+%bcond_with system_icu # build with system ICU (disabled due to crashes with system icu 58.2)
%if 0%{?_enable_debug_packages} != 1
%undefine crashreporter
@@ -17,12 +17,8 @@
%define nspr_ver 4.10.6
%define nss_ver 3.19.2.1
-%define xulrunner_ver 2:31.3.0
-
-%if %{without xulrunner}
# The actual sqlite version (see RHBZ#480989):
%define sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo ERROR)
-%endif
Summary: Thunderbird - email client
Summary(pl.UTF-8): Thunderbird - klient poczty
@@ -50,12 +46,12 @@ BuildRequires: freetype-devel >= 1:2.1.8
BuildRequires: glib2-devel >= 1:2.20
BuildRequires: gstreamer0.10-devel
BuildRequires: gstreamer0.10-plugins-base-devel
-%{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.14}
-%{?with_gtk3:BuildRequires: gtk+3-devel >= 3.0.0}
+%{!?with_gtk3:BuildRequires: gtk+2-devel >= 2:2.18.0}
+%{?with_gtk3:BuildRequires: gtk+3-devel >= 3.4.0}
BuildRequires: hunspell-devel
BuildRequires: libIDL-devel >= 0.8.0
BuildRequires: libevent-devel
-BuildRequires: libicu-devel >= 50.1
+%{?with_system_icu:BuildRequires: libicu-devel >= 58.1}
BuildRequires: libiw-devel
# requires libjpeg-turbo implementing at least libjpeg 6b API
BuildRequires: libjpeg-devel >= 6b
@@ -80,25 +76,18 @@ BuildRequires: xorg-lib-libXinerama-devel
BuildRequires: xorg-lib-libXt-devel
BuildRequires: yasm
BuildRequires: zip
-%if %{with xulrunner}
-BuildRequires: xulrunner-devel < 2:32
-BuildRequires: xulrunner-devel >= %{xulrunner_ver}
-%else
Requires: glib2 >= 1:2.20
-%{!?with_gtk3:Requires: gtk+2 >= 2:2.14}
-%{?with_gtk3:Requires: gtk+3 >= 3.0.0}
+%{!?with_gtk3:Requires: gtk+2 >= 2:2.18.0}
+%{?with_gtk3:Requires: gtk+3 >= 3.4.0}
Requires: libvpx >= 1.3.0
Requires: myspell-common
Requires: nspr >= 1:%{nspr_ver}
Requires: nss >= 1:%{nss_ver}
Requires: pango >= 1:1.22.0
Requires: sqlite3 >= %{sqlite_build_version}
-%endif
Requires(post): mktemp >= 1.5-18
-%if %{with xulrunner}
-%requires_eq_to xulrunner xulrunner-devel
-%endif
Requires: libjpeg-turbo
+Obsoletes: icedove
Obsoletes: mozilla-thunderbird
Obsoletes: mozilla-thunderbird-dictionary-en-US
Conflicts: thunderbird-lang-resources < %{version}
@@ -108,12 +97,11 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
# firefox/thunderbird/seamonkey provide their own versions
%define _noautoprovfiles %{_libdir}/%{name}/components
-%if %{without xulrunner}
+
# we don't want these to satisfy packages depending on xulrunner
%define _noautoprov libmozalloc.so libmozjs.so libxul.so
# and as we don't provide them, don't require either
%define _noautoreq libmozalloc.so libmozjs.so libxul.so
-%endif
%define topdir %{_builddir}/thunderbird-%{version}
%define objdir %{topdir}/obj-%{_target_cpu}
@@ -131,6 +119,7 @@ Summary(pl.UTF-8): Zintegrowany kalendarz dla Thunderbird
License: MPL 1.1 or GPL v2+ or LGPL v2.1+
Group: Applications/Networking
Requires: %{name} = %{version}-%{release}
+Obsoletes: icedove-addon-lightning
%description addon-lightning
Lightning is an calendar extension to Thunderbird email client.
@@ -200,8 +189,8 @@ ac_add_options --enable-crashreporter
%else
ac_add_options --disable-crashreporter
%endif
-ac_add_options --disable-elf-dynstr-gc
-ac_add_options --disable-elf-hack
+#ac_add_options --disable-elf-dynstr-gc
+#ac_add_options --disable-elf-hack
ac_add_options --disable-gnomeui
ac_add_options --disable-gnomevfs
ac_add_options --disable-installer
@@ -230,14 +219,10 @@ ac_add_options --enable-system-hunspell
ac_add_options --enable-system-sqlite
ac_add_options --with-default-mozilla-five-home=%{_libdir}/%{name}
ac_add_options --with-distribution-id=org.pld-linux
-%if %{with xulrunner}
-ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul)
-ac_add_options --with-system-libxul
-%endif
ac_add_options --with-pthreads
ac_add_options --with-system-bz2
ac_add_options --with-system-ffi
-ac_add_options --with-system-icu
+ac_add_options --with%{!?with_system_icu:out}-system-icu
ac_add_options --with-system-jpeg
ac_add_options --with-system-libevent
ac_add_options --with-system-libvpx
@@ -265,7 +250,7 @@ ln -sf %{topdir}/mozilla/config/*.mk %{objdir}/config
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name},%{_datadir}/%{name},%{_pixmapsdir},%{_desktopdir}}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{name}/plugins,%{_datadir}/%{name},%{_pixmapsdir},%{_desktopdir}}
cd %{objdir}
%{__make} -C mail/installer stage-package \
@@ -275,11 +260,6 @@ cd %{objdir}
cp -a dist/thunderbird/* $RPM_BUILD_ROOT%{_libdir}/%{name}/
-%if %{with xulrunner}
-# needed to find mozilla runtime
-ln -s ../xulrunner $RPM_BUILD_ROOT%{_libdir}/%{name}/xulrunner
-%endif
-
# Enable crash reporter for Thunderbird application
%if %{with crashreporter}
%{__sed} -i -e 's/\[Crash Reporter\]/[Crash Reporter]\nEnabled=1/' $RPM_BUILD_ROOT%{_libdir}/%{name}/application.ini
@@ -289,50 +269,30 @@ install -d $RPM_BUILD_ROOT%{_exec_prefix}/lib/debug%{_libdir}/%{name}
cp -a dist/%{name}-%{version}.en-US.linux-*.crashreporter-symbols.zip $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/%{name}
%endif
-# move arch independant ones to datadir
-mv $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins $RPM_BUILD_ROOT%{_datadir}/%{name}/searchplugins
-ln -s ../../share/%{name}/searchplugins $RPM_BUILD_ROOT%{_libdir}/%{name}/searchplugins
-
-# dir for arch independant extensions besides arch dependant extensions
-# see mozilla/xpcom/build/nsXULAppAPI.h
-# XRE_SYS_LOCAL_EXTENSION_PARENT_DIR and XRE_SYS_SHARE_EXTENSION_PARENT_DIR
-install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions
+%{__sed} -e 's, at LIBDIR@,%{_libdir},' %{SOURCE2} > $RPM_BUILD_ROOT%{_bindir}/%{name}
+cp -p dist/thunderbird/chrome/icons/default/default48.png $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png
+cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
-%if %{without xulrunner}
-%{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
+# use system dict
+%{__rm} -rv $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/dictionaries
-%endif
+ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{_libdir}/%{name}/hyphenation
-#%{__sed} -e "s|%MOZAPPDIR%|%{_libdir}/%{name}|" \
-# -e "s|%MOZ_APP_DISPLAYNAME%|Thunderbird|" \
-# %{topdir}/mozilla/mozilla/build/unix/mozilla.in > $RPM_BUILD_ROOT%{_libdir}/%{name}/thunderbird
-
-%{__sed} -e 's, at LIBDIR@,%{_libdir},' %{SOURCE2} > $RPM_BUILD_ROOT%{_bindir}/thunderbird
-ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/thunderbird
-ln -s %{name} $RPM_BUILD_ROOT%{_bindir}/mozilla-thunderbird
-
-cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
-
-# files created by regxpcom -register in post
-touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/compreg.dat
-touch $RPM_BUILD_ROOT%{_libdir}/%{name}/components/xpti.dat
-cat << 'EOF' > $RPM_BUILD_ROOT%{_libdir}/%{name}/register
-#!/bin/sh
-umask 022
-# make temporary HOME, as it attempts to touch files in $HOME/.mozilla
-# dangerous if you run this with sudo with keep_env += HOME
-# also TMPDIR could be pointing to sudo user's homedir so we reset that too.
-t=$(mktemp -d)
-%{__rm} -f %{_libdir}/%{name}/components/{compreg,xpti}.dat
-TMPDIR= TMP= HOME=$t %{_libdir}/%{name}/thunderbird -register
-rm -rf $t
-EOF
-chmod a+rx $RPM_BUILD_ROOT%{_libdir}/%{name}/register
+# move arch independant ones to datadir
+mv $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome $RPM_BUILD_ROOT%{_datadir}/%{name}/chrome
+mv $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults $RPM_BUILD_ROOT%{_datadir}/%{name}/defaults
+mv $RPM_BUILD_ROOT%{_libdir}/%{name}/isp $RPM_BUILD_ROOT%{_datadir}/%{name}/isp
+ln -s ../../share/%{name}/chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome
+ln -s ../../share/%{name}/defaults $RPM_BUILD_ROOT%{_libdir}/%{name}/defaults
+ln -s ../../share/%{name}/isp $RPM_BUILD_ROOT%{_libdir}/%{name}/isp
# mozldap
%{__sed} -i '/lib\(ldap\|ldif\|prldap\)60.so/d' $RPM_BUILD_ROOT%{_libdir}/%{name}/dependentlibs.list
%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/lib{ldap,ldif,prldap}60.so
+# remove unecessary stuff
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/removed-files
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -340,7 +300,7 @@ rm -rf $RPM_BUILD_ROOT
if [ -d %{_libdir}/%{name}/dictionaries ] && [ ! -L %{_libdir}/%{name}/dictionaries ]; then
mv -v %{_libdir}/%{name}/dictionaries{,.rpmsave}
fi
-for d in chrome defaults icons isp modules res searchplugins; do
+for d in chrome defaults icons isp modules res; do
if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then
install -d %{_datadir}/%{name}
mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d
@@ -349,53 +309,43 @@ done
exit 0
%post
-%{_libdir}/%{name}/register || :
+%update_desktop_database_post
+# make temporary HOME, as it attempts to touch files in $HOME/.mozilla
+# dangerous if you run this with sudo with keep_env += HOME
+# also TMPDIR could be pointing to sudo user's homedir so we reset that too.
+export HOME=$(mktemp -d)
+unset TMPDIR TMP || :
+umask 022
+%{_libdir}/%{name}/thunderbird -register
+rm -rf $HOME
+
+%postun
+%update_desktop_database_postun
%files
%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/thunderbird
-%attr(755,root,root) %{_bindir}/mozilla-thunderbird
-%attr(755,root,root) %{_bindir}/thunderbird
+%attr(755,root,root) %{_bindir}/%{name}
%dir %{_libdir}/%{name}
-%{_libdir}/%{name}/application.ini
-%{_libdir}/%{name}/blocklist.xml
-%{_libdir}/%{name}/chrome.manifest
-%dir %{_libdir}/%{name}/components
-%{_libdir}/%{name}/components/components.manifest
+%dir %{_libdir}/%{name}/plugins
+
+%if %{with gtk3}
+%dir %{_libdir}/%{name}/gtk2
+%attr(755,root,root) %{_libdir}/%{name}/gtk2/libmozgtk.so
+%attr(755,root,root) %{_libdir}/%{name}/libmozgtk.so
+%endif
+%attr(755,root,root) %{_libdir}/%{name}/liblgpllibs.so
+%{?with_shared_js:%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so}
+%attr(755,root,root) %{_libdir}/%{name}/libxul.so
%attr(755,root,root) %{_libdir}/%{name}/*.sh
%attr(755,root,root) %{_libdir}/%{name}/*-bin
+%attr(755,root,root) %{_libdir}/%{name}/plugin-container
%attr(755,root,root) %{_libdir}/%{name}/thunderbird
-%attr(755,root,root) %{_libdir}/%{name}/register
-%{_libdir}/%{name}/omni.ja
-%if %{without xulrunner}
+
+%{_libdir}/%{name}/application.ini
+%{_libdir}/%{name}/blocklist.xml
%{_libdir}/%{name}/dependentlibs.list
+%{_libdir}/%{name}/omni.ja
%{_libdir}/%{name}/platform.ini
-%attr(755,root,root) %{_libdir}/%{name}/components/*.so
-%attr(755,root,root) %{_libdir}/%{name}/libmozalloc.so
-%{?with_shared_js:%attr(755,root,root) %{_libdir}/%{name}/libmozjs.so}
-%attr(755,root,root) %{_libdir}/%{name}/libxul.so
-%attr(755,root,root) %{_libdir}/%{name}/plugin-container
-%endif
-
-# symlinks
-%{_libdir}/%{name}/chrome
-%{_libdir}/%{name}/defaults
-%{_libdir}/%{name}/isp
-%{_libdir}/%{name}/searchplugins
-%if %{with xulrunner}
-%{_libdir}/%{name}/xulrunner
-%else
-%{_libdir}/%{name}/dictionaries
-%endif
-
-%{_pixmapsdir}/thunderbird.png
-%{_desktopdir}/thunderbird.desktop
-
-%dir %{_datadir}/%{name}
-%dir %{_libdir}/%{name}/distribution
-%dir %{_libdir}/%{name}/distribution/extensions
-%{_datadir}/%{name}/extensions
-%{_datadir}/%{name}/searchplugins
%if %{with crashreporter}
%attr(755,root,root) %{_libdir}/%{name}/crashreporter
@@ -404,13 +354,25 @@ exit 0
%endif
%dir %{_libdir}/%{name}/extensions
-%{_libdir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
+%{_libdir}/%{name}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi
+
+%dir %{_libdir}/%{name}/distribution
+%dir %{_libdir}/%{name}/distribution/extensions
+
+# symlinks
+%{_libdir}/%{name}/chrome
+%{_libdir}/%{name}/defaults
+%{_libdir}/%{name}/dictionaries
+%{_libdir}/%{name}/hyphenation
+%{_libdir}/%{name}/isp
-# files created by regxpcom -register
-%ghost %{_libdir}/%{name}/components/compreg.dat
-%ghost %{_libdir}/%{name}/components/xpti.dat
+%{_pixmapsdir}/*.png
+%{_desktopdir}/*.desktop
-%{_iconsdir}/hicolor/*/apps/thunderbird.*
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/chrome
+%{_datadir}/%{name}/defaults
+%{_datadir}/%{name}/isp
%if %{with lightning}
%files addon-lightning
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/thunderbird.git/commitdiff/99b97bc4cfe7423231f0f3dd1ac892faf00f279d
More information about the pld-cvs-commit
mailing list