wok view get-realplayer/stuff/get-realplayer @ rev 8517

Moved firefox depend to script receipt depend in get-realplayer.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat Feb 12 06:26:12 2011 +0000 (2011-02-12)
parents 552220e919ae
children 6fab3264ba87
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="firefox 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 # extracted pkg can be removed: Save RAM before packing
79 rm -rf $TARBALL
81 # Pack
82 tazpkg pack $PACKAGE-$VERSION
84 # Clean to save RAM memory
85 rm -rf $PACKAGE-$VERSION
88 # Install pseudo package
89 yes y | tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
91 # Clean
92 cd $CUR_DIR
93 rm -rf $TEMP_DIR