wok-stable view get-realplayer/stuff/get-realplayer @ rev 4458
mplayer: --disable-smb --disable-ftp --disable-openal --disable-faac + clean-up
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun Nov 08 16:59:03 2009 +0100 (2009-11-08) |
parents | e01dd228942a |
children | 552220e919ae |
line source
1 #!/bin/sh
3 # Get and install RealPlayer for Linux
5 PACKAGE="realplayer"
6 VERSION="11"
7 TARBALL="RealPlayer${VERSION}GOLD.bin"
8 URL="http://www.real.com/realcom/R?href=http://forms.real.com/real/player/download.html?f=unix/$TARBALL"
9 CUR_DIR=$(pwd)
10 TEMP_DIR=/tmp/$PACKAGE-$VERSION-$$
11 ROOT="$1"
13 # Check if we are root
14 if test $(id -u) != 0 ; then
15 echo -e "\nYou must be root to run `basename $0`."
16 echo -e "Please type 'su' and root password to become super-user.\n"
17 exit 1
18 fi
20 # Avoid reinstall
21 if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then
22 echo -e "\n$PACKAGE package is already installed.\n"
23 exit 1
24 fi
26 # Create a TEMP_DIR
27 mkdir $TEMP_DIR
28 cd $TEMP_DIR
30 # Download the file
31 wget $URL
32 if [ ! -f $TARBALL ]; then
33 cd $CUR_DIR
34 rm -rf $TEMP_DIR
35 echo "Could not download $TARBALL. Exiting."
36 exit 1
37 fi
39 # Run the install. --help for options. Unable to surpress mozilla plugins install?
40 chmod +x $TARBALL
41 yes '' | ./${TARBALL} -d /usr/lib/RealPlayer
43 # Create pseudo package
44 mkdir -p $PACKAGE-$VERSION/fs
45 cd $PACKAGE-$VERSION/fs
46 tar cf - /usr/lib/RealPlayer /usr/share/realplay /usr/bin/realplay \
47 /usr/share/applications/realplay.desktop \
48 /usr/share/icons/hicolor/*/apps/realplay.png \
49 /usr/share/mime/packages/realplay.xml \
50 /usr/share/locale/*/LC_MESSAGES/realplay.mo | tar xf -
52 cd ..
53 cat > receipt <<EOT
54 PACKAGE="$PACKAGE"
55 VERSION="$VERSION"
56 CATEGORY="non-free"
57 SHORT_DESC="Real Player for Linux."
58 DEPENDS="libtheora wget"
59 WEB_SITE="http://www.real.com"
61 post_install()
62 {
63 echo -n "Processing post install commands..."
64 ln -s /usr/lib/RealPlayer/mozilla/nphelix.so /usr/lib/firefox*/plugins
65 status
66 }
68 post_remove()
69 {
70 echo -n "Processing post remove commands..."
71 rm -f /usr/lib/firefox*/plugins/nphelix.so
72 status
73 }
74 EOT
76 cd ..
78 # Pack
79 tazpkg pack $PACKAGE-$VERSION
81 # Install pseudo package
82 yes y | tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
84 # Clean
85 cd $CUR_DIR
86 rm -rf $TEMP_DIR