void-packages/srcpkgs/spotify/template

74 lines
2.8 KiB
Text
Raw Normal View History

2015-01-19 20:51:40 +00:00
# Template build file for 'spotify'.
pkgname=spotify
version=0.9
revision=1
short_desc="Proprietary music streaming client"
maintainer="Stefan Mühlinghaus <jazzman@alphabreed.com>"
homepage="https://www.spotify.com"
license="Proprietary"
create_wrksrc=1
allow_unknown_shlibs=1
only_for_archs="x86_64 i686"
repository=nonfree
build_style=fetch
makedepends="libgpg-error-devel"
if test "${XBPS_TARGET_MACHINE}" = "x86_64"; then
_sversion=".11.27.g2b1a638.81-1_amd64"
_schecksum="4f93776cac562f622e635c64fa61ee46cb9bdfbda0a2aff0905acf007894d479"
else
_sversion=".4.183.g644e24e.428-1_i386"
_schecksum="ca45d057357e4c30efee3838dd941222500463ddd0a1db6981e4d48d7ad986f2"
depends="nss"
fi
distfiles="http://repository.spotify.com/pool/non-free/s/spotify/spotify-client_${version}${_sversion}.deb
ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.5.4.tar.bz2"
checksum="${_schecksum}
d5f88d9f41a46953dc250cdb8575129b37ee2208401b7fa338c897f667c7fb33"
do_extract() {
local _srcpath="${XBPS_SRCDISTDIR}/spotify-${version}"
ar x "${_srcpath}/spotify-client_${version}${_sversion}.deb"
tar xzf data.tar.gz
tar xjf "${_srcpath}/libgcrypt-1.5.4.tar.bz2"
}
do_build() {
cd libgcrypt-1.5.4
./configure ${configure_args}
make
}
do_install() {
vbin "${FILESDIR}/spotify"
vlicense usr/share/doc/spotify-client/copyright
vmkdir usr/share
vcopy opt/spotify usr/share
vmkdir usr/share/applications
ln -sf /usr/share/spotify/spotify-client/spotify.desktop "${DESTDIR}/usr/share/applications/spotify.desktop"
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/spotify-client/Icons/spotify-linux-${_s}.png" "${DESTDIR}/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify.png"
done
vmkdir usr/share/spotify/libs
vinstall libgcrypt-1.5.4/src/.libs/libgcrypt.so.11.8.3 755 usr/share/spotify/libs libgcrypt.so.11
if test "${XBPS_TARGET_MACHINE}" = "x86_64"; then
ln -sf /usr/lib/libssl.so.29 "${DESTDIR}/usr/share/spotify/libs/libssl.so.1.0.0"
ln -sf /usr/lib/libcrypto.so.30 "${DESTDIR}/usr/share/spotify/libs/libcrypto.so.1.0.0"
ln -sf /usr/lib/libudev.so.1 "${DESTDIR}/usr/share/spotify/libs/libudev.so.0"
else
ln -sf /usr/lib/libssl.so.29 "${DESTDIR}/usr/share/spotify/libs/libssl.so.0.9.8"
ln -sf /usr/lib/libcrypto.so.30 "${DESTDIR}/usr/share/spotify/libs/libcrypto.so.0.9.8"
ln -sf /usr/lib/libnss3.so "${DESTDIR}/usr/share/spotify/libs/libnss3.so.1d"
ln -sf /usr/lib/libnssutil3.so "${DESTDIR}/usr/share/spotify/libs/libnssutil3.so.1d"
ln -sf /usr/lib/libsmime3.so "${DESTDIR}/usr/share/spotify/libs/libsmime3.so.1d"
ln -sf /usr/lib/libplc4.so "${DESTDIR}/usr/share/spotify/libs/libplc4.so.0d"
ln -sf /usr/lib/libnspr4.so "${DESTDIR}/usr/share/spotify/libs/libnspr4.so.0d"
ln -sf /usr/lib/libudev.so.1 "${DESTDIR}/usr/share/spotify/libs/libudev.so.0"
fi
}