python-texttable: update to 1.3.1
[void-packages.git] / srcpkgs / spotify / INSTALL
blob97d110048d5be7428bc61738547734d0f57d9671
1 # INSTALL for 'spotify'
2 # Fetching proprietary binaries at install-time
4 _BUILDDIR="/tmp/spotify.build"
5 _LIBS=$(ldconfig -vNX -n /usr/lib 2>/dev/null)
7 linklib() {
8         _LIB=$(echo "$_LIBS" | grep -m 1 "${1}\.so" | sed 's/\s*\([^ ]*\).*$/\1/')
9         ln -sf "/usr/lib/${_LIB}" "/usr/share/spotify/${1}.so.${2}"
12 if test "$ACTION" = "post"; then
13         . /usr/share/spotify/pkgdata
14         mkdir -p "$_BUILDDIR"
15         (
16                 set -e
17                 cd "$_BUILDDIR"
18                 xbps-uhelper fetch "http://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_${SVERSION}.deb"
19                 echo "${SCHECKSUM}  spotify-client_${SVERSION}.deb" >checksum
20                 sha256sum -c checksum
21                 ar x "spotify-client_${SVERSION}.deb"
22                 tar -xf data.tar.gz
23         )
24         if [ $? -ne 0 ] ; then
25                 echo "Failed downloading spotify client"
26                 rm -r "$_BUILDDIR";
27                 exit 1;
28         fi
30         [ -d "/usr/share/spotify/spotify-client" ] && rm -rf /usr/share/spotify/spotify-client
31         mv -f "${_BUILDDIR}/usr/share/spotify" /usr/share/spotify/spotify-client
32         for _s in 16 22 24 32 48 64 128 256 512; do
33                 mkdir -p "/usr/share/icons/hicolor/${_s}x${_s}/apps"
34                 ln -sf "/usr/share/spotify/spotify-client/icons/spotify-linux-${_s}.png" "/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
35         done
36         mkdir -p /usr/share/applications
37         ln -sf /usr/share/spotify/spotify-client/spotify.desktop /usr/share/applications/spotify.desktop
38         linklib "libssl" "1.0.0"
39         linklib "libcrypto" "1.0.0"
40         rm -r "$_BUILDDIR"