wok-4.x rev 12369

Update get-java6-jre (thanks ernia)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Jan 06 11:18:47 2013 +0100 (2013-01-06)
parents ee3986615c83
children 1c8a58ec826e
files get-java6-jre/stuff/get-java6-jre
line diff
     1.1 --- a/get-java6-jre/stuff/get-java6-jre	Wed Jan 02 22:12:19 2013 +0000
     1.2 +++ b/get-java6-jre/stuff/get-java6-jre	Sun Jan 06 11:18:47 2013 +0100
     1.3 @@ -1,17 +1,21 @@
     1.4  #!/bin/sh 
     1.5  # Get and install the SUN Java Runtime Environnement
     1.6  #
     1.7 -# (C) 2007-2008 SliTaz - GNU General Public License v3.
     1.8 +# (C) 2007-2012 SliTaz - GNU General Public License v3.
     1.9  #
    1.10  # Author : Eric Joseph-Alexandre <erjo@slitaz.org>
    1.11  
    1.12  PACKAGE="java6-jre"
    1.13 -VERSION="1.6.0_31"
    1.14 -URL="http://javadl.sun.com/webapps/download/AutoDL?BundleId=59621"
    1.15 -TARBALL="jre-6u31-linux-i586.bin"
    1.16 +WEB_SITE="http://www.java.com/"
    1.17 +SHORT_DESC="SUN Java Runtime."
    1.18 +DEPENDS="xorg-libXtst"
    1.19 +TARBALL="jre.bin"
    1.20  TEMP_DIR="/tmp/$PACKAGE.$$"
    1.21  ROOT="$1"
    1.22  
    1.23 +URL="$(wget -O - ${WEB_SITE}en/download/manual_v6.jsp | \
    1.24 +       sed '/self-extracting/!d;s/.*href="\([^"]*\).*/\1/;q')"
    1.25 +
    1.26  # Check if we are root starting anything
    1.27  if test $(id -u) != 0 ; then
    1.28  	echo -e "\nYou must be root to run `basename $0`."
    1.29 @@ -46,10 +50,11 @@
    1.30  
    1.31  # Run the install file user may agree to SUN EULA
    1.32  chmod +x  $TARBALL
    1.33 -./${TARBALL}
    1.34 +tar xvf ${TARBALL}
    1.35  
    1.36  
    1.37  # Make the package
    1.38 +VERSION="$(ls jre?.* -d | sed 's/^jre//')"
    1.39  mkdir -p $PACKAGE-$VERSION/fs/usr/lib/java 
    1.40  # use mv instead of 'cp -a' to save RAM
    1.41  mv jre${VERSION} $PACKAGE-$VERSION/fs/usr/lib/java
    1.42 @@ -68,14 +73,14 @@
    1.43  PACKAGE="$PACKAGE"
    1.44  VERSION="$VERSION"
    1.45  CATEGORY="non-free"
    1.46 -SHORT_DESC="SUN Java Runtime."
    1.47 -DEPENDS="xorg-libXtst"
    1.48 -WEB_SITE="http://www.java.com/"
    1.49 +SHORT_DESC="$SHORT_DESC"
    1.50 +DEPENDS="$DEPENDS"
    1.51 +WEB_SITE="$WEB_SITE"
    1.52  
    1.53  post_install()
    1.54  {
    1.55  	echo -n "Processing post install commands..."
    1.56 -	 [ -d /usr/lib/mozilla/plugins ] || mkdir -p /usr/lib/mozilla/plugins 
    1.57 +	[ -d /usr/lib/mozilla/plugins ] || mkdir -p /usr/lib/mozilla/plugins 
    1.58  	ln -s /usr/lib/java/jre\$VERSION/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins
    1.59  
    1.60  	cd /usr/bin
    1.61 @@ -98,6 +103,9 @@
    1.62  
    1.63  # Install pseudo package
    1.64  tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
    1.65 +case " $@ " in
    1.66 +*\ --k*) mv $PACKAGE-$VERSION.tazpkg $CUR_DIR ;;
    1.67 +esac
    1.68  
    1.69  # Clean
    1.70  cd $CUR_DIR