void-packages/srcpkgs/spotify/template
Martin Dimov d35497a5a9 spotify: update to 1.1.80.
Closes: #36073 [via git-merge-pr]
2022-03-10 16:22:47 -06:00

65 lines
1.9 KiB
Bash

# Template file for 'spotify'
pkgname=spotify
version=1.1.80
revision=1
_ver="${version}.699.gc3dac750_amd64"
_filename="spotify-client_${_ver}.deb"
archs="x86_64"
create_wrksrc=yes
build_style=fetch
hostmakedepends="curl w3m libcurl"
depends="GConf libcurl"
short_desc="Proprietary music streaming client"
maintainer="Stefan Mühlinghaus <jazzman@alphabreed.com>"
license="custom:Proprietary"
homepage="https://www.spotify.com"
distfiles="http://repository.spotify.com/pool/non-free/s/spotify-client/${_filename}"
checksum=19f80255b89d768969ff9d6a05d90091a30c05f65eabdd968592d47a7754b80e
_license_checksum=4465d0bba5deb87866184b04ba76604cd93561c0dc9cd21cacdf5b0295bdae3a
repository=nonfree
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 of Use/,/rights under these Terms, to any third party./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
}
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
ln -s /usr/lib/libcurl.so.4 ${DESTDIR}/usr/libexec/spotify/libcurl-gnutls.so.4
vlicense EULA
}