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

Finish to remove redundant messages 'Processing * commands...'; KISS get-msttcorefonts; add get-msttcorefonts2
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Dec 25 15:23:46 2015 +0200 (2015-12-25)
parents 59de7d3d7152
children
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="$(mktemp -d)"
11 ROOT="$1"
13 # Check if we are root
14 if [ $(id -u) -ne 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 rm -rf "$TEMP_DIR"
18 exit 1
19 fi
21 # Avoid reinstall
22 if [ -d "$ROOT/var/lib/tazpkg/installed/$PACKAGE" ]; then
23 echo -e "\n$PACKAGE package is already installed.\n"
24 rm -rf "$TEMP_DIR"
25 exit 1
26 fi
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 ln -s /usr/lib/RealPlayer/mozilla/nphelix.so /usr/lib/firefox*/plugins
64 }
66 post_remove()
67 {
68 rm -f /usr/lib/firefox*/plugins/nphelix.so
69 }
70 EOT
72 cd ..
74 # extracted pkg can be removed: Save RAM before packing
75 rm -rf $TARBALL
77 # Pack
78 tazpkg pack $PACKAGE-$VERSION
80 # Clean to save RAM memory
81 rm -rf $PACKAGE-$VERSION
84 # Install pseudo package
85 yes y | tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
87 # Clean
88 cd $CUR_DIR
89 rm -rf "$TEMP_DIR"