2015-01-21 23:34:14 +00:00
|
|
|
# INSTALL for 'spotify'
|
|
|
|
# Fetching proprietary binaries at install-time
|
|
|
|
|
|
|
|
_BUILDDIR="/tmp/spotify.build"
|
|
|
|
_LIBS=$(ldconfig -vNX -n /usr/lib 2>/dev/null)
|
|
|
|
|
|
|
|
linklib() {
|
2015-01-22 12:52:50 +00:00
|
|
|
_LIB=$(echo "$_LIBS" | grep -m 1 "${1}\.so" | sed 's/\s*\([^ ]*\).*$/\1/')
|
2015-03-02 09:24:58 +00:00
|
|
|
ln -sf "/usr/lib/${_LIB}" "/usr/share/spotify/libs/${1}.so.${2}"
|
2015-01-21 23:34:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if test "$ACTION" = "post"; then
|
|
|
|
. /usr/share/spotify/pkgdata
|
|
|
|
mkdir -p "$_BUILDDIR"
|
|
|
|
(
|
|
|
|
cd "$_BUILDDIR"
|
|
|
|
xbps-uhelper fetch "http://repository.spotify.com/pool/non-free/s/spotify/spotify-client_${SVERSION}.deb"
|
|
|
|
echo "${SCHECKSUM} spotify-client_${SVERSION}.deb" >checksum
|
|
|
|
sha256sum -c checksum || exit 1
|
|
|
|
ar x "spotify-client_${SVERSION}.deb"
|
|
|
|
tar xzf data.tar.gz 2>/dev/null
|
|
|
|
) || {
|
|
|
|
echo Error while extracting;
|
|
|
|
rm -r "$_BUILDDIR";
|
|
|
|
exit 1;
|
|
|
|
}
|
|
|
|
mkdir -p /usr/share/licenses/spotify
|
|
|
|
mv "${_BUILDDIR}/usr/share/doc/spotify-client/copyright" /usr/share/licenses/spotify/
|
|
|
|
mv "${_BUILDDIR}/opt/spotify/spotify-client" /usr/share/spotify/spotify-client
|
|
|
|
for _s in 16 22 24 32 48 64 128 256 512; do
|
|
|
|
mkdir -p "/usr/share/icons/hicolor/${_s}x${_s}/apps"
|
2015-03-02 09:24:58 +00:00
|
|
|
ln -sf "/usr/share/spotify/spotify-client/Icons/spotify-linux-${_s}.png" "/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
|
2015-01-21 23:34:14 +00:00
|
|
|
done
|
|
|
|
mkdir -p /usr/share/applications
|
2015-03-02 09:24:58 +00:00
|
|
|
ln -sf /usr/share/spotify/spotify-client/spotify.desktop /usr/share/applications/spotify.desktop
|
2015-01-21 23:34:14 +00:00
|
|
|
|
|
|
|
if test "$ARCH" = "x86_64"; then
|
|
|
|
linklib "libssl" "1.0.0"
|
|
|
|
linklib "libcrypto" "1.0.0"
|
|
|
|
linklib "libudev" "0"
|
|
|
|
else
|
|
|
|
linklib "libssl" "0.9.8"
|
|
|
|
linklib "libcrypto" "0.9.8"
|
|
|
|
linklib "libnss3" "1d"
|
|
|
|
linklib "libnssutil3" "1d"
|
|
|
|
linklib "libsmime3" "1d"
|
|
|
|
linklib "libplc4" "0d"
|
|
|
|
linklib "libnspr4" "0d"
|
|
|
|
linklib "libudev" "0"
|
|
|
|
fi
|
|
|
|
|
|
|
|
rm -r "$_BUILDDIR"
|
|
|
|
fi
|
|
|
|
|