spotify: restrict, remove INSTALL script.
Remove dependencies that were detected automatically and libatomic.
This commit is contained in:
parent
4809f016f9
commit
2de8f963da
|
@ -1,41 +0,0 @@
|
|||
# INSTALL for 'spotify'
|
||||
# Fetching proprietary binaries at install-time
|
||||
|
||||
_BUILDDIR="/tmp/spotify.build"
|
||||
_LIBS=$(ldconfig -vNX -n usr/lib 2>/dev/null)
|
||||
|
||||
linklib() {
|
||||
_LIB=$(echo "$_LIBS" | grep -m 1 "${1}\.so" | sed 's/\s*\([^ ]*\).*$/\1/')
|
||||
ln -sf "/usr/lib/${_LIB}" "/usr/share/spotify/${1}.so.${2}"
|
||||
}
|
||||
|
||||
if test "$ACTION" = "post"; then
|
||||
. usr/share/spotify/pkgdata
|
||||
mkdir -p "$_BUILDDIR"
|
||||
(
|
||||
set -e
|
||||
cd "$_BUILDDIR"
|
||||
xbps-uhelper fetch "http://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_${SVERSION}.deb"
|
||||
echo "${SCHECKSUM} spotify-client_${SVERSION}.deb" >checksum
|
||||
sha256sum -c checksum
|
||||
ar x "spotify-client_${SVERSION}.deb"
|
||||
tar -xf data.tar.gz
|
||||
)
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "Failed downloading spotify client"
|
||||
rm -r "$_BUILDDIR";
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
[ -d "/usr/share/spotify/spotify-client" ] && rm -rf usr/share/spotify/spotify-client
|
||||
mv -f "${_BUILDDIR}/usr/share/spotify" 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"
|
||||
ln -sf "/usr/share/spotify/spotify-client/icons/spotify-linux-${_s}.png" "/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
|
||||
done
|
||||
mkdir -p usr/share/applications
|
||||
ln -sf /usr/share/spotify/spotify-client/spotify.desktop usr/share/applications/spotify.desktop
|
||||
linklib "libssl" "1.0.0"
|
||||
linklib "libcrypto" "1.0.0"
|
||||
rm -r "$_BUILDDIR"
|
||||
fi
|
|
@ -1,11 +0,0 @@
|
|||
# REMOVE for 'spotify'
|
||||
# Deleting dynamically fetched files
|
||||
|
||||
if test "$ACTION" = "post"; then
|
||||
rm usr/share/applications/spotify.desktop
|
||||
for _s in 16 22 24 32 48 64 128 256 512; do
|
||||
rm "/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
|
||||
done
|
||||
rm -r usr/share/spotify
|
||||
fi
|
||||
|
|
@ -1,2 +1,2 @@
|
|||
#!/bin/sh
|
||||
LD_LIBRARY_PATH=/usr/share/spotify exec /usr/share/spotify/spotify-client/spotify "$@"
|
||||
LD_LIBRARY_PATH=/usr/libexec/spotify exec /usr/libexec/spotify/spotify "$@"
|
||||
|
|
|
@ -1,21 +1,72 @@
|
|||
# Template file for 'spotify'
|
||||
pkgname=spotify
|
||||
version=1.1.26
|
||||
revision=1
|
||||
revision=2
|
||||
_ver="${version}.501.gbe11e53b-15_amd64"
|
||||
_filename="spotify-client_${_ver}.deb"
|
||||
archs="x86_64"
|
||||
create_wrksrc=yes
|
||||
build_style=fetch
|
||||
depends="binutils gtk+ nss GConf libXScrnSaver libatomic"
|
||||
hostmakedepends="curl w3m"
|
||||
depends="GConf"
|
||||
short_desc="Proprietary music streaming client"
|
||||
maintainer="Stefan Mühlinghaus <jazzman@alphabreed.com>"
|
||||
license="Proprietary"
|
||||
license="custom:Proprietary"
|
||||
homepage="https://www.spotify.com"
|
||||
distfiles="http://repository.spotify.com/pool/non-free/s/spotify-client/${_filename}"
|
||||
checksum=54ba1bd91020913273c469591cedeebfa34aedc250033dde7c8b3fded94a9c71
|
||||
_license_checksum=4a66993926096dd60fb03d7d82bd806f2f4b2d6ab2970aa0462e669f51f076a0
|
||||
repository=nonfree
|
||||
_sversion=".501.gbe11e53b-15_amd64"
|
||||
_schecksum="54ba1bd91020913273c469591cedeebfa34aedc250033dde7c8b3fded94a9c71"
|
||||
do_install() {
|
||||
vbin ${FILESDIR}/spotify
|
||||
vmkdir usr/share/spotify
|
||||
echo "export SVERSION=\"${version}${_sversion}\"" >"${DESTDIR}/usr/share/spotify/pkgdata"
|
||||
echo "export SCHECKSUM=\"${_schecksum}\"" >>"${DESTDIR}/usr/share/spotify/pkgdata"
|
||||
restricted=yes
|
||||
nostrip=yes
|
||||
|
||||
post_extract() {
|
||||
curl -L https://www.spotify.com/us/legal/end-user-agreement/ |
|
||||
w3m -dump -I utf-8 -T text/html |
|
||||
sed -n '/Spotify Terms and Conditions of Use/,/^USA$/p' > EULA
|
||||
|
||||
filesum="$(xbps-digest EULA)"
|
||||
if [ "$filesum" != "$_license_checksum" ]; then
|
||||
msg_error "SHA256 mismatch for EULA:\n$filesum\n"
|
||||
fi
|
||||
}
|
||||
|
||||
do_build() {
|
||||
ar x "${_filename}"
|
||||
bsdtar -xf data.tar.gz
|
||||
}
|
||||
|
||||
_linklib() {
|
||||
local LIB
|
||||
LIB="$(find /usr/lib -name "${1}.so*" | sort | tail -1)"
|
||||
ln -sf "${LIB}" "${DESTDIR}/usr/libexec/spotify/${1}.so.${2}"
|
||||
}
|
||||
|
||||
do_install() {
|
||||
vbin "${FILESDIR}/spotify"
|
||||
|
||||
vmkdir usr/share/spotify
|
||||
vmkdir usr/share/applications
|
||||
vmkdir usr/libexec/
|
||||
vcopy usr/share/spotify usr/libexec/
|
||||
|
||||
# move icons to /usr/share
|
||||
mv "${DESTDIR}/usr/libexec/spotify/icons" "${DESTDIR}/usr/share/spotify/"
|
||||
|
||||
# install icons
|
||||
for _s in 16 22 24 32 48 64 128 256 512; do
|
||||
vmkdir "usr/share/icons/hicolor/${_s}x${_s}/apps"
|
||||
ln -sf "/usr/share/spotify/icons/spotify-linux-${_s}.png" \
|
||||
"${DESTDIR}/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
|
||||
done
|
||||
|
||||
vmkdir usr/share/applications
|
||||
mv "${DESTDIR}/usr/libexec/spotify/spotify.desktop" \
|
||||
"${DESTDIR}/usr/share/applications/spotify.desktop"
|
||||
|
||||
# provide dynamic libraries
|
||||
_linklib libssl 1.0.0
|
||||
_linklib libcrypto 1.0.0
|
||||
|
||||
vlicense EULA
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue