updated on Sun Jan 15 08:01:04 UTC 2012
[aur-mirror.git] / spotify / PKGBUILD
blob53bc236c98fad354fea21be22f51c1e83f7738f4
1 # Maintainer: Gadget3000 <gadget3000@msn.com>
2 # Contributor: Eothred <yngve.levinsen@gmail.com>
4 pkgname=spotify
5 pkgver=0.6.2.291
6 _anotherpkgver=.gcccc1f5.116-1
7 pkgrel=5
8 pkgdesc="A proprietary peer-to-peer music streaming service"
9 makedepends=('tar')
10 arch=('x86_64' 'i686')
11 license=('custom:"Copyright (c) 2006-2010 Spotify Ltd"')
12 url="http://www.spotify.com"
13 changelog='spotify.changelog'
14 options=('!strip')
15 conflicts=('spotify-beta')
17 #Spotify changelog is installed to /usr/share/doc/spotify-client-qt/
19 if [ "${CARCH}" = "x86_64" ]; then
20   md5sums=('9772c75591d0214186bcbfad792214eb'
21            'a6352bd4af8682ff7c55a2beacbcecb2'
22            'b30c062c7cfc15567f29629e0f9fabdb'
23            'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4')
24   _carch=_amd64
25 elif [ "${CARCH}" = "i686" ]; then
26   md5sums=('c8f7b713b4200edfe0bb63be128d3aab'
27            'a6352bd4af8682ff7c55a2beacbcecb2'
28            'b30c062c7cfc15567f29629e0f9fabdb'
29            'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4')
30   _carch=_i386
33 depends=("alsa-lib>=1.0.14" "glibc>=2.6" "qt>=4.5.0" "libxss" "openssl" "qtwebkit")
34 source=("http://repository.spotify.com/pool/non-free/s/${pkgname}/${pkgname}-client-qt_${pkgver}${_anotherpkgver}${_carch}.deb"
35         'spotify.desktop'
36         'spotify.png'
37         'spotify.protocol')
39 build() {
40   cd ${srcdir}
41   ar x ${pkgname}-client-qt_${pkgver}${_anotherpkgver}${_carch}.deb > /dev/null || return 1
44 package() {
45   cd ${srcdir}
46   tar -xzf data.tar.gz -C ${pkgdir} || return 1
48 #Copy license
49   install -d ${pkgdir}/usr/share/licenses/${pkgname}
50   install -D -m644 ${pkgdir}/usr/share/doc/${pkgname}-client-qt/copyright \
51           ${pkgdir}/usr/share/licenses/${pkgname}/ || return 1
53 #Copy icon
54   install -d ${pkgdir}/usr/share/pixmaps/
55   install -D -m644 ${srcdir}/spotify.png ${pkgdir}/usr/share/pixmaps/ || return 1
57 #Copy desktop file
58   install -d ${pkgdir}/usr/share/applications/
59   install -D -m644 ${srcdir}/spotify.desktop ${pkgdir}/usr/share/applications/ || return 1
61 #Copy protocol file if KDE is installed
62 if [ -f /usr/bin/startkde ]; then
63   echo "Installing with KDE support"
64   install -d ${pkgdir}/usr/share/kde4/services/
65   install -D -m644 ${srcdir}/spotify.protocol ${pkgdir}/usr/share/kde4/services/ || return 1
68 #Link ssl 0.9.8 libraries to most up to date openssl
69 #as long as the libraries don't already exist as a standard file (ie and isn't a symlink)
70 if [ ! -f /usr/lib/libssl.so.0.9.8 ] || [ -L /usr/lib/libssl.so.0.9.8 ]; then 
71 if [ ! -f /usr/lib/libcrypto.so.0.9.8 ] || [ -L /usr/lib/libcrypto.so.0.9.8 ]; then
72   install -d ${pkgdir}/usr/lib
73   ln -s /usr/lib/libssl.so ${pkgdir}/usr/lib/libssl.so.0.9.8
74   ln -s /usr/lib/libcrypto.so ${pkgdir}/usr/lib/libcrypto.so.0.9.8