wok-current rev 1125
Add: get and install java runtime.
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Tue Jul 22 01:08:56 2008 +0200 (2008-07-22) |
parents | 5de14ce3ba76 |
children | 17474ac97dec |
files | get-java6-jre/receipt get-java6-jre/stuff/get-java6-jre.sh |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/get-java6-jre/receipt Tue Jul 22 01:08:56 2008 +0200 1.3 @@ -0,0 +1,17 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="get-java6-jre" 1.7 +VERSION="1.0" 1.8 +CATEGORY="non-free" 1.9 +SHORT_DESC="SUN Java Runtime" 1.10 +MAINTAINER="erjo@slitaz.org" 1.11 +DEPENDS="" 1.12 +WEB_SITE="http://www.java.com" 1.13 + 1.14 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.15 +genpkg_rules() 1.16 +{ 1.17 + mkdir -p $fs/usr/bin 1.18 + install -o root -g root -m755 stuff/get-java6-jre.sh $fs/usr/bin 1.19 +} 1.20 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/get-java6-jre/stuff/get-java6-jre.sh Tue Jul 22 01:08:56 2008 +0200 2.3 @@ -0,0 +1,94 @@ 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_07" 2.13 +URL="http://javadl.sun.com/webapps/download/AutoDL?BundleId=23103" 2.14 +TARBALL="jre-6u7-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 +# Run the install file user may agree to SUN EULA 2.40 +chmod +x $TARBALL 2.41 +./${TARBALL} 2.42 + 2.43 + 2.44 +# Make the package 2.45 +mkdir -p $PACKAGE-$VERSION/fs/usr/lib/java 2.46 +cp -a jre${VERSION} $PACKAGE-$VERSION/fs/usr/lib/java 2.47 + 2.48 + 2.49 +#delete unecessary files 2.50 +rm -rf $PACKAGE-$VERSION/fs/usr/lib/java/jre${VERSION}/man 2.51 + 2.52 +# Create receipt 2.53 + 2.54 +cat > $PACKAGE-$VERSION/receipt <<EOT 2.55 +# SliTaz package receipt. 2.56 + 2.57 +PACKAGE="$PACKAGE" 2.58 +VERSION="$VERSION" 2.59 +CATEGORY="non-free" 2.60 +SHORT_DESC="SUN Java Runtime." 2.61 +DEPENDS="" 2.62 +WEB_SITE="http://www.java.com/" 2.63 + 2.64 +post_install() 2.65 +{ 2.66 + echo "Processing post install commands..." 2.67 + if [ -d /usr/lib/firefox-3.0.1 ]; then 2.68 + cd /usr/lib/firefox-3.0.1/plugins 2.69 + ln -s /usr/lib/java/jre\$VERSION/plugin/i386/ns7/libjavaplugin_oji.so 2.70 + fi 2.71 + 2.72 + cd /usr/bin 2.73 + ln -s /usr/lib/java/jre\$VERSION/bin/java 2.74 +} 2.75 + 2.76 +post_remove() 2.77 +{ 2.78 + rm -f /usr/lib/firefox-3.0.1/plugins/libjavaplugin_oji.so 2.79 + rm -f /usr/bin/java 2.80 +} 2.81 +EOT 2.82 + 2.83 +# Pack 2.84 +tazpkg pack $PACKAGE-$VERSION 2.85 + 2.86 +# Install pseudo package 2.87 +tazpkg install $PACKAGE-$VERSION.tazpkg 2.88 + 2.89 +# Clean 2.90 +cd /tmp 2.91 +rm -rf $TEMP_DIR 2.92 + 2.93 + 2.94 + 2.95 + 2.96 + 2.97 +