# Maintainer: Gadget3000 <gadget3000@msn.com>
# Contributor: Eothred <yngve.levinsen@gmail.com>
# Contributor (slightly): Extreme_Tomato <stephenwattam@gmail.com>
pkgname=spotify
pkgver=0.6.2.291
_anotherpkgver=.gcccc1f5.116-1
pkgrel=1
pkgdesc="A proprietary peer-to-peer music streaming service"
makedepends=('deb2targz' 'tar')
arch=('x86_64' 'i686')
license=('custom:"Copyright (c) 2006-2010 Spotify Ltd"')
url="http://www.spotify.com"
changelog=('spotify.changelog')
if [ -f /usr/bin/gnome-session ]; then
if [ "${CARCH}" = "x86_64" ]; then
md5sums=('36db1cd30b76d015d5799a400cb90fef'
'9772c75591d0214186bcbfad792214eb'
'e7254fd65743703b361723f1ae9d3425'
'b30c062c7cfc15567f29629e0f9fabdb'
'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4')
_carch=_amd64
elif [ "${CARCH}" = "i686" ]; then
md5sums=('36db1cd30b76d015d5799a400cb90fef'
'c8f7b713b4200edfe0bb63be128d3aab'
'e7254fd65743703b361723f1ae9d3425'
'b30c062c7cfc15567f29629e0f9fabdb'
'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4')
_carch=_i386
fi
depends=("alsa-lib>=1.0.14" "glibc>=2.6" "qt>=4.5.0" "gconf>=2.12" "libxss" "openssl")
source=("http://repository.spotify.com/pool/non-free/s/${pkgname}/${pkgname}-client-gnome-support_0.5.2.84.g6d797eb-1_all.deb"
"http://repository.spotify.com/pool/non-free/s/${pkgname}/${pkgname}-client-qt_${pkgver}${_anotherpkgver}${_carch}.deb"
'spotify.desktop'
'spotify.png'
'spotify.protocol'
)
else
if [ "${CARCH}" = "x86_64" ]; then
md5sums=('9772c75591d0214186bcbfad792214eb'
'e7254fd65743703b361723f1ae9d3425'
'b30c062c7cfc15567f29629e0f9fabdb'
'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4')
_carch=_amd64
elif [ "${CARCH}" = "i686" ]; then
md5sums=('c8f7b713b4200edfe0bb63be128d3aab'
'e7254fd65743703b361723f1ae9d3425'
'b30c062c7cfc15567f29629e0f9fabdb'
'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4')
_carch=_i386
fi
depends=("alsa-lib>=1.0.14" "glibc>=2.6" "qt>=4.5.0" "libxss" "openssl")
source=("http://repository.spotify.com/pool/non-free/s/${pkgname}/${pkgname}-client-qt_${pkgver}${_anotherpkgver}${_carch}.deb"
'spotify.desktop'
'spotify.png'
'spotify.protocol'
)
fi
build() {
pwd
deb2targz ${pkgname}-client-qt_${pkgver}${_anotherpkgver}${_carch}.deb > /dev/null || return 1
# tar -xzf ${pkgname}-client-qt_${pkgver}${_anotherpkgver}${_carch}.tar.gz -C ${pkgdir} || return 1
if [ -f /usr/bin/gnome-session ]; then
echo "Installing with gnome support"
deb2targz ${pkgname}-client-gnome-support_0.5.2.84.g6d797eb-1_all.deb > /dev/null || return 1
# tar -xzf ${pkgname}-client-gnome-support_0.5.2.84.g6d797eb-1_all.tar.gz -C ${pkgdir} || return 1
fi
}
package() {
tar -xzf ${pkgname}-client-qt_${pkgver}${_anotherpkgver}${_carch}.tar.gz -C ${pkgdir} || return 1
if [ -f /usr/bin/gnome-session ]; then
tar -xzf ${pkgname}-client-gnome-support_0.5.2.84.g6d797eb-1_all.tar.gz -C ${pkgdir} || return 1
fi
#Copy license
install -d ${pkgdir}/usr/share/licenses/${pkgname}
install -D -m644 ${pkgdir}/usr/share/doc/${pkgname}-client-qt/copyright \
${pkgdir}/usr/share/licenses/${pkgname}/ || return 1
if [ -f /usr/bin/gnome-session ]; then
install -d ${pkgdir}/usr/share/licenses/${pkgname}-client-gnome-support
install -D -m644 ${pkgdir}/usr/share/doc/${pkgname}-client-gnome-support/copyright \
${pkgdir}/usr/share/licenses/${pkgname}-client-gnome-support/ || return 1
fi
#Copy icon
install -d ${pkgdir}/usr/share/pixmaps/
install -D -m644 ${srcdir}/spotify.png ${pkgdir}/usr/share/pixmaps/ || return 1
#Copy desktop file
install -d ${pkgdir}/usr/share/applications/
install -D -m644 ${srcdir}/spotify.desktop ${pkgdir}/usr/share/applications/ || return 1
#Copy protocol file if KDE is installed
if [ -f /usr/bin/startkde ]; then
echo "Installing with KDE support"
install -d ${pkgdir}/usr/share/kde4/services/
install -D -m644 ${srcdir}/spotify.protocol ${pkgdir}/usr/share/kde4/services/ || return 1
fi
#Link ssl 0.9.8 libraries to most up to date openssl
if [ -z "$(pacman -Qs openssl | grep 0.9.8)"]; then
install -d ${pkgdir}/usr/lib
ln -s /usr/lib/libssl.so ${pkgdir}/usr/lib/libssl.so.0.9.8
ln -s /usr/lib/libcrypto.so ${pkgdir}/usr/lib/libcrypto.so.0.9.8
fi
}
#PKGBUILD Changelog:
#14th October 2011: Updated spotify version [Stephen Wattam]
#23rd September 2011:Updated spotify version
# Added openssl as a dependency
#20th July 2011:Updated spotify version
#7th June 2011:Updated spotify version
#24th December 2010:Updated spotify version
#16th December 2010:Added libxss as a dependency
#28th November 2010:Replaced pulseaudio in the dependencies with libpulse
#11th November 2010:Updated spotify version
#10th November 2010:Updated spotify version
# Updated dependencies (pulseaudio added)
#29th October 2010:Updated spotify version
#8th September 2010:Updated dependencies
# SPOTIFYGNOMESUPPORT environment variable is no longer required
#24th August 2010:Updated spotify version
#28th July 2010:Updated spotify version
#27th July 2010:More closely follows packaging etiquette at
# http://wiki.archlinux.org/index.php/Arch_Packaging_Standards
#23rd July 2010:Added AudioVideo category to the .desktop file for KDE users
# Updated spotify version
# Added KDE support
#15th July 2010:Updated spotify version
#13th July 2010:Added Eothred's ammendments for adding both architectures and
# placement of the license file
# Added an icon file and desktop file
# Added Gnome support package but requires a higher version of gconf
# than the official binaries or in the AUR.
#Spotify changelog is installed to /usr/share/doc/spotify-client-qt/
#Spotify gnome-support changelog is installed to /usr/share/doc/spotify-client-gnome-support/