wok view get-skype/stuff/get-skype @ rev 24170
updated otf-gfs
author | Hans-G?nter Theisgen |
---|---|
date | Wed Dec 29 07:55:54 2021 +0100 (2021-12-29) |
parents | 0c85739e5ac3 |
children |
line source
1 #!/bin/sh -e
3 ROOT="$1"
4 PACKAGE="skype"
6 if test $(id -u) != 0 ; then
7 echo -e "\nYou must be root to run `basename $0`."
8 echo -e "Please type 'su' and root password to become super-user.\n"
9 exit 0
10 fi
12 if [ -d $ROOT/var/lib/tazpkg/installed/skype ]; then
13 [ -n "$ROOT" ] && exit 1
14 tazpkg remove skype
15 [ -d /var/lib/tazpkg/installed/skype ] && exit 1
16 fi
17 [ -d $ROOT/usr/share/skype ] && rm -rf $ROOT/usr/share/skype
19 TMP_DIR=/tmp/$PACKAGE-$$
20 CUR_DIR=$(pwd)
21 mkdir -p $TMP_DIR && cd $TMP_DIR
23 # Download tarball
24 WEB_SITE="http://www.skype.com/"
25 TARBALL="getskype-linux-beta-dynamic"
26 busybox wget -O $TARBALL.tar.bz2 ${WEB_SITE}go/$TARBALL
27 if [ ! -f $TARBALL.tar.bz2 ]; then
28 echo "Could not download tarball. Exiting."
29 exit 1
30 fi
32 # Extract
33 #TARBALL=$(ls $TARBALL skype*.tar.bz2 2> /dev/null || true)
34 tar -xjf $TARBALL.tar.bz2
35 VERSION=$(ls -d skype-*)
36 VERSION=${VERSION%/}
37 VERSION=${VERSION#skype-*}
39 # extracted pkg can be removed: Save RAM
40 rm -f $TARBALL.tar.bz2
42 cd skype-$VERSION
44 # Install files
45 mkdir -p skype-$VERSION/fs/usr/share/skype skype-$VERSION/fs/usr/bin
46 mkdir -p skype-$VERSION/fs/etc skype-$VERSION/fs/usr/share/applications
47 mkdir -p skype-$VERSION/fs/usr/share/pixmaps
48 mkdir -p skype-$VERSION/fs/usr/share/skype/lang
49 mv LICENSE README skype-$VERSION/fs/usr/share/skype
50 mv lang/*_ru.* skype-$VERSION/fs/usr/share/skype/lang
51 mv skype skype-$VERSION/fs/usr/bin
52 mv icons skype-$VERSION/fs/usr/share/skype
53 mv avatars skype-$VERSION/fs/usr/share/skype
54 mv sounds skype-$VERSION/fs/usr/share/skype
55 mv skype.conf skype-$VERSION/fs/etc
56 cp skype.desktop skype-$VERSION/fs/usr/share/applications
57 cp skype.desktop skype-$VERSION/fs/usr/share/applications/skype.desktop
58 mv skype.desktop skype-$VERSION/fs/usr/share/applications/skype-pulse.desktop
59 sed 's|Exec=|TryExec=apulse\nExec=apulse |' -i skype-$VERSION/fs/usr/share/applications/skype.desktop
60 sed 's|Name=Skype|Name=Skype (PulseAudio)\nTryExec=pulseaudio|' -i skype-$VERSION/fs/usr/share/applications/skype-pulse.desktop
61 cd skype-$VERSION/fs/usr/share/pixmaps/
62 ln -s ../skype/icons/SkypeBlue_16x16.png skype.png ; cd -
65 # Create pseudo package
66 cat > skype-$VERSION/receipt <<EOT
67 PACKAGE="skype"
68 VERSION="$VERSION"
69 CATEGORY="non-free"
70 SHORT_DESC="Skype Internet Telephony."
71 WEB_SITE="$WEB_SITE"
72 DEPENDS="libsigc++ xorg-libXv xorg-libXss libv4l bzip2 tiff \
73 qt4-phonon libQtDBus libQtWebkit libQtGui libQtXml libQtCore \
74 gst-plugins-base apulse"
75 CONFIG_FILES="/etc/skype.conf"
77 post_install()
78 {
79 [ -n "\$1" ] && return
81 [ -s /var/lib/dbus/machine-id ] ||
82 dbus-uuidgen > /var/lib/dbus/machine-id
84 # try to fix library versions
85 ldd /usr/bin/skype | sed '/not found/!d;s/ =>.*//' | while read lib; do
86 [ -e /usr/lib/\${lib%.*} ] &&
87 ln -s \${lib%.*} /usr/lib/\$lib &&
88 touch /usr/lib/\$lib-hack-for-skype
89 done
90 }
92 pre_remove()
93 {
94 for lib in /usr/lib/*-hack-by-skype ; do
95 rm -f \$lib \${lib%-hack-for-skype}
96 done
97 }
98 EOT
100 # Pack
101 tazpkg pack skype-$VERSION gzip
103 # Clean to save RAM memory
104 rm -rf $PACKAGE-$VERSION
106 # Install pseudo package
107 tazpkg install skype-$VERSION.tazpkg --root=$ROOT
109 # Clean
110 cd $CUR_DIR
111 rm -rf $TMP_DIR