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

cups: disable pam support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Feb 19 11:09:54 2009 +0000 (2009-02-19)
parents 3feafc902776
children 32959e7975fc
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
33 # Run the install. --help for options. Unable to surpress mozilla plugins install?
34 chmod +x $TARBALL
35 yes '' | ./${TARBALL} -d /usr/lib/RealPlayer
37 # Create pseudo package
38 mkdir -p $PACKAGE-$VERSION/fs
39 cd $PACKAGE-$VERSION/fs
40 tar cf - /usr/lib/RealPlayer /usr/share/realplay /usr/bin/realplay \
41 /usr/share/applications/realplay.desktop \
42 /usr/share/icons/hicolor/*/apps/realplay.png \
43 /usr/share/mime/packages/realplay.xml \
44 /usr/share/locale/*/LC_MESSAGES/realplay.mo | tar xf -
46 cd ..
47 cat > receipt <<EOT
48 PACKAGE="$PACKAGE"
49 VERSION="$VERSION"
50 CATEGORY="non-free"
51 SHORT_DESC="Real Player for Linux."
52 DEPENDS="libtheora wget"
53 WEB_SITE="http://www.real.com"
55 post_install()
56 {
57 echo -n "Processing post install commands..."
58 ln -s /usr/lib/RealPlayer/mozilla/nphelix.so /usr/lib/firefox*/plugins
59 status
60 }
62 post_remove()
63 {
64 echo -n "Processing post remove commands..."
65 rm -f /usr/lib/firefox*/plugins/nphelix.so
66 status
67 }
68 EOT
70 cd ..
72 # Pack
73 tazpkg pack $PACKAGE-$VERSION
75 # Install pseudo package
76 yes y | tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
78 # Clean
79 cd $CUR_DIR
80 rm -rf $TEMP_DIR