Accepting request 258425 from mozilla:Factory

- remove add-plugins.sh and use /usr/share/myspell directly
  (bnc#900639)

OBS-URL: https://build.opensuse.org/request/show/258425
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/MozillaThunderbird?expand=0&rev=139
This commit is contained in:
Stephan Kulow 2014-11-01 07:13:58 +00:00 committed by Git OBS Bridge
commit 7e1a154f53
4 changed files with 8 additions and 84 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sat Oct 25 18:41:27 UTC 2014 - wr@rosenauer.org
- remove add-plugins.sh and use /usr/share/myspell directly
(bnc#900639)
-------------------------------------------------------------------
Sun Oct 12 22:47:42 UTC 2014 - wr@rosenauer.org

View File

@ -84,7 +84,6 @@ Group: Productivity/Networking/Email/Clients
Url: http://www.mozilla.org/products/thunderbird/
Source: thunderbird-%{version}-source.tar.xz
Source1: thunderbird.desktop
Source2: add-plugins.sh.in
Source3: mozilla.sh.in
Source4: l10n-%{version}.tar.xz
#Source5: shipped-locales
@ -348,10 +347,6 @@ ln -sf ../..%{progdir}/%{progname}.sh $RPM_BUILD_ROOT%{_bindir}/%{progname}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
install -m 644 %{SOURCE1} \
$RPM_BUILD_ROOT%{_datadir}/applications/%{desktop_file_name}.desktop
# install add-plugins.sh
sed "s:%%PROGDIR:%{progdir}:g" \
%{SOURCE2} > $RPM_BUILD_ROOT%{progdir}/add-plugins.sh
chmod 755 $RPM_BUILD_ROOT%{progdir}/add-plugins.sh
# appdata
mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
cp %{SOURCE9} $RPM_BUILD_ROOT%{_datadir}/appdata/%{desktop_file_name}.appdata.xml
@ -430,33 +425,12 @@ rm -rf $RPM_BUILD_ROOT
rm -rf %{_tmppath}/translations.*
%endif
%triggerin -- myspell-dictionary
%progdir/add-plugins.sh > /dev/null 2>&1
exit 0
%triggerpostun -- myspell-dictionary
%progdir/add-plugins.sh > /dev/null 2>&1
exit 0
%post
%progdir/add-plugins.sh > /dev/null 2>&1
%if %suse_version > 1130
%icon_theme_cache_post
%endif
exit 0
%posttrans
if [ -e %progdir/add-plugins.sh ]; then
%progdir/add-plugins.sh > /dev/null 2>&1
fi
exit 0
%preun
if [ "$1" = "0" ]; then # deinstallation
rm -f %{progdir}/dictionaries/*
fi
exit 0
%postun
%if %suse_version > 1130
%icon_theme_cache_postun
@ -466,7 +440,6 @@ exit 0
%files
%defattr(-,root,root)
%attr(755,root,root) %{progdir}/%{progname}.sh
%attr(755,root,root) %{progdir}/add-plugins.sh
%dir %{progdir}
%{progdir}/application.ini
%{progdir}/blocklist.xml

View File

@ -1,57 +0,0 @@
#! /bin/sh
# Copyright (c) 2008 Wolfgang Rosenauer. All rights reserved.
#
# check if we are started as root
# only one of UID and USER must be set correctly
if test "$UID" != 0 -a "$USER" != root; then
echo "You must be root to start $0."
exit 1
fi
PREFIX="%PROGDIR"
# dictionaries
MYSPELL=/usr/share/myspell
MOZ_SPELL=$PREFIX/dictionaries
if [ -d $MOZ_SPELL ] ; then
if [ -d $MYSPELL ] ; then
for dict in $MYSPELL/??[-_]??.aff ; do
# check is it is really the file or it is a string which contain '??_??'
if ! [ -e $dict ] ; then
continue
fi
# the dict file name
dict_file=`echo ${dict##*/}`
# the dict file has a valid name
lang=`echo ${dict_file:0:2}`
country=`echo ${dict_file:3:2}`
# check for .dic file
if [ ! -r $MYSPELL/${lang}[-_]${country}.dic ] ; then
continue
fi
# create links
if [ ! -r $MOZ_SPELL/${lang}[-_]${country}.aff ] ; then
ln -sf $MYSPELL/${lang}[-_]${country}.aff \
$MOZ_SPELL/${lang}-${country}.aff
fi
if [ ! -r $MOZ_SPELL/${lang}[-_]${country}.dic ] ; then
ln -sf $MYSPELL/${lang}[-_]${country}.dic \
$MOZ_SPELL/${lang}-${country}.dic
fi
done
echo "-> added myspell dictionaries"
fi
# remove broken links
for dict in $MOZ_SPELL/*.{aff,dic} ; do
if ! [ -r $dict ] ; then
rm -f $dict
fi
done
fi

View File

@ -15,3 +15,5 @@ pref("intl.locale.matchOS", true);
pref("extensions.autoDisableScopes", 3);
pref("extensions.shownSelectionUI", true);
// spellcheck
pref("spellchecker.dictionary_path", "/usr/share/myspell");