wok-4.x rev 12378

get-LibreOffice: update for 4.0.1
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 18 11:45:45 2013 +0100 (2013-03-18)
parents 67b8f97294d5
children 5029bdfa3950
files get-LibreOffice/stuff/get-LibreOffice
line diff
     1.1 --- a/get-LibreOffice/stuff/get-LibreOffice	Thu Feb 07 01:23:55 2013 +0000
     1.2 +++ b/get-LibreOffice/stuff/get-LibreOffice	Mon Mar 18 11:45:45 2013 +0100
     1.3 @@ -7,10 +7,14 @@
     1.4  #
     1.5  
     1.6  PACKAGE="LibreOffice"
     1.7 -URL="http://www.libreoffice.org"
     1.8 +WEB_SITE="http://www.libreoffice.org"
     1.9 +CATEGORY="office"
    1.10 +SHORT_DESC="Productivity suite."
    1.11 +DEPENDS="java6-jre cups"
    1.12  ROOT="$1"
    1.13  DIR="stable"
    1.14 -SUFFIX="Linux_x86_install-rpm_en-US.tar.gz"
    1.15 +PREFIX="LibreOffice"
    1.16 +SUFFIX="Linux_x86_rpm.tar.gz"
    1.17  WGET_URL="http://download.documentfoundation.org/libreoffice/$DIR"
    1.18  
    1.19  VERSION="$(basename $(wget -O - $WGET_URL/ 2> /dev/null | \
    1.20 @@ -22,11 +26,12 @@
    1.21  VER="${VERSION/\-/}" # without hyphens
    1.22  
    1.23  
    1.24 -TARBALL="LibO_${VER}_${SUFFIX}"
    1.25 +#http://download.documentfoundation.org/libreoffice/stable/4.0.1/rpm/x86/LibreOffice_4.0.1_Linux_x86_rpm.tar.gz
    1.26 +TARBALL="${PREFIX}_${VER}_${SUFFIX}"
    1.27  
    1.28  for LOC in ${LANG/_/-} ${LANG%_*}; do
    1.29 -	L_SUFFIX="Linux_x86_langpack-rpm_$LOC.tar.gz"
    1.30 -	L_TARBALL="LibO_${VER}_${L_SUFFIX}"
    1.31 +	L_SUFFIX="Linux_x86_rpm_langpack_$LOC.tar.gz"
    1.32 +	L_TARBALL="${PREFIX}_${VER}_${L_SUFFIX}"
    1.33  	LANG_URL="$WGET_URL/${VERSION}/rpm/x86/${L_TARBALL}"
    1.34  	busybox wget -s $LANG_URL 2> /dev/null || continue
    1.35  	echo "Added $LANG ($LOC)."
    1.36 @@ -122,7 +127,7 @@
    1.37  done
    1.38  
    1.39  # Get version found in archive (often directory is still RC version when final is present)
    1.40 -ARCHIVED_VERSION=`find $TEMP_DIR -type d 2> /dev/null | grep LibO | head -n 1 | sed 's/_/ /g' | awk '{print $2}'`
    1.41 +ARCHIVED_VERSION=$(find $TEMP_DIR -type d 2> /dev/null | sed "/$PREFIX/!d;\$!d;s/_/ /g" | awk '{print $2}')
    1.42  echo -n "(found v${ARCHIVED_VERSION})"
    1.43  
    1.44  # Consolidate localisations into main package
    1.45 @@ -154,17 +159,16 @@
    1.46  echo -n "Preparing package... "
    1.47  
    1.48  # Make the package
    1.49 -mkdir -p $PACKAGE-$VERSION/fs/usr/lib/libreoffice  \
    1.50 -         $PACKAGE-$VERSION/fs/usr/share
    1.51 +mkdir -p $PACKAGE-$VERSION/fs/usr/lib $PACKAGE-$VERSION/fs/usr/share
    1.52  
    1.53  # use mv instead of 'cp -a' to save RAM
    1.54 -mv opt/libreoffice* $PACKAGE-$VERSION/fs/usr/lib
    1.55 +mv opt/libreoffice* $PACKAGE-$VERSION/fs/usr/lib/libreoffice
    1.56  mv usr/share/mime $PACKAGE-$VERSION/fs/usr/share
    1.57  mv usr/share/icons $PACKAGE-$VERSION/fs/usr/share
    1.58  mv usr/bin $PACKAGE-$VERSION/fs/usr
    1.59  
    1.60  # relocalized libexec directory
    1.61 -bin=$(ls $PACKAGE-$VERSION/fs/usr/bin/libreoffice???)
    1.62 +bin=$(echo $PACKAGE-$VERSION/fs/usr/bin/libreoffice${VERSION%.*})
    1.63  if [ -L $bin ]; then
    1.64  	target=$(readlink $bin)
    1.65  	rm -f $bin
    1.66 @@ -179,10 +183,11 @@
    1.67  
    1.68  PACKAGE="$PACKAGE"
    1.69  VERSION="$VERSION"
    1.70 -CATEGORY="office"
    1.71 -SHORT_DESC="Productivity suite."
    1.72 -DEPENDS="java6-jre"
    1.73 -WEB_SITE="$URL"
    1.74 +CATEGORY="$CATEGORY"
    1.75 +SHORT_DESC="$SHORT_DESC"
    1.76 +WEB_SITE="$WEB_SITE"
    1.77 +
    1.78 +DEPENDS="$DEPENDS"
    1.79  
    1.80  post_install()
    1.81  {