2015-01-22 00:34:14 +01: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 13:52:50 +01:00
|
|
|
_LIB=$(echo "$_LIBS" | grep -m 1 "${1}\.so" | sed 's/\s*\([^ ]*\).*$/\1/')
|
2015-03-02 10:24:58 +01:00
|
|
|
ln -sf "/usr/lib/${_LIB}" "/usr/share/spotify/libs/${1}.so.${2}"
|
2015-01-22 00:34:14 +01: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"
|
2015-03-26 19:07:58 +01:00
|
|
|
[ -f data.tar.gz ] && tar xzf data.tar.gz 2>/dev/null
|
|
|
|
[ -f data.tar.xz ] && tar xJf data.tar.xz 2>/dev/null
|
2015-01-22 00:34:14 +01:00
|
|
|
) || {
|
|
|
|
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/
|
2015-03-26 19:07:58 +01:00
|
|
|
|
|
|
|
mv -f "${_BUILDDIR}/opt/spotify/spotify-client" /usr/share/spotify/spotify-client
|
2015-01-22 00:34:14 +01:00
|
|
|
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 10:24:58 +01: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-22 00:34:14 +01:00
|
|
|
done
|
|
|
|
mkdir -p /usr/share/applications
|
2015-03-02 10:24:58 +01:00
|
|
|
ln -sf /usr/share/spotify/spotify-client/spotify.desktop /usr/share/applications/spotify.desktop
|
2015-01-22 00:34:14 +01: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
|
|
|
|
|