wok-6.x rev 14217
get-LibreOffice: update for 4.0.1
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Mar 18 11:46:23 2013 +0100 (2013-03-18) |
parents | b434ab3341d0 |
children | 4fc7e24356a5 |
files | get-LibreOffice/stuff/get-LibreOffice |
line diff
1.1 --- a/get-LibreOffice/stuff/get-LibreOffice Sat Mar 16 21:52:30 2013 +0100 1.2 +++ b/get-LibreOffice/stuff/get-LibreOffice Mon Mar 18 11:46:23 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,11 +159,10 @@ 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 @@ -179,10 +183,11 @@ 1.60 1.61 PACKAGE="$PACKAGE" 1.62 VERSION="$VERSION" 1.63 -CATEGORY="office" 1.64 -SHORT_DESC="Productivity suite." 1.65 -DEPENDS="java6-jre" 1.66 -WEB_SITE="$URL" 1.67 +CATEGORY="$CATEGORY" 1.68 +SHORT_DESC="$SHORT_DESC" 1.69 +WEB_SITE="$WEB_SITE" 1.70 + 1.71 +DEPENDS="$DEPENDS" 1.72 1.73 post_install() 1.74 {