[Lunar-commits] CVS: moonbase/zbeta/openoffice-dicts BUILD, NONE, 1.1 CONFIGURE, NONE, 1.1 DETAILS, NONE, 1.1 PRE_BUILD, NONE, 1.1

Jerry Lundström prox at lunar-linux.org
Tue Aug 24 12:57:57 GMT 2004


Update of /var/cvs/lunar/moonbase/zbeta/openoffice-dicts
In directory dbguin.lunar-linux.org:/tmp/cvs-serv8981

Added Files:
	BUILD CONFIGURE DETAILS PRE_BUILD 
Log Message:
module to download and install dictionaries, not complete

--- NEW FILE: BUILD ---
(
  BASE_URL="http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries"
  OOO_BIN_PATH=/opt/lunar/openoffice/share/dict/ooo
  OOO_SRC_PATH=/usr/lib/ooo-`lvu installed openoffice-src`/share/dict/ooo
  OOO_PATH=

  if module_installed openoffice-bin; then
    OOO_PATH=$OOO_BIN_PATH
  fi
  if module_installed openoffice-src; then
    OOO_PATH=$OOO_SRC_PATH
  fi

  if [ -z "$OOO_PATH" ]; then
    message "Didn't find openoffice installed, sorry"
    exit 1
  fi

  message "Getting available dictionaries lists"

  call_wget $BASE_URL/available.lst &&
  call_wget $BASE_URL/hyphavail.lst &&
  call_wget $BASE_URL/thesavail.lst &&

  message "Downloading dictionaries"

  cat available.lst hyphavail.lst thesavail.lst |
    while IFS=, read lang country code text file;
  do
    if $(echo "$code" | grep -Eq "^${lang}_"); then
      echo "DICT $lang $country $code" >> "${lang}_${country}"
    fi

    if $(echo "$code" | grep -Eq "^hyph_${lang}_"); then
      echo "HYPH $lang $country $code" >> "${lang}_${country}"
    fi

    if $(echo "$code" | grep -Eq "^th_${lang}_"); then
      echo "THES $lang $country $code" >> "${lang}_${country}"
    fi

    echo "$file" >> "${lang}_${country}.file"
  done

  # build a numbered list to display
  rm -f the.list the.list.text
  i=0
  cat available.lst hyphavail.lst thesavail.lst | sed -re 's%^([^,]+),([^,]+),[^,]+,([^,]+),.*%\1,\2,\3%' |
    sort -t ',' -k 3 -u | while IFS=, read lang country text;
  do
    echo "$i,${lang}_${country}" >> the.list
    _tmp=`cat ${lang}_${country}|sed -re 's% .*%%'|sort -u`
    _tmp=`echo $_tmp`
    echo "$i: $text [${lang}_${country}] [$_tmp]" >> the.list.text
    ((i ++))
  done

  message ""
  message "  DICT = Spelling dictionary exists for the lang."
  message "  HYPH = Hyphenation dictionary exists."
  message "  THES = Thesaurus exists."
  message ""

  cat the.list.text | more -d

  echo -e -n "${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}:  "
  echo -e -n "${QUERY_COLOR}Enter list of lang_COUNTRY to install (seperated by space) [$LANG] ${DEFAULT_COLOR}"
  read -t $PROMPT_DELAY _install

  for lang in $_install; do
    [ ! -e ./$lang ] && continue
    for file in `cat $lang.file`; do
      [ -d "$file" ] && continue
      mkdir $file &&
      (cd $file &&
       call_wget $BASE_URL/$file &&
       unzip $file &&
       rm -f $file)
    done
  done

  prepare_install

  if $(grep -q "Autogenerated by Lunar Linux" $OOO_PATH/dictionary.lst); then
    mv $OOO_PATH/dictionary.lst $OOO_PATH/dictionary.lst.old
  else
    cp $OOO_PATH/dictionary.lst $OOO_PATH/dictionary.lst.old
    mv $OOO_PATH/dictionary.lst $OOO_PATH/dictionary.lst.dist
  fi

  echo "# Autogenerated by Lunar Linux" > dictionary.lst.new
  for lang in $_install; do
    for file in `cat $lang.file`; do
      (cd $file &&
       find . -type f -exec install -m644 {} $OOO_PATH \;)
    done

    cat $lang >> dictionary.lst.new
  done

  cat dictionary.lst.new $OOO_PATH/dictionary.lst.old | sort -u > dictionary.lst
  install -m644 dictionary.lst $OOO_PATH

) > $C_FIFO 2>&1


--- NEW FILE: CONFIGURE ---
true

--- NEW FILE: DETAILS ---
          MODULE=openoffice-dicts
         VERSION=0.1
SOURCE_DIRECTORY=$BUILD_DIRECTORY/openoffice-dicts
        WEB_SITE=http://lingucomponent.openoffice.org
         ENTERED=20040824
         UPDATED=20040824
           SHORT="OpenOffice.org Lingucomponent Project"
cat << EOF
Mission Statement:
"The mission of the Lingucomponent Project is to provide the writing aid features:
 spell checking, hyphenation, and thesaurus that could not be open-sourced when
 StarOffice 5.2 transitioned to OpenOffice.org."
EOF

--- NEW FILE: PRE_BUILD ---
mk_source_dir $SOURCE_DIRECTORY



More information about the Lunar-commits mailing list