wok annotate get-realplayer/stuff/get-realplayer @ rev 1861

Add: tcl6.5*, tk8.5*.
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Tue Dec 16 00:20:30 2008 +0100 (2008-12-16)
parents 3feafc902776
children 32959e7975fc
rev   line source
pascal@1710 1 #!/bin/sh
pascal@1710 2
pascal@1710 3 # Get and install RealPlayer for Linux
pascal@1710 4
pascal@1710 5 PACKAGE="realplayer"
pascal@1710 6 VERSION="11"
pascal@1710 7 TARBALL="RealPlayer${VERSION}GOLD.bin"
pascal@1710 8 URL="http://www.real.com/realcom/R?href=http://forms.real.com/real/player/download.html?f=unix/$TARBALL"
pascal@1710 9 CUR_DIR=$(pwd)
pascal@1710 10 TEMP_DIR=/tmp/$PACKAGE-$VERSION-$$
pascal@1713 11 ROOT="$1"
pascal@1710 12
pascal@1710 13 # Check if we are root
pascal@1710 14 if test $(id -u) != 0 ; then
pascal@1710 15 echo -e "\nYou must be root to run `basename $0`."
pascal@1710 16 echo -e "Please type 'su' and root password to become super-user.\n"
pascal@1710 17 exit 1
pascal@1710 18 fi
pascal@1710 19
pascal@1710 20 # Avoid reinstall
pascal@1713 21 if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then
pascal@1710 22 echo -e "\n$PACKAGE package is already installed.\n"
pascal@1710 23 exit 1
pascal@1710 24 fi
pascal@1710 25
pascal@1710 26 # Create a TEMP_DIR
pascal@1710 27 mkdir $TEMP_DIR
pascal@1710 28 cd $TEMP_DIR
pascal@1710 29
pascal@1710 30 # Download the file
pascal@1710 31 wget $URL
pascal@1710 32
pascal@1710 33 # Run the install. --help for options. Unable to surpress mozilla plugins install?
pascal@1710 34 chmod +x $TARBALL
pascal@1710 35 yes '' | ./${TARBALL} -d /usr/lib/RealPlayer
pascal@1710 36
pascal@1710 37 # Create pseudo package
pascal@1710 38 mkdir -p $PACKAGE-$VERSION/fs
pascal@1710 39 cd $PACKAGE-$VERSION/fs
pascal@1710 40 tar cf - /usr/lib/RealPlayer /usr/share/realplay /usr/bin/realplay \
pascal@1710 41 /usr/share/applications/realplay.desktop \
pascal@1710 42 /usr/share/icons/hicolor/*/apps/realplay.png \
pascal@1710 43 /usr/share/mime/packages/realplay.xml \
pascal@1710 44 /usr/share/locale/*/LC_MESSAGES/realplay.mo | tar xf -
pascal@1710 45
pascal@1710 46 cd ..
pascal@1710 47 cat > receipt <<EOT
pascal@1710 48 PACKAGE="$PACKAGE"
pascal@1710 49 VERSION="$VERSION"
pascal@1710 50 CATEGORY="non-free"
pascal@1710 51 SHORT_DESC="Real Player for Linux."
pascal@1710 52 DEPENDS="libtheora wget"
pascal@1710 53 WEB_SITE="http://www.real.com"
pascal@1710 54
pascal@1710 55 post_install()
pascal@1710 56 {
pascal@1710 57 echo -n "Processing post install commands..."
pascal@1710 58 ln -s /usr/lib/RealPlayer/mozilla/nphelix.so /usr/lib/firefox*/plugins
pascal@1710 59 status
pascal@1710 60 }
pascal@1710 61
pascal@1710 62 post_remove()
pascal@1710 63 {
pascal@1710 64 echo -n "Processing post remove commands..."
pascal@1710 65 rm -f /usr/lib/firefox*/plugins/nphelix.so
pascal@1710 66 status
pascal@1710 67 }
pascal@1710 68 EOT
pascal@1710 69
pascal@1710 70 cd ..
pascal@1710 71
pascal@1710 72 # Pack
pascal@1710 73 tazpkg pack $PACKAGE-$VERSION
pascal@1710 74
pascal@1710 75 # Install pseudo package
pascal@1713 76 yes y | tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
pascal@1710 77
pascal@1710 78 # Clean
pascal@1710 79 cd $CUR_DIR
pascal@1710 80 rm -rf $TEMP_DIR