# Template build file for 'spotify'.
pkgname=spotify
version=1.0.37
revision=1
short_desc="Proprietary music streaming client"
maintainer="Stefan Mühlinghaus <jazzman@alphabreed.com>"
homepage="https://www.spotify.com"
license="Proprietary"
create_wrksrc=yes
only_for_archs="x86_64 i686"
repository=nonfree
build_style=fetch
depends="binutils gtk+ nss GConf libXScrnSaver xz"

if test "${XBPS_TARGET_MACHINE}" = "x86_64"; then
	_sversion=".152.gc83ea995-42_amd64"
	_schecksum="9da56b2f696159361bcf6eac0a218ef0a669802f8deb3be17dbf25cb062e0d02"
else
	_sversion=".152.gc83ea995-42_i386"
	_schecksum="a5a33f167491455df03f791b818c64e90f4a35b0d83284bb223e15bd4a45f228"
fi

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"
}
