- 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
|
||||
|
||||
|
@ -986,36 +986,56 @@ Zulu hyphenation rules.
|
||||
%build
|
||||
|
||||
%install
|
||||
install -m 755 -d %{buildroot}%{_datadir}/hunspell/
|
||||
install -m 755 -d %{buildroot}%{_datadir}/hyphen/
|
||||
install -m 755 -d %{buildroot}%{_datadir}/mythes/
|
||||
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
|
||||
# install files
|
||||
dic_files=`find $dir -maxdepth 1 -name '*.dic' -a ! -name 'hyph*' -o -name '*.aff'`
|
||||
hyph_files=`find $dir -maxdepth 1 -name 'hyph*.dic'`
|
||||
th_files=`find $dir -maxdepth 1 -name 'th*.dat'`
|
||||
doc_files=`find $dir -maxdepth 1 -type f | grep '.txt\|.xcu\|.xml\|.png\|.tex\|^[^.]*$' || true`
|
||||
if [ ! -z "$dic_files" ]; then # see zu_ZA
|
||||
cp -P `echo $dic_files | tr '\n' ' '` %{buildroot}%{_datadir}/hunspell/
|
||||
function install_dictionary_files
|
||||
{
|
||||
locale_dir=$1
|
||||
system_dir=$2
|
||||
files=$3
|
||||
|
||||
if [ ! -z "$files" ]; then
|
||||
for file in $files; do
|
||||
echo "LOCALE: $locale_dir SYSTEM_DIR: $system_dir FILE: $file"
|
||||
# install file
|
||||
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
|
||||
if [ ! -z "$hyph_files" ]; then
|
||||
cp -P `echo $hyph_files | tr '\n' ' '` %{buildroot}%{_datadir}/hyphen/
|
||||
fi
|
||||
if [ ! -z "$th_files" ]; then
|
||||
cp -P `echo $th_files | tr '\n' ' '` %{buildroot}%{_datadir}/mythes/
|
||||
fi
|
||||
install -m 755 -d %{buildroot}%{_docdir}/myspell-$dir
|
||||
}
|
||||
function install_doc_files
|
||||
{
|
||||
locale_dir=$1
|
||||
doc_files=$2
|
||||
dos2unix -q $doc_files
|
||||
install -m 644 `echo $doc_files | tr '\n' ' '` %{buildroot}%{_docdir}/myspell-$dir
|
||||
# create file list
|
||||
dic_files=`echo "$dic_files" | sed 's@^.*/@%{_datadir}/hunspell/@'`
|
||||
hyph_files=`echo "$hyph_files" | sed 's@^.*/@%{_datadir}/hyphen/@'`
|
||||
th_files=`echo "$th_files" | sed 's@^.*/@%{_datadir}/mythes/@'`
|
||||
echo '%%defattr(-,root,root,-)' > $dir.list
|
||||
echo "$dic_files" >> $dir.list
|
||||
echo "$hyph_files" >> $dir.list
|
||||
echo "$th_files" >> $dir.list
|
||||
echo "%{_docdir}/myspell-$dir" >> $dir.list
|
||||
install -m 755 -d %{buildroot}%{_docdir}/myspell-$locale_dir
|
||||
install -m 644 `echo $doc_files | tr '\n' ' '` %{buildroot}%{_docdir}/myspell-$locale_dir
|
||||
echo "%{_docdir}/myspell-$locale_dir" >> $locale_dir.list
|
||||
}
|
||||
dic_dir="hunspell"
|
||||
hyph_dir="hyphen"
|
||||
th_dir="mythes"
|
||||
compat_dir="myspell"
|
||||
for system_dir in $dic_dir $hyph_dir $th_dir $compat_dir; do
|
||||
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
|
||||
|
||||
%files
|
||||
@ -1023,6 +1043,7 @@ done
|
||||
%dir %{_datadir}/hunspell/
|
||||
%dir %{_datadir}/hyphen/
|
||||
%dir %{_datadir}/mythes/
|
||||
%dir %{_datadir}/myspell/
|
||||
|
||||
%files -n myspell-af_ZA -f af_ZA.list
|
||||
|
||||
|
@ -186,36 +186,56 @@ the Mozilla Composer, and the Mozilla Mail message composition window.
|
||||
%build
|
||||
|
||||
%install
|
||||
install -m 755 -d %{buildroot}%{_datadir}/hunspell/
|
||||
install -m 755 -d %{buildroot}%{_datadir}/hyphen/
|
||||
install -m 755 -d %{buildroot}%{_datadir}/mythes/
|
||||
for dir in @LANG_DIRS@ ; do
|
||||
# install files
|
||||
dic_files=`find $dir -maxdepth 1 -name '*.dic' -a ! -name 'hyph*' -o -name '*.aff'`
|
||||
hyph_files=`find $dir -maxdepth 1 -name 'hyph*.dic'`
|
||||
th_files=`find $dir -maxdepth 1 -name 'th*.dat'`
|
||||
doc_files=`find $dir -maxdepth 1 -type f | grep '.txt\|.xcu\|.xml\|.png\|.tex\|^[^.]*$' || true`
|
||||
if [ ! -z "$dic_files" ]; then # see zu_ZA
|
||||
cp -P `echo $dic_files | tr '\n' ' '` %{buildroot}%{_datadir}/hunspell/
|
||||
function install_dictionary_files
|
||||
{
|
||||
locale_dir=$1
|
||||
system_dir=$2
|
||||
files=$3
|
||||
|
||||
if [ ! -z "$files" ]; then
|
||||
for file in $files; do
|
||||
echo "LOCALE: $locale_dir SYSTEM_DIR: $system_dir FILE: $file"
|
||||
# install file
|
||||
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
|
||||
if [ ! -z "$hyph_files" ]; then
|
||||
cp -P `echo $hyph_files | tr '\n' ' '` %{buildroot}%{_datadir}/hyphen/
|
||||
fi
|
||||
if [ ! -z "$th_files" ]; then
|
||||
cp -P `echo $th_files | tr '\n' ' '` %{buildroot}%{_datadir}/mythes/
|
||||
fi
|
||||
install -m 755 -d %{buildroot}%{_docdir}/myspell-$dir
|
||||
}
|
||||
function install_doc_files
|
||||
{
|
||||
locale_dir=$1
|
||||
doc_files=$2
|
||||
dos2unix -q $doc_files
|
||||
install -m 644 `echo $doc_files | tr '\n' ' '` %{buildroot}%{_docdir}/myspell-$dir
|
||||
# create file list
|
||||
dic_files=`echo "$dic_files" | sed 's@^.*/@%{_datadir}/hunspell/@'`
|
||||
hyph_files=`echo "$hyph_files" | sed 's@^.*/@%{_datadir}/hyphen/@'`
|
||||
th_files=`echo "$th_files" | sed 's@^.*/@%{_datadir}/mythes/@'`
|
||||
echo '%%defattr(-,root,root,-)' > $dir.list
|
||||
echo "$dic_files" >> $dir.list
|
||||
echo "$hyph_files" >> $dir.list
|
||||
echo "$th_files" >> $dir.list
|
||||
echo "%{_docdir}/myspell-$dir" >> $dir.list
|
||||
install -m 755 -d %{buildroot}%{_docdir}/myspell-$locale_dir
|
||||
install -m 644 `echo $doc_files | tr '\n' ' '` %{buildroot}%{_docdir}/myspell-$locale_dir
|
||||
echo "%{_docdir}/myspell-$locale_dir" >> $locale_dir.list
|
||||
}
|
||||
dic_dir="hunspell"
|
||||
hyph_dir="hyphen"
|
||||
th_dir="mythes"
|
||||
compat_dir="myspell"
|
||||
for system_dir in $dic_dir $hyph_dir $th_dir $compat_dir; do
|
||||
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
|
||||
|
||||
|
||||
@ -224,6 +244,7 @@ done
|
||||
%dir %{_datadir}/hunspell/
|
||||
%dir %{_datadir}/hyphen/
|
||||
%dir %{_datadir}/mythes/
|
||||
%dir %{_datadir}/myspell/
|
||||
|
||||
@FILES@
|
||||
%changelog
|
||||
|
@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
# DOWNLOAD='no' when improving this script or spec.in
|
||||
DOWNLOAD='yes'
|
||||
GIT_DIR='dictionaries'
|
||||
VERBOSE='no'
|
||||
@ -106,7 +107,8 @@ if [ $DOWNLOAD == "yes" ]; then
|
||||
done
|
||||
date=`date +%Y%m%d`
|
||||
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
|
||||
else
|
||||
date=`rpmspec -q --qf "%{VERSION}\n" *.spec | head -n 1`
|
||||
|
Loading…
Reference in New Issue
Block a user