diff --git a/dictionaries.tar.xz b/dictionaries.tar.xz index c808e60..e0af95a 100644 --- a/dictionaries.tar.xz +++ b/dictionaries.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:608d8ab6b45d05fd5f5964821fc938c6a042e6136adac8a5d9cb02120f2c5dc8 -size 40660164 +oid sha256:fb2a0313dba8b7e52c99d69d9ab87a583b6380ddb56d43751881acd6e5cd0cb0 +size 40752304 diff --git a/myspell-dictionaries.changes b/myspell-dictionaries.changes index 55b9fcb..36567be 100644 --- a/myspell-dictionaries.changes +++ b/myspell-dictionaries.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Fri Jan 30 09:24:32 UTC 2015 - pgajdos@suse.com + +- git state 20150130 +- fixed [bnc#914911]: + * gl: fixed dangling symlinks when gl_ES not installed + * de: _frami dropped from dictionaries name, + removed hyph_de.dic, th_de_v2.dat, th_de_v2.idx links from + myspell-de main language package (dangling when no + variant is installed) + * en: introduced dependenciencies between language subpackages + to not have dangling symlinks: + - all variants depends on en_US variant + - all except en_PH depends on en_GB + - en_MW, en_NA and en_ZW variants depends on en_ZA + * ca: ca-valencia.{dic,aff} regular files moved to + myspell-ca_ES_valencia + ------------------------------------------------------------------- Fri Dec 19 08:32:12 UTC 2014 - pgajdos@suse.com diff --git a/myspell-dictionaries.spec b/myspell-dictionaries.spec index 71e9b77..1579d2f 100644 --- a/myspell-dictionaries.spec +++ b/myspell-dictionaries.spec @@ -1,7 +1,7 @@ # # spec file for package myspell-dictionaries # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,7 +21,7 @@ ## Generate: sh update.sh ################################################################### Name: myspell-dictionaries -Version: 20141215 +Version: 20150130 Release: 0 Summary: A Source Package for Dictionaries Used by MySpell License: AGPL-3.0 and BSD-2-Clause and BSD-3-Clause and BSD-4-Clause and CC-BY-SA-1.0 and CC-BY-SA-3.0 and GFDL-1.1 and GPL-2.0 and GPL-2.0+ and GPL-3.0 and GPL-3.0+ and LGPL-2.0 and LGPL-2.1 and LGPL-2.1+ and LGPL-3.0 and LGPL-3.0+ and MPL-1.1 @@ -1661,6 +1661,7 @@ Requires: myspell-dictionaries Provides: myspell-dictionary Provides: locale(libreoffice:no) Provides: locale(seamonkey-spellchecker:no) +Recommends: myspell-nb_NO BuildArch: noarch %description -n myspell-no @@ -1779,6 +1780,7 @@ Provides: myspell-dictionary Provides: myspell-romanian Provides: locale(libreoffice:ro) Provides: locale(seamonkey-spellchecker:ro) +Recommends: myspell-ro_RO BuildArch: noarch %description -n myspell-ro @@ -2026,6 +2028,7 @@ Provides: myspell-dictionary Provides: myspell-vietnamese Provides: locale(libreoffice:vi) Provides: locale(seamonkey-spellchecker:vi) +Recommends: myspell-vi_VN BuildArch: noarch %description -n myspell-vi @@ -2325,14 +2328,10 @@ ln -s /usr/share/hunspell/ca.dic %{buildroot}/usr/share/hunspell/ca_IT.dic ln -s /usr/share/hunspell/ca_IT.dic %{buildroot}/usr/share/myspell/ca_IT.dic cp -P ca/ca.dic %{buildroot}/usr/share/hunspell/ca.dic ln -s /usr/share/hunspell/ca.dic %{buildroot}/usr/share/myspell/ca.dic -ln -s /usr/share/hunspell/ca-valencia.aff %{buildroot}/usr/share/hunspell/ca_ES_valencia.aff +cp -P ca/ca_ES_valencia.aff %{buildroot}/usr/share/hunspell/ca_ES_valencia.aff ln -s /usr/share/hunspell/ca_ES_valencia.aff %{buildroot}/usr/share/myspell/ca_ES_valencia.aff -cp -P ca/ca-valencia.aff %{buildroot}/usr/share/hunspell/ca-valencia.aff -ln -s /usr/share/hunspell/ca-valencia.aff %{buildroot}/usr/share/myspell/ca-valencia.aff -ln -s /usr/share/hunspell/ca-valencia.dic %{buildroot}/usr/share/hunspell/ca_ES_valencia.dic +cp -P ca/ca_ES_valencia.dic %{buildroot}/usr/share/hunspell/ca_ES_valencia.dic ln -s /usr/share/hunspell/ca_ES_valencia.dic %{buildroot}/usr/share/myspell/ca_ES_valencia.dic -cp -P ca/ca-valencia.dic %{buildroot}/usr/share/hunspell/ca-valencia.dic -ln -s /usr/share/hunspell/ca-valencia.dic %{buildroot}/usr/share/myspell/ca-valencia.dic ln -s /usr/share/hyphen/hyph_ca.dic %{buildroot}/usr/share/hyphen/hyph_ca_ES.dic ln -s /usr/share/hyphen/hyph_ca_ES.dic %{buildroot}/usr/share/myspell/hyph_ca_ES.dic ln -s /usr/share/hyphen/hyph_ca.dic %{buildroot}/usr/share/hyphen/hyph_ca_ES_valencia.dic @@ -2423,50 +2422,32 @@ cp -P da_DK/desc_da_DK.txt %{buildroot}/usr/share/doc/packages/myspell-da_DK/des cp -P da_DK/th_desc_en_US.txt %{buildroot}/usr/share/doc/packages/myspell-da_DK/th_desc_en_US.txt cp -P da_DK/dictionaries.xcu %{buildroot}/usr/share/doc/packages/myspell-da_DK/dictionaries.xcu cp -P da_DK/Trold_42x42.png %{buildroot}/usr/share/doc/packages/myspell-da_DK/Trold_42x42.png -ln -s /usr/share/hunspell/de_AT_frami.aff %{buildroot}/usr/share/hunspell/de_AT.aff +cp -P de/de_AT.aff %{buildroot}/usr/share/hunspell/de_AT.aff ln -s /usr/share/hunspell/de_AT.aff %{buildroot}/usr/share/myspell/de_AT.aff -cp -P de/de_AT_frami.aff %{buildroot}/usr/share/hunspell/de_AT_frami.aff -ln -s /usr/share/hunspell/de_AT_frami.aff %{buildroot}/usr/share/myspell/de_AT_frami.aff -ln -s /usr/share/hunspell/de_AT_frami.dic %{buildroot}/usr/share/hunspell/de_AT.dic +cp -P de/de_AT.dic %{buildroot}/usr/share/hunspell/de_AT.dic ln -s /usr/share/hunspell/de_AT.dic %{buildroot}/usr/share/myspell/de_AT.dic -cp -P de/de_AT_frami.dic %{buildroot}/usr/share/hunspell/de_AT_frami.dic -ln -s /usr/share/hunspell/de_AT_frami.dic %{buildroot}/usr/share/myspell/de_AT_frami.dic -ln -s /usr/share/hunspell/de_CH_frami.aff %{buildroot}/usr/share/hunspell/de_CH.aff +cp -P de/de_CH.aff %{buildroot}/usr/share/hunspell/de_CH.aff ln -s /usr/share/hunspell/de_CH.aff %{buildroot}/usr/share/myspell/de_CH.aff -cp -P de/de_CH_frami.aff %{buildroot}/usr/share/hunspell/de_CH_frami.aff -ln -s /usr/share/hunspell/de_CH_frami.aff %{buildroot}/usr/share/myspell/de_CH_frami.aff -ln -s /usr/share/hunspell/de_CH_frami.dic %{buildroot}/usr/share/hunspell/de_CH.dic +cp -P de/de_CH.dic %{buildroot}/usr/share/hunspell/de_CH.dic ln -s /usr/share/hunspell/de_CH.dic %{buildroot}/usr/share/myspell/de_CH.dic -cp -P de/de_CH_frami.dic %{buildroot}/usr/share/hunspell/de_CH_frami.dic -ln -s /usr/share/hunspell/de_CH_frami.dic %{buildroot}/usr/share/myspell/de_CH_frami.dic -ln -s /usr/share/hunspell/de_DE_frami.aff %{buildroot}/usr/share/hunspell/de_DE.aff +cp -P de/de_DE.aff %{buildroot}/usr/share/hunspell/de_DE.aff ln -s /usr/share/hunspell/de_DE.aff %{buildroot}/usr/share/myspell/de_DE.aff -cp -P de/de_DE_frami.aff %{buildroot}/usr/share/hunspell/de_DE_frami.aff -ln -s /usr/share/hunspell/de_DE_frami.aff %{buildroot}/usr/share/myspell/de_DE_frami.aff -ln -s /usr/share/hunspell/de_DE_frami.dic %{buildroot}/usr/share/hunspell/de_DE.dic +cp -P de/de_DE.dic %{buildroot}/usr/share/hunspell/de_DE.dic ln -s /usr/share/hunspell/de_DE.dic %{buildroot}/usr/share/myspell/de_DE.dic -cp -P de/de_DE_frami.dic %{buildroot}/usr/share/hunspell/de_DE_frami.dic -ln -s /usr/share/hunspell/de_DE_frami.dic %{buildroot}/usr/share/myspell/de_DE_frami.dic cp -P de/hyph_de_AT.dic %{buildroot}/usr/share/hyphen/hyph_de_AT.dic ln -s /usr/share/hyphen/hyph_de_AT.dic %{buildroot}/usr/share/myspell/hyph_de_AT.dic cp -P de/hyph_de_CH.dic %{buildroot}/usr/share/hyphen/hyph_de_CH.dic ln -s /usr/share/hyphen/hyph_de_CH.dic %{buildroot}/usr/share/myspell/hyph_de_CH.dic -ln -s /usr/share/hyphen/hyph_de_DE.dic %{buildroot}/usr/share/hyphen/hyph_de.dic -ln -s /usr/share/hyphen/hyph_de.dic %{buildroot}/usr/share/myspell/hyph_de.dic cp -P de/hyph_de_DE.dic %{buildroot}/usr/share/hyphen/hyph_de_DE.dic ln -s /usr/share/hyphen/hyph_de_DE.dic %{buildroot}/usr/share/myspell/hyph_de_DE.dic cp -P de/th_de_CH_v2.dat %{buildroot}/usr/share/mythes/th_de_CH_v2.dat ln -s /usr/share/mythes/th_de_CH_v2.dat %{buildroot}/usr/share/myspell/th_de_CH_v2.dat cp -P de/th_de_CH_v2.idx %{buildroot}/usr/share/mythes/th_de_CH_v2.idx ln -s /usr/share/mythes/th_de_CH_v2.idx %{buildroot}/usr/share/myspell/th_de_CH_v2.idx -ln -s /usr/share/mythes/th_de_DE_v2.dat %{buildroot}/usr/share/mythes/th_de_v2.dat -ln -s /usr/share/mythes/th_de_v2.dat %{buildroot}/usr/share/myspell/th_de_v2.dat cp -P de/th_de_DE_v2.dat %{buildroot}/usr/share/mythes/th_de_DE_v2.dat ln -s /usr/share/mythes/th_de_DE_v2.dat %{buildroot}/usr/share/myspell/th_de_DE_v2.dat ln -s /usr/share/mythes/th_de_DE_v2.dat %{buildroot}/usr/share/mythes/th_de_AT_v2.dat ln -s /usr/share/mythes/th_de_AT_v2.dat %{buildroot}/usr/share/myspell/th_de_AT_v2.dat -ln -s /usr/share/mythes/th_de_DE_v2.idx %{buildroot}/usr/share/mythes/th_de_v2.idx -ln -s /usr/share/mythes/th_de_v2.idx %{buildroot}/usr/share/myspell/th_de_v2.idx cp -P de/th_de_DE_v2.idx %{buildroot}/usr/share/mythes/th_de_DE_v2.idx ln -s /usr/share/mythes/th_de_DE_v2.idx %{buildroot}/usr/share/myspell/th_de_DE_v2.idx ln -s /usr/share/mythes/th_de_DE_v2.idx %{buildroot}/usr/share/mythes/th_de_AT_v2.idx @@ -3006,14 +2987,14 @@ cp -P gd_GB/README_gd_GB.txt %{buildroot}/usr/share/doc/packages/myspell-gd_GB/R cp -P gd_GB/LICENSES-en.txt %{buildroot}/usr/share/doc/packages/myspell-gd_GB/LICENSES-en.txt cp -P gd_GB/description.xml %{buildroot}/usr/share/doc/packages/myspell-gd_GB/description.xml cp -P gd_GB/dictionaries.xcu %{buildroot}/usr/share/doc/packages/myspell-gd_GB/dictionaries.xcu -ln -s /usr/share/hunspell/gl_ES.aff %{buildroot}/usr/share/hunspell/gl.aff -ln -s /usr/share/hunspell/gl.aff %{buildroot}/usr/share/myspell/gl.aff -cp -P gl/gl_ES.aff %{buildroot}/usr/share/hunspell/gl_ES.aff +ln -s /usr/share/hunspell/gl.aff %{buildroot}/usr/share/hunspell/gl_ES.aff ln -s /usr/share/hunspell/gl_ES.aff %{buildroot}/usr/share/myspell/gl_ES.aff -ln -s /usr/share/hunspell/gl_ES.dic %{buildroot}/usr/share/hunspell/gl.dic -ln -s /usr/share/hunspell/gl.dic %{buildroot}/usr/share/myspell/gl.dic -cp -P gl/gl_ES.dic %{buildroot}/usr/share/hunspell/gl_ES.dic +cp -P gl/gl.aff %{buildroot}/usr/share/hunspell/gl.aff +ln -s /usr/share/hunspell/gl.aff %{buildroot}/usr/share/myspell/gl.aff +ln -s /usr/share/hunspell/gl.dic %{buildroot}/usr/share/hunspell/gl_ES.dic ln -s /usr/share/hunspell/gl_ES.dic %{buildroot}/usr/share/myspell/gl_ES.dic +cp -P gl/gl.dic %{buildroot}/usr/share/hunspell/gl.dic +ln -s /usr/share/hunspell/gl.dic %{buildroot}/usr/share/myspell/gl.dic ln -s /usr/share/hyphen/hyph_gl.dic %{buildroot}/usr/share/hyphen/hyph_gl_ES.dic ln -s /usr/share/hyphen/hyph_gl_ES.dic %{buildroot}/usr/share/myspell/hyph_gl_ES.dic cp -P gl/hyph_gl.dic %{buildroot}/usr/share/hyphen/hyph_gl.dic @@ -3944,10 +3925,6 @@ cp -P zu_ZA/dictionaries.xcu %{buildroot}/usr/share/doc/packages/myspell-zu_ZA/d /usr/share/myspell/ca.aff /usr/share/hunspell/ca.dic /usr/share/myspell/ca.dic -/usr/share/hunspell/ca-valencia.aff -/usr/share/myspell/ca-valencia.aff -/usr/share/hunspell/ca-valencia.dic -/usr/share/myspell/ca-valencia.dic /usr/share/hyphen/hyph_ca.dic /usr/share/myspell/hyph_ca.dic /usr/share/mythes/th_ca_ES_v3.dat @@ -4056,24 +4033,6 @@ cp -P zu_ZA/dictionaries.xcu %{buildroot}/usr/share/doc/packages/myspell-zu_ZA/d %files -n myspell-de %defattr(-,root,root,-) -/usr/share/hunspell/de_AT_frami.aff -/usr/share/myspell/de_AT_frami.aff -/usr/share/hunspell/de_AT_frami.dic -/usr/share/myspell/de_AT_frami.dic -/usr/share/hunspell/de_CH_frami.aff -/usr/share/myspell/de_CH_frami.aff -/usr/share/hunspell/de_CH_frami.dic -/usr/share/myspell/de_CH_frami.dic -/usr/share/hunspell/de_DE_frami.aff -/usr/share/myspell/de_DE_frami.aff -/usr/share/hunspell/de_DE_frami.dic -/usr/share/myspell/de_DE_frami.dic -/usr/share/hyphen/hyph_de.dic -/usr/share/myspell/hyph_de.dic -/usr/share/mythes/th_de_v2.dat -/usr/share/myspell/th_de_v2.dat -/usr/share/mythes/th_de_v2.idx -/usr/share/myspell/th_de_v2.idx %dir /usr/share/doc/packages/myspell-de /usr/share/doc/packages/myspell-de/COPYING_LGPL_v2.1.txt /usr/share/doc/packages/myspell-de/README_extension_owner.txt diff --git a/update.sh b/update.sh index fae5880..630fb81 100644 --- a/update.sh +++ b/update.sh @@ -92,6 +92,9 @@ declare -A recommends_map=( ["myspell-de"]="myspell-de_DE" ["myspell-en"]="myspell-en_US" ["myspell-es"]="myspell-es_ES" +["myspell-ro"]="myspell-ro_RO" +["myspell-no"]="myspell-nb_NO" +["myspell-vi"]="myspell-vi_VN" ) # directories under $GIT_DIR, which holds dictionaries @@ -247,6 +250,7 @@ function package_metadata() { locale=$1 dir=$2 + requires=$3 desc=$(description $dir) sum="MySpell $locale Dictionary" @@ -261,9 +265,13 @@ function package_metadata() sed -i "s#@METADATA@#Provides: $p\n@METADATA@#" myspell-dictionaries.spec done if [ "$locale" != "$dir" ]; then - # require main language subpackage + # require main language subpackage; note that e. g. myspell-te_IN is main language package + # and myspell-te is language subpackage; drawback of splitting sed -i "s#@METADATA@#Requires: myspell-$dir\n@METADATA@#" myspell-dictionaries.spec fi + for req in $requires; do + sed -i "s#@METADATA@#Requires: myspell-$req\n@METADATA@#" myspell-dictionaries.spec + done for p in ${recommends_map["myspell-$locale"]}; do sed -i "s#@METADATA@#Recommends: $p\n@METADATA@#" myspell-dictionaries.spec done @@ -309,10 +317,44 @@ if [ $DOWNLOAD == "yes" ]; then rm -rf $GIT_DIR git clone git://anongit.freedesktop.org/libreoffice/$GIT_DIR rm -rf $GIT_DIR/.git - for dir in ca gd_GB; do - cp --force $GIT_DIR/$dir/dictionaries/* dictionaries/$dir - sed -i 's:dictionaries/::' dictionaries/$dir/dictionaries.xcu - done + # exceptions >>>>>>>>>>>>>>>>>>>>> + pushd $GIT_DIR + for dir in ca gd_GB; do + pushd $dir + cp --force dictionaries/* . + sed -i 's:dictionaries/::' dictionaries.xcu + popd + done + # bug 914911 comment 10 --- + # - gl: consistent file naming + pushd gl + for ext in aff dic; do + mv gl_ES.$ext gl.$ext + sed -i "s:gl_ES.$ext:gl.$ext:" dictionaries.xcu + done + popd + # - de: remove _frami from filenames + pushd de + for var in AT CH DE; do + for ext in aff dic; do + mv de_${var}_frami.$ext de_${var}.$ext + sed -i "s:de_${var}_frami.$ext:de_${var}.$ext:" dictionaries.xcu + done + done + # remove hyph_de.dic, th_de_v2.dat, th_de_v2.idx links to + # hyph_de_DE.dic, th_de_DE_v2.dat, th_de_DE_v2.idx + sed -i 's:>de :>:' dictionaries.xcu + popd + # -ca: rename ca-valencia.{aff,dic} to ca_ES_valencia.{aff,dic} + pushd ca + for ext in aff dic; do + mv ca-valencia.$ext ca_ES_valencia.$ext + sed -i "s:ca-valencia.$ext:ca_ES_valencia.$ext:" dictionaries.xcu + done + popd + # ------------------------- + popd + # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> date=`date +%Y%m%d` elif [ ! -e $GIT_DIR ]; then echo "ERROR: DOWNLOAD=$DOWNLOAD and '$GIT_DIR' does not exist" @@ -373,12 +415,14 @@ for dir in $dirs; do # clear and declare filelist associative array unset filelist declare -A filelist + declare -A requires [ "$VERBOSE" == "yes" ] && echo "DICTIONARY: $dir ($files)" for file in $files; do file_into_main_package=1 fname=`basename $file` locales=$(file_locales $file) + file_lang_package="" [ "$VERBOSE" == "yes" ] && echo " $file: $locales" for locale in $locales; do # work around which is bug imho in dictionaries.xcu. @@ -415,6 +459,10 @@ for dir in $dirs; do # if not, it will be installed later (search for ***) if [ "$locale" != "$dir" ]; then file_into_main_package=0 + # bug 914911 comment 10 + # the assumption is, that locale for regular file + # is listed first in @ dictionaries.xcu + reg_file_locale="$locale" ipath=$(install_path $linkname) [ "$VERBOSE" == "yes" ] && echo " install: $ipath (myspell-dictionaries-$locale)" @@ -434,12 +482,22 @@ for dir in $dirs; do lipath=$(install_path $linkname) ripath=$(install_path $fname) [ "$VERBOSE" == "yes" ] && - echo " link install: $ipath (myspell-dictionaries-$locale)" + echo " link install: $lipath -> $ripath (myspell-dictionaries-$locale)" install_link $ripath $lipath + # bug 914911 comment 10 + # the assumption is, that locale for regular file + # is listed first in @ dictionaries.xcu + if [ ! -z "$reg_file_locale" ]; then + if ! [[ ${requires[$locale]} =~ $file_lang_package ]]; then + [ "$VERBOSE" == "yes" ] && + echo " => myspell-$locale depends on myspell-$file_lang_package" + requires[$locale]="${requires[$locale]} $file_lang_package" + fi + fi filelist[$locale]="${filelist[$locale]} $lipath" compat_link=$DATADIR/$COMPAT_DIR/$linkname [ "$VERBOSE" == "yes" ] && - echo " compat link install: $compat_link -> $ipath" + echo " compat link install: $compat_link -> $lipath" install_link $lipath "$compat_link" filelist[$locale]="${filelist[$locale]} $compat_link" done @@ -486,7 +544,7 @@ for dir in $dirs; do # write rpm subpackage information for pkg in "${!filelist[@]}"; do - package_metadata $pkg $dir + package_metadata $pkg $dir "${requires[$pkg]}" package_files myspell-$pkg "${filelist[$pkg]}" done if have_lightproof $dir; then