wok annotate get-realplayer/stuff/get-realplayer @ rev 9839
Removed perl-html-entiites. Use perl-html-parser instead.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sun May 15 14:07:10 2011 +0000 (2011-05-15) |
parents | 552220e919ae |
children | 6fab3264ba87 |
rev | line source |
---|---|
pascal@1710 | 1 #!/bin/sh |
pascal@1710 | 2 |
pascal@1710 | 3 # Get and install RealPlayer for Linux |
pascal@1710 | 4 |
pascal@1710 | 5 PACKAGE="realplayer" |
pascal@1710 | 6 VERSION="11" |
pascal@1710 | 7 TARBALL="RealPlayer${VERSION}GOLD.bin" |
pascal@1710 | 8 URL="http://www.real.com/realcom/R?href=http://forms.real.com/real/player/download.html?f=unix/$TARBALL" |
pascal@1710 | 9 CUR_DIR=$(pwd) |
pascal@1710 | 10 TEMP_DIR=/tmp/$PACKAGE-$VERSION-$$ |
pascal@1713 | 11 ROOT="$1" |
pascal@1710 | 12 |
pascal@1710 | 13 # Check if we are root |
pascal@1710 | 14 if test $(id -u) != 0 ; then |
pascal@1710 | 15 echo -e "\nYou must be root to run `basename $0`." |
pascal@1710 | 16 echo -e "Please type 'su' and root password to become super-user.\n" |
pascal@1710 | 17 exit 1 |
pascal@1710 | 18 fi |
pascal@1710 | 19 |
pascal@1710 | 20 # Avoid reinstall |
pascal@1713 | 21 if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then |
pascal@1710 | 22 echo -e "\n$PACKAGE package is already installed.\n" |
pascal@1710 | 23 exit 1 |
pascal@1710 | 24 fi |
pascal@1710 | 25 |
pascal@1710 | 26 # Create a TEMP_DIR |
pascal@1710 | 27 mkdir $TEMP_DIR |
pascal@1710 | 28 cd $TEMP_DIR |
pascal@1710 | 29 |
pascal@1710 | 30 # Download the file |
pascal@1710 | 31 wget $URL |
pascal@3893 | 32 if [ ! -f $TARBALL ]; then |
pascal@3893 | 33 cd $CUR_DIR |
pascal@3893 | 34 rm -rf $TEMP_DIR |
pascal@3893 | 35 echo "Could not download $TARBALL. Exiting." |
pascal@3893 | 36 exit 1 |
pascal@3893 | 37 fi |
pascal@1710 | 38 |
pascal@1710 | 39 # Run the install. --help for options. Unable to surpress mozilla plugins install? |
pascal@1710 | 40 chmod +x $TARBALL |
pascal@1710 | 41 yes '' | ./${TARBALL} -d /usr/lib/RealPlayer |
pascal@1710 | 42 |
pascal@1710 | 43 # Create pseudo package |
pascal@1710 | 44 mkdir -p $PACKAGE-$VERSION/fs |
pascal@1710 | 45 cd $PACKAGE-$VERSION/fs |
pascal@1710 | 46 tar cf - /usr/lib/RealPlayer /usr/share/realplay /usr/bin/realplay \ |
pascal@1710 | 47 /usr/share/applications/realplay.desktop \ |
pascal@1710 | 48 /usr/share/icons/hicolor/*/apps/realplay.png \ |
pascal@1710 | 49 /usr/share/mime/packages/realplay.xml \ |
pascal@1710 | 50 /usr/share/locale/*/LC_MESSAGES/realplay.mo | tar xf - |
pascal@1710 | 51 |
pascal@1710 | 52 cd .. |
pascal@1710 | 53 cat > receipt <<EOT |
pascal@1710 | 54 PACKAGE="$PACKAGE" |
pascal@1710 | 55 VERSION="$VERSION" |
pascal@1710 | 56 CATEGORY="non-free" |
pascal@1710 | 57 SHORT_DESC="Real Player for Linux." |
slaxemulator@8517 | 58 DEPENDS="firefox libtheora wget" |
pascal@1710 | 59 WEB_SITE="http://www.real.com" |
pascal@1710 | 60 |
pascal@1710 | 61 post_install() |
pascal@1710 | 62 { |
pascal@1710 | 63 echo -n "Processing post install commands..." |
pascal@1710 | 64 ln -s /usr/lib/RealPlayer/mozilla/nphelix.so /usr/lib/firefox*/plugins |
pascal@1710 | 65 status |
pascal@1710 | 66 } |
pascal@1710 | 67 |
pascal@1710 | 68 post_remove() |
pascal@1710 | 69 { |
pascal@1710 | 70 echo -n "Processing post remove commands..." |
pascal@1710 | 71 rm -f /usr/lib/firefox*/plugins/nphelix.so |
pascal@1710 | 72 status |
pascal@1710 | 73 } |
pascal@1710 | 74 EOT |
pascal@1710 | 75 |
pascal@1710 | 76 cd .. |
pascal@1710 | 77 |
jozee@4993 | 78 # extracted pkg can be removed: Save RAM before packing |
jozee@4993 | 79 rm -rf $TARBALL |
jozee@4993 | 80 |
pascal@1710 | 81 # Pack |
pascal@1710 | 82 tazpkg pack $PACKAGE-$VERSION |
pascal@1710 | 83 |
jozee@4993 | 84 # Clean to save RAM memory |
jozee@4993 | 85 rm -rf $PACKAGE-$VERSION |
jozee@4993 | 86 |
jozee@4993 | 87 |
pascal@1710 | 88 # Install pseudo package |
pascal@1713 | 89 yes y | tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT |
pascal@1710 | 90 |
pascal@1710 | 91 # Clean |
pascal@1710 | 92 cd $CUR_DIR |
pascal@1710 | 93 rm -rf $TEMP_DIR |