- package compat symlinks in /usr/share/myspell
OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/myspell-dictionaries?expand=0&rev=13
This commit is contained in:
parent
c5b63ac854
commit
6fd35deeda
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon May 5 14:21:37 UTC 2014 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- package compat symlinks in /usr/share/myspell
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Apr 28 14:48:48 UTC 2014 - pgajdos@suse.com
|
Mon Apr 28 14:48:48 UTC 2014 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@ -986,36 +986,56 @@ Zulu hyphenation rules.
|
|||||||
%build
|
%build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install -m 755 -d %{buildroot}%{_datadir}/hunspell/
|
function install_dictionary_files
|
||||||
install -m 755 -d %{buildroot}%{_datadir}/hyphen/
|
{
|
||||||
install -m 755 -d %{buildroot}%{_datadir}/mythes/
|
locale_dir=$1
|
||||||
for dir in af_ZA an_ES ar be_BY bg_BG bn_BD br_FR bs_BA ca cs_CZ da_DK de el_GR en es et_EE fr_FR gd_GB gl gu_IN he_IL hi_IN hr_HR hu_HU is it_IT kmr_Latn lo_LA lt_LT lv_LV ne_NP nl_NL no oc_FR pl_PL pt_BR pt_PT ro ru_RU si_LK sk_SK sl_SI sr sv_SE sw_TZ te_IN th_TH uk_UA vi zu_ZA ; do
|
system_dir=$2
|
||||||
# install files
|
files=$3
|
||||||
dic_files=`find $dir -maxdepth 1 -name '*.dic' -a ! -name 'hyph*' -o -name '*.aff'`
|
|
||||||
hyph_files=`find $dir -maxdepth 1 -name 'hyph*.dic'`
|
if [ ! -z "$files" ]; then
|
||||||
th_files=`find $dir -maxdepth 1 -name 'th*.dat'`
|
for file in $files; do
|
||||||
doc_files=`find $dir -maxdepth 1 -type f | grep '.txt\|.xcu\|.xml\|.png\|.tex\|^[^.]*$' || true`
|
echo "LOCALE: $locale_dir SYSTEM_DIR: $system_dir FILE: $file"
|
||||||
if [ ! -z "$dic_files" ]; then # see zu_ZA
|
# install file
|
||||||
cp -P `echo $dic_files | tr '\n' ' '` %{buildroot}%{_datadir}/hunspell/
|
cp -P $file %{buildroot}%{_datadir}/$system_dir/
|
||||||
|
# symlink
|
||||||
|
ln -s %{_datadir}/$system_dir/$file %{buildroot}%{_datadir}/$compat_dir/$file
|
||||||
|
# file list
|
||||||
|
echo %{_datadir}/$system_dir/$file >> $locale_dir.list
|
||||||
|
echo %{_datadir}/$compat_dir/$file >> $locale_dir.list
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
if [ ! -z "$hyph_files" ]; then
|
}
|
||||||
cp -P `echo $hyph_files | tr '\n' ' '` %{buildroot}%{_datadir}/hyphen/
|
function install_doc_files
|
||||||
fi
|
{
|
||||||
if [ ! -z "$th_files" ]; then
|
locale_dir=$1
|
||||||
cp -P `echo $th_files | tr '\n' ' '` %{buildroot}%{_datadir}/mythes/
|
doc_files=$2
|
||||||
fi
|
|
||||||
install -m 755 -d %{buildroot}%{_docdir}/myspell-$dir
|
|
||||||
dos2unix -q $doc_files
|
dos2unix -q $doc_files
|
||||||
install -m 644 `echo $doc_files | tr '\n' ' '` %{buildroot}%{_docdir}/myspell-$dir
|
install -m 755 -d %{buildroot}%{_docdir}/myspell-$locale_dir
|
||||||
# create file list
|
install -m 644 `echo $doc_files | tr '\n' ' '` %{buildroot}%{_docdir}/myspell-$locale_dir
|
||||||
dic_files=`echo "$dic_files" | sed 's@^.*/@%{_datadir}/hunspell/@'`
|
echo "%{_docdir}/myspell-$locale_dir" >> $locale_dir.list
|
||||||
hyph_files=`echo "$hyph_files" | sed 's@^.*/@%{_datadir}/hyphen/@'`
|
}
|
||||||
th_files=`echo "$th_files" | sed 's@^.*/@%{_datadir}/mythes/@'`
|
dic_dir="hunspell"
|
||||||
echo '%%defattr(-,root,root,-)' > $dir.list
|
hyph_dir="hyphen"
|
||||||
echo "$dic_files" >> $dir.list
|
th_dir="mythes"
|
||||||
echo "$hyph_files" >> $dir.list
|
compat_dir="myspell"
|
||||||
echo "$th_files" >> $dir.list
|
for system_dir in $dic_dir $hyph_dir $th_dir $compat_dir; do
|
||||||
echo "%{_docdir}/myspell-$dir" >> $dir.list
|
install -m 755 -d %{buildroot}%{_datadir}/$system_dir/
|
||||||
|
done
|
||||||
|
for locale_dir in af_ZA an_ES ar be_BY bg_BG bn_BD br_FR bs_BA ca cs_CZ da_DK de el_GR en es et_EE fr_FR gd_GB gl gu_IN he_IL hi_IN hr_HR hu_HU is it_IT kmr_Latn lo_LA lt_LT lv_LV ne_NP nl_NL no oc_FR pl_PL pt_BR pt_PT ro ru_RU si_LK sk_SK sl_SI sr sv_SE sw_TZ te_IN th_TH uk_UA vi zu_ZA ; do
|
||||||
|
pushd $locale_dir
|
||||||
|
dic_files=`find -maxdepth 1 -name '*.dic' -a ! -name 'hyph*' -o -name '*.aff'`
|
||||||
|
hyph_files=`find -maxdepth 1 -name 'hyph*.dic'`
|
||||||
|
th_files=`find -maxdepth 1 -name 'th*.dat'`
|
||||||
|
doc_files=`find -maxdepth 1 -type f | grep '.txt\|.xcu\|.xml\|.png\|.tex\|^[^.]*$' || true`
|
||||||
|
# install dictionary files
|
||||||
|
echo '%%defattr(-,root,root,-)' > $locale_dir.list
|
||||||
|
install_dictionary_files $locale_dir $dic_dir "$dic_files"
|
||||||
|
install_dictionary_files $locale_dir $hyph_dir "$hyph_files"
|
||||||
|
install_dictionary_files $locale_dir $th_dir "$th_files"
|
||||||
|
# install documentation
|
||||||
|
install_doc_files $locale_dir $doc_files
|
||||||
|
popd
|
||||||
|
mv $locale_dir/$locale_dir.list .
|
||||||
done
|
done
|
||||||
|
|
||||||
%files
|
%files
|
||||||
@ -1023,6 +1043,7 @@ done
|
|||||||
%dir %{_datadir}/hunspell/
|
%dir %{_datadir}/hunspell/
|
||||||
%dir %{_datadir}/hyphen/
|
%dir %{_datadir}/hyphen/
|
||||||
%dir %{_datadir}/mythes/
|
%dir %{_datadir}/mythes/
|
||||||
|
%dir %{_datadir}/myspell/
|
||||||
|
|
||||||
%files -n myspell-af_ZA -f af_ZA.list
|
%files -n myspell-af_ZA -f af_ZA.list
|
||||||
|
|
||||||
|
@ -186,36 +186,56 @@ the Mozilla Composer, and the Mozilla Mail message composition window.
|
|||||||
%build
|
%build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
install -m 755 -d %{buildroot}%{_datadir}/hunspell/
|
function install_dictionary_files
|
||||||
install -m 755 -d %{buildroot}%{_datadir}/hyphen/
|
{
|
||||||
install -m 755 -d %{buildroot}%{_datadir}/mythes/
|
locale_dir=$1
|
||||||
for dir in @LANG_DIRS@ ; do
|
system_dir=$2
|
||||||
# install files
|
files=$3
|
||||||
dic_files=`find $dir -maxdepth 1 -name '*.dic' -a ! -name 'hyph*' -o -name '*.aff'`
|
|
||||||
hyph_files=`find $dir -maxdepth 1 -name 'hyph*.dic'`
|
if [ ! -z "$files" ]; then
|
||||||
th_files=`find $dir -maxdepth 1 -name 'th*.dat'`
|
for file in $files; do
|
||||||
doc_files=`find $dir -maxdepth 1 -type f | grep '.txt\|.xcu\|.xml\|.png\|.tex\|^[^.]*$' || true`
|
echo "LOCALE: $locale_dir SYSTEM_DIR: $system_dir FILE: $file"
|
||||||
if [ ! -z "$dic_files" ]; then # see zu_ZA
|
# install file
|
||||||
cp -P `echo $dic_files | tr '\n' ' '` %{buildroot}%{_datadir}/hunspell/
|
cp -P $file %{buildroot}%{_datadir}/$system_dir/
|
||||||
|
# symlink
|
||||||
|
ln -s %{_datadir}/$system_dir/$file %{buildroot}%{_datadir}/$compat_dir/$file
|
||||||
|
# file list
|
||||||
|
echo %{_datadir}/$system_dir/$file >> $locale_dir.list
|
||||||
|
echo %{_datadir}/$compat_dir/$file >> $locale_dir.list
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
if [ ! -z "$hyph_files" ]; then
|
}
|
||||||
cp -P `echo $hyph_files | tr '\n' ' '` %{buildroot}%{_datadir}/hyphen/
|
function install_doc_files
|
||||||
fi
|
{
|
||||||
if [ ! -z "$th_files" ]; then
|
locale_dir=$1
|
||||||
cp -P `echo $th_files | tr '\n' ' '` %{buildroot}%{_datadir}/mythes/
|
doc_files=$2
|
||||||
fi
|
|
||||||
install -m 755 -d %{buildroot}%{_docdir}/myspell-$dir
|
|
||||||
dos2unix -q $doc_files
|
dos2unix -q $doc_files
|
||||||
install -m 644 `echo $doc_files | tr '\n' ' '` %{buildroot}%{_docdir}/myspell-$dir
|
install -m 755 -d %{buildroot}%{_docdir}/myspell-$locale_dir
|
||||||
# create file list
|
install -m 644 `echo $doc_files | tr '\n' ' '` %{buildroot}%{_docdir}/myspell-$locale_dir
|
||||||
dic_files=`echo "$dic_files" | sed 's@^.*/@%{_datadir}/hunspell/@'`
|
echo "%{_docdir}/myspell-$locale_dir" >> $locale_dir.list
|
||||||
hyph_files=`echo "$hyph_files" | sed 's@^.*/@%{_datadir}/hyphen/@'`
|
}
|
||||||
th_files=`echo "$th_files" | sed 's@^.*/@%{_datadir}/mythes/@'`
|
dic_dir="hunspell"
|
||||||
echo '%%defattr(-,root,root,-)' > $dir.list
|
hyph_dir="hyphen"
|
||||||
echo "$dic_files" >> $dir.list
|
th_dir="mythes"
|
||||||
echo "$hyph_files" >> $dir.list
|
compat_dir="myspell"
|
||||||
echo "$th_files" >> $dir.list
|
for system_dir in $dic_dir $hyph_dir $th_dir $compat_dir; do
|
||||||
echo "%{_docdir}/myspell-$dir" >> $dir.list
|
install -m 755 -d %{buildroot}%{_datadir}/$system_dir/
|
||||||
|
done
|
||||||
|
for locale_dir in @LANG_DIRS@ ; do
|
||||||
|
pushd $locale_dir
|
||||||
|
dic_files=`find -maxdepth 1 -name '*.dic' -a ! -name 'hyph*' -o -name '*.aff'`
|
||||||
|
hyph_files=`find -maxdepth 1 -name 'hyph*.dic'`
|
||||||
|
th_files=`find -maxdepth 1 -name 'th*.dat'`
|
||||||
|
doc_files=`find -maxdepth 1 -type f | grep '.txt\|.xcu\|.xml\|.png\|.tex\|^[^.]*$' || true`
|
||||||
|
# install dictionary files
|
||||||
|
echo '%%defattr(-,root,root,-)' > $locale_dir.list
|
||||||
|
install_dictionary_files $locale_dir $dic_dir "$dic_files"
|
||||||
|
install_dictionary_files $locale_dir $hyph_dir "$hyph_files"
|
||||||
|
install_dictionary_files $locale_dir $th_dir "$th_files"
|
||||||
|
# install documentation
|
||||||
|
install_doc_files $locale_dir $doc_files
|
||||||
|
popd
|
||||||
|
mv $locale_dir/$locale_dir.list .
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
@ -224,6 +244,7 @@ done
|
|||||||
%dir %{_datadir}/hunspell/
|
%dir %{_datadir}/hunspell/
|
||||||
%dir %{_datadir}/hyphen/
|
%dir %{_datadir}/hyphen/
|
||||||
%dir %{_datadir}/mythes/
|
%dir %{_datadir}/mythes/
|
||||||
|
%dir %{_datadir}/myspell/
|
||||||
|
|
||||||
@FILES@
|
@FILES@
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# DOWNLOAD='no' when improving this script or spec.in
|
||||||
DOWNLOAD='yes'
|
DOWNLOAD='yes'
|
||||||
GIT_DIR='dictionaries'
|
GIT_DIR='dictionaries'
|
||||||
VERBOSE='no'
|
VERBOSE='no'
|
||||||
@ -106,7 +107,8 @@ if [ $DOWNLOAD == "yes" ]; then
|
|||||||
done
|
done
|
||||||
date=`date +%Y%m%d`
|
date=`date +%Y%m%d`
|
||||||
elif [ ! -e $GIT_DIR ]; then
|
elif [ ! -e $GIT_DIR ]; then
|
||||||
echo "ERROR: DOWNLOAD=$DOWNLOAD and $GIT_DIR doesn't exist"
|
echo "ERROR: DOWNLOAD=$DOWNLOAD and '$GIT_DIR' does not exist"
|
||||||
|
echo "Run quilt setup or so."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
date=`rpmspec -q --qf "%{VERSION}\n" *.spec | head -n 1`
|
date=`rpmspec -q --qf "%{VERSION}\n" *.spec | head -n 1`
|
||||||
|
Loading…
Reference in New Issue
Block a user