wok-current rev 1642

Up: get-java6-jre - version 10
author Paul Issott <paul@slitaz.org>
date Sat Nov 08 13:17:12 2008 +0000 (2008-11-08)
parents d84c7ed6eeb4
children 3f1a7134d9e3
files get-java6-jre/receipt get-java6-jre/stuff/get-java6-jre get-java6-jre/stuff/get-java6-jre.sh
line diff
     1.1 --- a/get-java6-jre/receipt	Sat Oct 25 12:09:31 2008 +0000
     1.2 +++ b/get-java6-jre/receipt	Sat Nov 08 13:17:12 2008 +0000
     1.3 @@ -5,14 +5,13 @@
     1.4  CATEGORY="non-free"
     1.5  SHORT_DESC="SUN Java Runtime"
     1.6  MAINTAINER="erjo@slitaz.org"
     1.7 -DEPENDS=""
     1.8 +DEPENDS="xorg-libXtst"
     1.9  WEB_SITE="http://www.java.com"
    1.10  
    1.11  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.12  genpkg_rules()
    1.13  {
    1.14  	mkdir -p $fs/usr/bin
    1.15 -	install -o root -g root -m755 stuff/get-java6-jre.sh $fs/usr/bin
    1.16 -	ln -s get-java6-jre.sh $fs/usr/bin/$PACKAGE
    1.17 +	install -o root -g root -m755 stuff/get-java6-jre $fs/usr/bin
    1.18  }
    1.19  
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/get-java6-jre/stuff/get-java6-jre	Sat Nov 08 13:17:12 2008 +0000
     2.3 @@ -0,0 +1,96 @@
     2.4 +#!/bin/sh 
     2.5 +# Get and install the SUN Java Runtime Environnement
     2.6 +#
     2.7 +# (C) 2007-2008 SliTaz - GNU General Public License v3.
     2.8 +#
     2.9 +# Author : Eric Joseph-Alexandre <erjo@slitaz.org>
    2.10 +
    2.11 +PACKAGE="java6-jre"
    2.12 +VERSION="1.6.0_10"
    2.13 +URL="http://javadl.sun.com/webapps/download/AutoDL?BundleId=25051"
    2.14 +TARBALL="jre-6u10-linux-i586.bin"
    2.15 +TEMP_DIR="/tmp/$PACKAGE.$$"
    2.16 +
    2.17 +# Check if we are root starting anything
    2.18 +if test $(id -u) != 0 ; then
    2.19 +	echo -e "\nYou must be root to run `basename $0`."
    2.20 +	echo -e "Please type 'su' and root password to become super-user.\n"
    2.21 +	exit 1
    2.22 +fi
    2.23 +
    2.24 +# Avoid reinstall
    2.25 +if [ -d /var/lib/tazpkg/installed/$PACKAGE ]; then
    2.26 +	echo -e "\n$PACKAGE package is already installed.\n"
    2.27 +	exit 1
    2.28 +fi
    2.29 +
    2.30 +
    2.31 +
    2.32 +# Create TEMP_DIR
    2.33 +test -d $TEMP_DIR || mkdir $TEMP_DIR
    2.34 +cd $TEMP_DIR
    2.35 +
    2.36 +# Doanload the file
    2.37 +test -f $TARBALL || wget $URL -O $TARBALL
    2.38 +
    2.39 +# Do not trust 'df' free space
    2.40 +sed -i 's/exit 3$//' $TARBALL
    2.41 +
    2.42 +# Run the install file user may agree to SUN EULA
    2.43 +chmod +x  $TARBALL
    2.44 +./${TARBALL}
    2.45 +
    2.46 +
    2.47 +# Make the package
    2.48 +mkdir -p $PACKAGE-$VERSION/fs/usr/lib/java 
    2.49 +cp -a jre${VERSION} $PACKAGE-$VERSION/fs/usr/lib/java
    2.50 +
    2.51 +
    2.52 +#delete unecessary files
    2.53 +rm -rf $PACKAGE-$VERSION/fs/usr/lib/java/jre${VERSION}/man
    2.54 +
    2.55 +# Create receipt
    2.56 +
    2.57 +cat > $PACKAGE-$VERSION/receipt <<EOT
    2.58 +# SliTaz package receipt.
    2.59 +
    2.60 +PACKAGE="$PACKAGE"
    2.61 +VERSION="$VERSION"
    2.62 +CATEGORY="non-free"
    2.63 +SHORT_DESC="SUN Java Runtime."
    2.64 +DEPENDS="xorg-libXtst"
    2.65 +WEB_SITE="http://www.java.com/"
    2.66 +
    2.67 +post_install()
    2.68 +{
    2.69 +	echo -n "Processing post install commands..."
    2.70 +	cd /usr/lib/firefox*/plugins
    2.71 +	ln -s /usr/lib/java/jre\$VERSION/plugin/i386/ns7/libjavaplugin_oji.so
    2.72 +
    2.73 +	cd /usr/bin
    2.74 +	ln -s /usr/lib/java/jre\$VERSION/bin/java 
    2.75 +	status
    2.76 +}
    2.77 +
    2.78 +post_remove()
    2.79 +{
    2.80 +	rm -f /usr/lib/firefox*/plugins/libjavaplugin_oji.so
    2.81 +	rm -f /usr/bin/java
    2.82 +}
    2.83 +EOT
    2.84 +
    2.85 +# Pack
    2.86 +tazpkg pack $PACKAGE-$VERSION
    2.87 +
    2.88 +# Install pseudo package
    2.89 +tazpkg install $PACKAGE-$VERSION.tazpkg
    2.90 +
    2.91 +# Clean
    2.92 +cd /tmp
    2.93 +rm -rf $TEMP_DIR
    2.94 +
    2.95 +
    2.96 +
    2.97 +
    2.98 +
    2.99 +
     3.1 --- a/get-java6-jre/stuff/get-java6-jre.sh	Sat Oct 25 12:09:31 2008 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,98 +0,0 @@
     3.4 -#!/bin/sh 
     3.5 -# Get and install the SUN Java Runtime Environnement
     3.6 -#
     3.7 -# (C) 2007-2008 SliTaz - GNU General Public License v3.
     3.8 -#
     3.9 -# Author : Eric Joseph-Alexandre <erjo@slitaz.org>
    3.10 -
    3.11 -PACKAGE="java6-jre"
    3.12 -VERSION="1.6.0_07"
    3.13 -URL="http://javadl.sun.com/webapps/download/AutoDL?BundleId=23103"
    3.14 -TARBALL="jre-6u7-linux-i586.bin"
    3.15 -TEMP_DIR="/tmp/$PACKAGE.$$"
    3.16 -
    3.17 -# Check if we are root starting anything
    3.18 -if test $(id -u) != 0 ; then
    3.19 -	echo -e "\nYou must be root to run `basename $0`."
    3.20 -	echo -e "Please type 'su' and root password to become super-user.\n"
    3.21 -	exit 1
    3.22 -fi
    3.23 -
    3.24 -# Avoid reinstall
    3.25 -if [ -d /var/lib/tazpkg/installed/$PACKAGE ]; then
    3.26 -	echo -e "\n$PACKAGE package is already installed.\n"
    3.27 -	exit 1
    3.28 -fi
    3.29 -
    3.30 -
    3.31 -
    3.32 -# Create TEMP_DIR
    3.33 -test -d $TEMP_DIR || mkdir $TEMP_DIR
    3.34 -cd $TEMP_DIR
    3.35 -
    3.36 -# Doanload the file
    3.37 -test -f $TARBALL || wget $URL -O $TARBALL
    3.38 -
    3.39 -# Do not trust 'df' free space
    3.40 -sed -i 's/exit 3$//' $TARBALL
    3.41 -
    3.42 -# Run the install file user may agree to SUN EULA
    3.43 -chmod +x  $TARBALL
    3.44 -./${TARBALL}
    3.45 -
    3.46 -
    3.47 -# Make the package
    3.48 -mkdir -p $PACKAGE-$VERSION/fs/usr/lib/java 
    3.49 -cp -a jre${VERSION} $PACKAGE-$VERSION/fs/usr/lib/java
    3.50 -
    3.51 -
    3.52 -#delete unecessary files
    3.53 -rm -rf $PACKAGE-$VERSION/fs/usr/lib/java/jre${VERSION}/man
    3.54 -
    3.55 -# Create receipt
    3.56 -
    3.57 -cat > $PACKAGE-$VERSION/receipt <<EOT
    3.58 -# SliTaz package receipt.
    3.59 -
    3.60 -PACKAGE="$PACKAGE"
    3.61 -VERSION="$VERSION"
    3.62 -CATEGORY="non-free"
    3.63 -SHORT_DESC="SUN Java Runtime."
    3.64 -DEPENDS=""
    3.65 -WEB_SITE="http://www.java.com/"
    3.66 -
    3.67 -post_install()
    3.68 -{
    3.69 -	echo "Processing post install commands..."
    3.70 -	for i in /usr/lib/firefox*; do
    3.71 -		[ -d \$i ] || continue
    3.72 -		cd \$i/plugins
    3.73 -		ln -s /usr/lib/java/jre\$VERSION/plugin/i386/ns7/libjavaplugin_oji.so
    3.74 -	done
    3.75 -	
    3.76 -	cd /usr/bin
    3.77 -	ln -s /usr/lib/java/jre\$VERSION/bin/java 
    3.78 -}
    3.79 -
    3.80 -post_remove()
    3.81 -{
    3.82 -	rm -f /usr/lib/firefox*/plugins/libjavaplugin_oji.so
    3.83 -	rm -f /usr/bin/java
    3.84 -}
    3.85 -EOT
    3.86 -
    3.87 -# Pack
    3.88 -tazpkg pack $PACKAGE-$VERSION
    3.89 -
    3.90 -# Install pseudo package
    3.91 -tazpkg install $PACKAGE-$VERSION.tazpkg
    3.92 -
    3.93 -# Clean
    3.94 -cd /tmp
    3.95 -rm -rf $TEMP_DIR
    3.96 -
    3.97 -
    3.98 -
    3.99 -
   3.100 -
   3.101 -