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

clamav: update BUILD_DEPENDS
author Paul Issott <paul@slitaz.org>
date Sun Nov 16 17:19:15 2008 +0000 (2008-11-16)
parents
children e01dd228942a
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-$$
12 # Check if we are root
13 if test $(id -u) != 0 ; then
14 echo -e "\nYou must be root to run `basename $0`."
15 echo -e "Please type 'su' and root password to become super-user.\n"
16 exit 1
17 fi
19 # Avoid reinstall
20 if [ -d /var/lib/tazpkg/installed/$PACKAGE ]; then
21 echo -e "\n$PACKAGE package is already installed.\n"
22 exit 1
23 fi
25 # Create a TEMP_DIR
26 mkdir $TEMP_DIR
27 cd $TEMP_DIR
29 # Download the file
30 wget $URL
32 # Run the install. --help for options. Unable to surpress mozilla plugins install?
33 chmod +x $TARBALL
34 yes '' | ./${TARBALL} -d /usr/lib/RealPlayer
36 # Create pseudo package
37 mkdir -p $PACKAGE-$VERSION/fs
38 cd $PACKAGE-$VERSION/fs
39 tar cf - /usr/lib/RealPlayer /usr/share/realplay /usr/bin/realplay \
40 /usr/share/applications/realplay.desktop \
41 /usr/share/icons/hicolor/*/apps/realplay.png \
42 /usr/share/mime/packages/realplay.xml \
43 /usr/share/locale/*/LC_MESSAGES/realplay.mo | tar xf -
45 cd ..
46 cat > receipt <<EOT
47 PACKAGE="$PACKAGE"
48 VERSION="$VERSION"
49 CATEGORY="non-free"
50 SHORT_DESC="Real Player for Linux."
51 DEPENDS="libtheora wget"
52 WEB_SITE="http://www.real.com"
54 post_install()
55 {
56 echo -n "Processing post install commands..."
57 ln -s /usr/lib/RealPlayer/mozilla/nphelix.so /usr/lib/firefox*/plugins
58 status
59 }
61 post_remove()
62 {
63 echo -n "Processing post remove commands..."
64 rm -f /usr/lib/firefox*/plugins/nphelix.so
65 status
66 }
67 EOT
69 cd ..
71 # Pack
72 tazpkg pack $PACKAGE-$VERSION
74 # Install pseudo package
75 yes y | tazpkg install $PACKAGE-$VERSION.tazpkg
77 # Clean
78 cd $CUR_DIR
79 rm -rf $TEMP_DIR