teamspeak3.sh 1.77 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
#!/bin/sh -x
# It will run with two args: buildroot spec
BUILDROOT="$1"
SPEC="$2"

. $(dirname $0)/common.sh

add_bin_link_command $PRODUCT $PRODUCTDIR/ts3client_runscript.sh
#add_bin_link_command $PRODUCT $PRODUCTDIR/ts3client_linux_amd64

# create desktop file
mkdir -p $BUILDROOT/usr/share/applications/
cat <<EOF >$BUILDROOT/usr/share/applications/$PRODUCT.desktop
[Desktop Entry]
Encoding=UTF-8
Name=TeamSpeak 3
GenericName=TeamSpeak 3 - Voice communication
Comment=TeamSpeak is software for quality voice communication via the Internet
Exec=teamspeak3
Icon=teamspeak3
StartupNotify=true
Terminal=false
Type=Application
Categories=Network;Application
StartupWMClass=TeamSpeak 3
EOF
pack_file /usr/share/applications/$PRODUCT.desktop

install_file "https://aur.archlinux.org/cgit/aur.git/plain/teamspeak3.png?h=teamspeak3-wbundled" /usr/share/pixmaps/$PRODUCT.png

# hack, todo: update libevent in p10
get_libevent()
{
    local libdir
    for libdir in /usr/lib/x86_64-linux-gnu /usr/lib64 /lib64 ; do
        basename $(ls $libdir/libevent-2.1.so.[0-9] 2>/dev/null) 2>/dev/null
    done | head -n1
}

libevent="$(get_libevent)"
[ -n "$libevent" ] || fatal "libevent is missed, install it before"

if [ "$libevent" != "libevent-2.1.so.7" ] && epm assure patchelf ; then
44
    a= patchelf --replace-needed libevent-2.1.so.7 $libevent .$PRODUCTDIR/libQt5WebEngineCore.so.5
45 46 47
    # Fix libquazip1-qt5.so name
    #patchelf --replace-needed libquazip.so libquazip1-qt5.so.1.0.0 .$PRODUCTDIR/ts3client_linux_amd64
fi
48

49 50 51 52 53 54
# require missed libQt5WaylandClient.so.5
remove_file $PRODUCTDIR/platforms/libqwayland-generic.so
remove_file $PRODUCTDIR/platforms/libqwayland-egl.so
remove_file $PRODUCTDIR/platforms/libqwayland-xcomposite-glx.so
remove_file $PRODUCTDIR/platforms/libqwayland-xcomposite-egl.so

55
add_libs_requires