wok annotate get-realplayer/stuff/get-realplayer @ rev 21579

updated python-gevent (0.13.8 -> 1.4.0)
author Hans-G?nter Theisgen
date Sun May 19 16:11:22 2019 +0100 (2019-05-19)
parents 59de7d3d7152
children
rev   line source
al@18741 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"
al@18741 9 CUR_DIR="$(pwd)"
al@18741 10 TEMP_DIR="$(mktemp -d)"
pascal@1713 11 ROOT="$1"
pascal@1710 12
pascal@1710 13 # Check if we are root
al@18741 14 if [ $(id -u) -ne 0 ]; then
al@18741 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"
al@18741 17 rm -rf "$TEMP_DIR"
pascal@1710 18 exit 1
pascal@1710 19 fi
pascal@1710 20
pascal@1710 21 # Avoid reinstall
al@18741 22 if [ -d "$ROOT/var/lib/tazpkg/installed/$PACKAGE" ]; then
pascal@1710 23 echo -e "\n$PACKAGE package is already installed.\n"
al@18741 24 rm -rf "$TEMP_DIR"
pascal@1710 25 exit 1
pascal@1710 26 fi
pascal@1710 27
al@18741 28 cd "$TEMP_DIR"
pascal@1710 29
pascal@1710 30 # Download the file
al@18741 31 wget $URL
pascal@3893 32 if [ ! -f $TARBALL ]; then
pascal@3893 33 cd $CUR_DIR
al@18741 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 ln -s /usr/lib/RealPlayer/mozilla/nphelix.so /usr/lib/firefox*/plugins
pascal@1710 64 }
pascal@1710 65
pascal@1710 66 post_remove()
pascal@1710 67 {
pascal@1710 68 rm -f /usr/lib/firefox*/plugins/nphelix.so
pascal@1710 69 }
pascal@1710 70 EOT
pascal@1710 71
pascal@1710 72 cd ..
pascal@1710 73
jozee@4993 74 # extracted pkg can be removed: Save RAM before packing
jozee@4993 75 rm -rf $TARBALL
jozee@4993 76
pascal@1710 77 # Pack
pascal@1710 78 tazpkg pack $PACKAGE-$VERSION
pascal@1710 79
jozee@4993 80 # Clean to save RAM memory
jozee@4993 81 rm -rf $PACKAGE-$VERSION
jozee@4993 82
jozee@4993 83
pascal@1710 84 # Install pseudo package
pascal@1713 85 yes y | tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
pascal@1710 86
pascal@1710 87 # Clean
pascal@1710 88 cd $CUR_DIR
al@18741 89 rm -rf "$TEMP_DIR"