wok rev 1710

Add get-realplayer
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Nov 16 13:21:20 2008 +0000 (2008-11-16)
parents 82c1b848ae3b
children b1ccbfb29477
files get-realplayer/receipt get-realplayer/stuff/get-realplayer
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/get-realplayer/receipt	Sun Nov 16 13:21:20 2008 +0000
     1.3 @@ -0,0 +1,17 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="get-realplayer"
     1.7 +VERSION="1.00"
     1.8 +CATEGORY="non-free"
     1.9 +SHORT_DESC="Get Real Player for Linux."
    1.10 +MAINTAINER="paul@slitaz.org"
    1.11 +WEB_SITE="http://www.real.com"
    1.12 +DEPENDS="firefox tar bash"
    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 +	cp stuff/get-realplayer $fs/usr/bin
    1.19 +}
    1.20 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/get-realplayer/stuff/get-realplayer	Sun Nov 16 13:21:20 2008 +0000
     2.3 @@ -0,0 +1,79 @@
     2.4 +#!/bin/sh 
     2.5 +
     2.6 +# Get and install RealPlayer for Linux
     2.7 +
     2.8 +PACKAGE="realplayer"
     2.9 +VERSION="11"
    2.10 +TARBALL="RealPlayer${VERSION}GOLD.bin"
    2.11 +URL="http://www.real.com/realcom/R?href=http://forms.real.com/real/player/download.html?f=unix/$TARBALL"
    2.12 +CUR_DIR=$(pwd)
    2.13 +TEMP_DIR=/tmp/$PACKAGE-$VERSION-$$
    2.14 +
    2.15 +# Check if we are root
    2.16 +if test $(id -u) != 0 ; then
    2.17 +	echo -e "\nYou must be root to run `basename $0`."
    2.18 +	echo -e "Please type 'su' and root password to become super-user.\n"
    2.19 +	exit 1
    2.20 +fi
    2.21 +
    2.22 +# Avoid reinstall
    2.23 +if [ -d /var/lib/tazpkg/installed/$PACKAGE ]; then
    2.24 +	echo -e "\n$PACKAGE package is already installed.\n"
    2.25 +	exit 1
    2.26 +fi
    2.27 +
    2.28 +# Create a TEMP_DIR
    2.29 +mkdir $TEMP_DIR
    2.30 +cd $TEMP_DIR
    2.31 +
    2.32 +# Download the file
    2.33 +wget $URL 
    2.34 +
    2.35 +# Run the install. --help for options. Unable to surpress mozilla plugins install?
    2.36 +chmod +x  $TARBALL
    2.37 +yes '' | ./${TARBALL} -d /usr/lib/RealPlayer
    2.38 +
    2.39 +# Create pseudo package
    2.40 +mkdir -p $PACKAGE-$VERSION/fs
    2.41 +cd $PACKAGE-$VERSION/fs
    2.42 +tar cf - /usr/lib/RealPlayer /usr/share/realplay /usr/bin/realplay \
    2.43 +/usr/share/applications/realplay.desktop \
    2.44 +/usr/share/icons/hicolor/*/apps/realplay.png \
    2.45 +/usr/share/mime/packages/realplay.xml \
    2.46 +/usr/share/locale/*/LC_MESSAGES/realplay.mo | tar xf -
    2.47 +
    2.48 +cd ..
    2.49 +cat > receipt <<EOT
    2.50 +PACKAGE="$PACKAGE"
    2.51 +VERSION="$VERSION"
    2.52 +CATEGORY="non-free"
    2.53 +SHORT_DESC="Real Player for Linux."
    2.54 +DEPENDS="libtheora wget"
    2.55 +WEB_SITE="http://www.real.com"
    2.56 +
    2.57 +post_install()
    2.58 +{
    2.59 +	echo -n "Processing post install commands..."
    2.60 +	ln -s /usr/lib/RealPlayer/mozilla/nphelix.so /usr/lib/firefox*/plugins
    2.61 +	status
    2.62 +}
    2.63 +
    2.64 +post_remove()
    2.65 +{
    2.66 +	echo -n "Processing post remove commands..."
    2.67 +	rm -f /usr/lib/firefox*/plugins/nphelix.so
    2.68 +	status
    2.69 +}
    2.70 +EOT
    2.71 +
    2.72 +cd ..
    2.73 +
    2.74 +# Pack
    2.75 +tazpkg pack $PACKAGE-$VERSION
    2.76 +
    2.77 +# Install pseudo package
    2.78 +yes y | tazpkg install $PACKAGE-$VERSION.tazpkg
    2.79 +
    2.80 +# Clean
    2.81 +cd $CUR_DIR
    2.82 +rm -rf $TEMP_DIR