Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 10th, 2010  |  syntax: None  |  size: 4.75 KB  |  views: 46  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer: Gadget3000 <gadget3000@msn.com>
  2. # Contributor: Eothred <yngve.levinsen@gmail.com>
  3.  
  4. pkgname=spotify
  5. pkgver=0.4.8.306
  6. _anotherpkgver=.g1df0858-1
  7. pkgrel=2
  8. pkgdesc="A proprietary peer-to-peer music streaming service"
  9. makedepends=('deb2targz' 'tar')
  10. arch=('x86_64' 'i686')
  11. license=('custom:"Copyright (c) 2006-2010 Spotify Ltd"')
  12. url="http://www.spotify.com"
  13.  
  14. if [ -f /usr/bin/gnome-session ]; then
  15.         if [ "${CARCH}" = "x86_64" ]; then
  16.         md5sums=('1d6830bc0bd0a2aa2ed52e3e293d86b1'
  17.                  'ada23e3c8d879722a8b8a5ebc57ac24b'
  18.                  'e7254fd65743703b361723f1ae9d3425'
  19.                  'cd9d331db89d71250b0088b37db29304'
  20.                  'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4')
  21.         _carch=_amd64
  22.         elif [ "${CARCH}" = "i686" ]; then
  23.         md5sums=('e36af922ac3df79400a6436ddbdfb813'
  24.                  'f56dc4903ca8a320e8caa11a2cf19e61'
  25.                  'e7254fd65743703b361723f1ae9d3425'
  26.                  'b30c062c7cfc15567f29629e0f9fabdb'
  27.                  'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4')
  28.         _carch=_i386
  29.         fi
  30. depends=("alsa-lib>=1.0.14" "glibc>=2.6" "qt>=4.5.0" "gconf>=2.12" "pulseaudio")
  31. source=("http://repository.spotify.com/pool/non-free/s/${pkgname}/${pkgname}-client-gnome-support_${pkgver}${_anotherpkgver}_all.deb"
  32.         "http://repository.spotify.com/pool/non-free/s/${pkgname}/${pkgname}-client-qt_${pkgver}${_anotherpkgver}${_carch}.deb"
  33.         'spotify.desktop'
  34.         'spotify.png'
  35.         'spotify.protocol'
  36. )
  37.  
  38. else
  39.         if [ "${CARCH}" = "x86_64" ]; then
  40.           md5sums=('02fe981041da696619531fdf8f193cad'
  41.                    'e7254fd65743703b361723f1ae9d3425'
  42.                    'b30c062c7cfc15567f29629e0f9fabdb'
  43.                    'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4')
  44.           _carch=_amd64
  45.         elif [ "${CARCH}" = "i686" ]; then
  46.           md5sums=('f56dc4903ca8a320e8caa11a2cf19e61'
  47.                    'e7254fd65743703b361723f1ae9d3425'
  48.                    'b30c062c7cfc15567f29629e0f9fabdb'
  49.                    'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4')
  50.           _carch=_i386
  51.         fi
  52.  
  53. depends=("alsa-lib>=1.0.14" "glibc>=2.6" "qt>=4.5.0" "pulseaudio")
  54. source=("http://repository.spotify.com/pool/non-free/s/${pkgname}/${pkgname}-client-qt_${pkgver}${_anotherpkgver}${_carch}.deb"
  55.         'spotify.desktop'
  56.         'spotify.png'
  57.         'spotify.protocol'
  58. )
  59.  
  60. fi
  61.  
  62.  
  63. build() {
  64.   pwd
  65.   deb2targz ${pkgname}-client-qt_${pkgver}${_anotherpkgver}${_carch}.deb > /dev/null || return 1
  66.   tar -xzf ${pkgname}-client-qt_${pkgver}${_anotherpkgver}${_carch}.tar.gz || return 1
  67.  
  68. if [ -f /usr/bin/gnome-session ]; then
  69.   echo "Installing with gnome support"
  70.   deb2targz ${pkgname}-client-gnome-support_${pkgver}${_anotherpkgver}_all.deb > /dev/null || return 1
  71.   tar -xzf ${pkgname}-client-gnome-support_${pkgver}${_anotherpkgver}_all.tar.gz || return 1
  72. fi
  73.  
  74.   mv usr/ ${pkgdir}/
  75.  
  76. #Copy license
  77.   install -d ${pkgdir}/usr/share/licenses/${pkgname}
  78.   install -D -m644 ${pkgdir}/usr/share/doc/${pkgname}-client-qt/copyright \
  79.           ${pkgdir}/usr/share/licenses/${pkgname}/ || return 1
  80. if [ -f /usr/bin/gnome-session ]; then
  81.   install -d ${pkgdir}/usr/share/licenses/${pkgname}-client-gnome-support
  82.   install -D -m644 ${pkgdir}/usr/share/doc/${pkgname}-client-gnome-support/copyright \
  83.           ${pkgdir}/usr/share/licenses/${pkgname}-client-gnome-support/ || return 1
  84. fi
  85.  
  86. #Copy icon
  87.   install -d ${pkgdir}/usr/share/pixmaps/
  88.   install -D -m644 ${srcdir}/spotify.png ${pkgdir}/usr/share/pixmaps/ || return 1
  89.  
  90. #Copy desktop file
  91.   install -d ${pkgdir}/usr/share/applications/
  92.   install -D -m644 ${srcdir}/spotify.desktop ${pkgdir}/usr/share/applications/ || return 1
  93.  
  94. #Copy protocol file if KDE is installed
  95. if [ -f /usr/bin/startkde ]; then
  96.   echo "Installing with KDE support"
  97.   install -d ${pkgdir}/usr/share/kde4/services/
  98.   install -D -m644 ${srcdir}/spotify.protocol ${pkgdir}/usr/share/kde4/services/ || return 1
  99. fi
  100.   }
  101.  
  102. #PKGBUILD Changelog:
  103. #10th October 2010:Update spotify version
  104. #                  Updated dependencies (pulseaudio added)
  105. #29th October 2010:Updated spotify version
  106. #8th September 2010:Updated dependencies
  107. #                   SPOTIFYGNOMESUPPORT environment variable is no longer required
  108. #24th August 2010:Updated spotify version
  109. #28th July 2010:Updated spotify version
  110. #27th July 2010:More closely follows packaging etiquette at
  111. #                       http://wiki.archlinux.org/index.php/Arch_Packaging_Standards
  112. #23rd July 2010:Added AudioVideo category to the .desktop file for KDE users
  113. #               Updated spotify version
  114. #               Added KDE support
  115. #15th July 2010:Updated spotify version
  116. #13th July 2010:Added Eothred's ammendments for adding both architectures and
  117. #                       placement of the license file
  118. #               Added an icon file and desktop file
  119. #               Added Gnome support package but requires a higher version of gconf
  120. #                       than the official binaries or in the AUR.
  121.  
  122. #Spotify changelog is installed to /usr/share/doc/spotify-client-qt/
  123. #Spotify gnome-support changelog is installed to /usr/share/doc/spotify-client-gnome-support/
clone this paste RAW Paste Data