Hello community,

here is the log from the commit of package myspell-dictionaries for 
openSUSE:Factory checked in at 2014-06-02 07:00:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/myspell-dictionaries (Old)
 and      /work/SRC/openSUSE:Factory/.myspell-dictionaries.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "myspell-dictionaries"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/myspell-dictionaries/myspell-dictionaries.changes    
    2014-05-02 13:53:43.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.myspell-dictionaries.new/myspell-dictionaries.changes
   2014-06-02 07:00:12.000000000 +0200
@@ -1,0 +2,32 @@
+Tue May 20 14:15:52 UTC 2014 - [email protected]
+
+- Remove unzip buildrequire and add xz one.
+
+-------------------------------------------------------------------
+Tue May 13 09:05:03 UTC 2014 - [email protected]
+
+- always end thesaurus files with _v2
+
+-------------------------------------------------------------------
+Mon May 12 09:05:03 UTC 2014 - [email protected]
+
+- improve thesaurus link names
+
+-------------------------------------------------------------------
+Wed May  7 09:24:10 UTC 2014 - [email protected]
+
+- updated to 20140507
+  * fdo#73544 update catalan linguistic components
+- improve dictionary file names
+
+-------------------------------------------------------------------
+Tue May  6 15:22:09 UTC 2014 - [email protected]
+
+- generate and package *.idx files
+
+-------------------------------------------------------------------
+Mon May  5 14:21:37 UTC 2014 - [email protected]
+
+- package compat symlinks in /usr/share/myspell
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ myspell-dictionaries.spec ++++++
--- /var/tmp/diff_new_pack.ppMjJR/_old  2014-06-02 07:00:14.000000000 +0200
+++ /var/tmp/diff_new_pack.ppMjJR/_new  2014-06-02 07:00:14.000000000 +0200
@@ -21,7 +21,7 @@
 ## Generate: sh update.sh
 ###################################################################
 Name:           myspell-dictionaries
-Version:        20140417
+Version:        20140507
 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
@@ -29,8 +29,7 @@
 Url:            http://cgit.freedesktop.org/libreoffice/dictionaries/
 Source0:        dictionaries.tar.xz
 BuildRequires:  dos2unix
-BuildRequires:  recode
-BuildRequires:  unzip
+BuildRequires:  xz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildArch:      noarch
 Obsoletes:      libreoffice-hyphen
@@ -986,36 +985,55 @@
 %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
+      # 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' -o -name 'th*.idx'`
+  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 +1041,7 @@
 %dir %{_datadir}/hunspell/
 %dir %{_datadir}/hyphen/
 %dir %{_datadir}/mythes/
+%dir %{_datadir}/myspell/
 
 %files -n myspell-af_ZA -f af_ZA.list
 

++++++ dictionaries.tar.xz ++++++
/work/SRC/openSUSE:Factory/myspell-dictionaries/dictionaries.tar.xz 
/work/SRC/openSUSE:Factory/.myspell-dictionaries.new/dictionaries.tar.xz 
differ: char 27, line 1

++++++ myspell-dictionaries.spec.in ++++++
--- /var/tmp/diff_new_pack.ppMjJR/_old  2014-06-02 07:00:14.000000000 +0200
+++ /var/tmp/diff_new_pack.ppMjJR/_new  2014-06-02 07:00:14.000000000 +0200
@@ -28,8 +28,7 @@
 Url:            http://cgit.freedesktop.org/libreoffice/dictionaries/
 Source0:        dictionaries.tar.xz
 BuildRequires:  dos2unix
-BuildRequires:  recode
-BuildRequires:  unzip
+BuildRequires:  xz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildArch:      noarch
 Obsoletes:      myspell-african
@@ -186,36 +185,55 @@
 %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
+      # 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' -o -name 'th*.idx'`
+  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 +242,7 @@
 %dir %{_datadir}/hunspell/
 %dir %{_datadir}/hyphen/
 %dir %{_datadir}/mythes/
+%dir %{_datadir}/myspell/
 
 @FILES@
 %changelog

++++++ update.sh ++++++
--- /var/tmp/diff_new_pack.ppMjJR/_old  2014-06-02 07:00:14.000000000 +0200
+++ /var/tmp/diff_new_pack.ppMjJR/_new  2014-06-02 07:00:14.000000000 +0200
@@ -1,4 +1,5 @@
 #!/bin/bash
+# DOWNLOAD='no' when improving this script or spec.in
 DOWNLOAD='yes'
 GIT_DIR='dictionaries'
 VERBOSE='no'
@@ -50,11 +51,13 @@
 ["myspell-zu_ZA"]="myspell-zulu"
 )
 
+# directories under $GIT_DIR, which holds dictionaries
 function directories()
 {
   ls $GIT_DIR/*/dictionaries.xcu | sed -e 's:dictionaries/::' -e 
's:/dictionaries.xcu::' | tr '\n' ' '
 }
 
+# create central mapping dir <-> locales <-> files
 function locale_to_file_map()
 {
   cd $GIT_DIR
@@ -71,32 +74,61 @@
            echo $dir: $locs @ $files | tr '-' '_' >> locale_to_file_map.txt
          done
   done
+  # add idx files for every dat (where doesn't exist)
+  # we will generate them
+  sed -i '/\.idx/!s/\([^ ]*\)\.dat/\1.dat \1.idx/g' locale_to_file_map.txt
   cd ..
 }
 
+# for given dir: which locales provides
 function dir_locales()
 {
   dir=$1
   grep "^$dir:" $GIT_DIR/locale_to_file_map.txt | sed 's/.*: //' | sed 's/ 
@.*//' | tr ' ' '\n' | sort -u | tr '\n' ' '
 }
 
-function locale_files()
+# for given dir: which dictionary relevant files (dic, aff, th*, hyph*) 
provides
+function dir_files()
 {
-  loc=$1
-  grep $loc $GIT_DIR/locale_to_file_map.txt | sed 's:.*@ ::' | tr ' ' '\n' | 
sort -u | tr '\n' ' '
+  dir=$1
+  grep "$dir:" $GIT_DIR/locale_to_file_map.txt  | sed 's:.*@ ::' | tr ' ' '\n' 
| sort -u | tr '\n' ' '
+}
+
+# for given dictionary file: which locales provides
+function file_locales()
+{
+  file=$1
+  # there should be only one occurence of a file in locale_to_file_map.txt
+  grep $file $GIT_DIR/locale_to_file_map.txt | sed -e 's/.*: //' -e 's/@.*//'
 }
 
+# for given dir: description of the dictionary
 function description()
 {
   dir=$1
   grep  '<name lang="en.*">' dictionaries/$dir/description.xml | sed -e 
's:.*<name lang="en.*">::' -e 's:</name>.*::' | tr '\n' ' ' | sed 's:[ \t]*$::'
 }
 
+# all thesaurus dat files
+function dat_files()
+{
+  grep '\.dat' $GIT_DIR/locale_to_file_map.txt | sed 's:.* \([^ 
]\+\.dat\).*:\1:'
+}
+
+# for dat file return corresponding idx file name
+function idx_file()
+{
+  dat_file=$1
+  grep "$dat_file" $GIT_DIR/locale_to_file_map.txt | sed 's:.* \([^ 
]\+\.idx\).*:\1:'
+}
+
 #
-# download present git version, remove .git, unify layout
-# and create locale symlinks
+# prepare 'dictionaries' directory
 #
+
+# download present git version, remove .git, unify layout
 if [ $DOWNLOAD == "yes" ]; then 
+  echo '--- Download current git version'
   rm -rf $GIT_DIR
   git clone git://anongit.freedesktop.org/libreoffice/$GIT_DIR
   rm -rf $GIT_DIR/.git
@@ -106,55 +138,89 @@
   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
+  echo "--- Do not download, using '$GIT_DIR'"
   date=`rpmspec -q --qf "%{VERSION}\n" *.spec | head -n 1`
 fi
 
-#
 # create dir <-> locales <-> files mapping
 # in $GIT_DIR/locale_to_file_map.txt
-# 
 dirs=$(directories)
 [ "$VERBOSE" == "yes" ] && echo directiories: $dirs
 locale_to_file_map
 
+# create *.idx files from *.dat files
+echo '--- Creating idx files'
+if [ ! -x /usr/bin/th_gen_idx.pl ]; then
+  echo "ERROR: /usr/bin/th_gen_idx.pl not found"
+  echo "Install mythes-devel package."
+  exit 1
+fi
+for datf in $(dat_files); do
+  idxf=$(idx_file $datf)
+  [ "$VERBOSE" == "yes" ] && echo "th_gen_idx.pl < $GIT_DIR/$datf > 
$GIT_DIR/$idxf"
+  th_gen_idx.pl < $GIT_DIR/$datf > $GIT_DIR/$idxf
+  if [ $? -ne 0 ]; then
+    echo "ERROR: failed th_gen_idx.pl -o $GIT_DIR/$idxf < $GIT_DIR/$datf"
+    exit 1
+  fi
+done
+
+echo '--- Creating symlinks'
 # create symlinks in $GIT_DIR/$dir, e. g. es_GT -> es_ANY 
 for dir in $dirs; do
-  dir_locs=$(dir_locales $dir)
-  [ "$VERBOSE" == "yes" ] && echo "DICTIONARY: $dir ($dir_locs)"
-  for l in $dir_locs; do
-    loc_files=$(locale_files $l)
-    [ "$VERBOSE" == "yes" ] && echo " $l: $loc_files"
-    for f in $loc_files; do
-      f=`basename $f`
+  files=$(dir_files $dir)
+  [ "$VERBOSE" == "yes" ] && echo "DICTIONARY: $dir ($files)"
+  for file in $files; do
+    locales=$(file_locales $file)
+    [ "$VERBOSE" == "yes" ] && echo " $file: $locales"
+    for locale in $locales; do
+      fname=`basename $file`
+      # work around which is bug imho in dictionaries.xcu. 
+      # It references file that doesn't exist.
+      if [ ! -e "$GIT_DIR/$dir/$fname" ]; then
+        [ "$VERBOSE" == "yes" ] && echo "WARNING: $GIT_DIR/$dir/$f doesn't 
exist"
+        continue;
+      fi
+
       prefix=""
-      if [[ $f == hyph* ]] || [[ $f == th* ]]; then
+      version=""
+      if [[ $fname == th* ]]; then
         # nice collision with th_ for thesaurus
-        if [ "$f" != "th_TH.aff" ] && [ "$f" != "th_TH.dic" ]; then
-          prefix=`echo $f | sed 's:_.*:_:'`
+        if [ "$fname" != "th_TH.aff" ] && [ "$fname" != "th_TH.dic" ]; then
+          prefix="th_"
+          # it seems suffix have to be _v2, even if target is named _v3 :)
+          version='_v2'
         fi
       fi
-      #echo FILE: $f
-      ext=`echo $f | sed 's:.*\.::'`
-      # file or link for this locale/extension exist yet, do not create symlink
-      if ls $GIT_DIR/$dir/$prefix*$l*.$ext &> /dev/null; then
-        continue;
+      if [[ $fname == hyph* ]]; then
+        prefix="hyph_"
       fi
-      # work around which is bug imho in dictionaries.xcu. 
-      # It references file that doesn't exist.
-      if [ ! -e "$GIT_DIR/$dir/$f" ]; then
+      ext=`echo $fname | sed 's:.*\.::'`
+      linkname=$prefix$locale$version.$ext
+
+      [ "$VERBOSE" == "yes" ] && echo -n " link: $linkname -> $fname .. "
+
+      # regular file or link for this locale/extension exist yet, 
+      # do not create symlink
+      if ls $GIT_DIR/$dir/$linkname &> /dev/null; then
+         [ "$VERBOSE" == "yes" ] && echo "regular file or link exists yet"
         continue;
       fi
-      linkname=$prefix$l.$ext
-      ln -sf $f $GIT_DIR/$dir/$linkname
+
+      ln -sf $fname $GIT_DIR/$dir/$linkname
+       [ "$VERBOSE" == "yes" ] && echo "created"
     done
   done
 done
+
 #
 # generate myspell-dictionaries.spec
 #
+echo '--- Generating spec file'
 cp myspell-dictionaries.spec.in myspell-dictionaries.spec
 
 sed -i "s:@DO_NOT_EDIT_COMMENT@:DO NOT EDIT THIS SPEC FILE:" 
myspell-dictionaries.spec
@@ -194,10 +260,13 @@
 #
 # creating source archive
 #
-[ $DOWNLOAD == "yes" ] && tar cJf dictionaries.tar.xz dictionaries
-[ $DOWNLOAD == "yes" ] && rm -r dictionaries
+if [ $DOWNLOAD == "yes" ]; then
+  echo '--- Creating archive'
+  tar cJf dictionaries.tar.xz dictionaries
+  rm -r dictionaries
+fi
 
-echo OK
+echo --- Done
 
 #
 # advice at the end ..

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to