# Maintainer: Gadget3000 # Contributor: Eothred pkgname=spotify pkgver=0.4.8.306 _anotherpkgver=.g1df0858-1 pkgrel=2 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" if [ -f /usr/bin/gnome-session ]; then if [ "${CARCH}" = "x86_64" ]; then md5sums=('1d6830bc0bd0a2aa2ed52e3e293d86b1' 'ada23e3c8d879722a8b8a5ebc57ac24b' 'e7254fd65743703b361723f1ae9d3425' 'cd9d331db89d71250b0088b37db29304' 'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4') _carch=_amd64 elif [ "${CARCH}" = "i686" ]; then md5sums=('e36af922ac3df79400a6436ddbdfb813' 'f56dc4903ca8a320e8caa11a2cf19e61' 'e7254fd65743703b361723f1ae9d3425' 'b30c062c7cfc15567f29629e0f9fabdb' 'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4') _carch=_i386 fi depends=("alsa-lib>=1.0.14" "glibc>=2.6" "qt>=4.5.0" "gconf>=2.12" "pulseaudio") source=("http://repository.spotify.com/pool/non-free/s/${pkgname}/${pkgname}-client-gnome-support_${pkgver}${_anotherpkgver}_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=('02fe981041da696619531fdf8f193cad' 'e7254fd65743703b361723f1ae9d3425' 'b30c062c7cfc15567f29629e0f9fabdb' 'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4') _carch=_amd64 elif [ "${CARCH}" = "i686" ]; then md5sums=('f56dc4903ca8a320e8caa11a2cf19e61' 'e7254fd65743703b361723f1ae9d3425' 'b30c062c7cfc15567f29629e0f9fabdb' 'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4') _carch=_i386 fi depends=("alsa-lib>=1.0.14" "glibc>=2.6" "qt>=4.5.0" "pulseaudio") 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 || return 1 if [ -f /usr/bin/gnome-session ]; then echo "Installing with gnome support" deb2targz ${pkgname}-client-gnome-support_${pkgver}${_anotherpkgver}_all.deb > /dev/null || return 1 tar -xzf ${pkgname}-client-gnome-support_${pkgver}${_anotherpkgver}_all.tar.gz || return 1 fi mv usr/ ${pkgdir}/ #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 } #PKGBUILD Changelog: #10th October 2010:Update 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/