Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

pkgbuild spotify

By: a guest on Jan 27th, 2012  |  syntax: Bash  |  size: 2.79 KB  |  views: 120  |  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.6.6.10
  6. _anotherpkgver=.gbd39032.58-1
  7. pkgrel=7
  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. install=spotify.install
  13. url="http://www.spotify.com"
  14. changelog='spotify.changelog'
  15. options=('!strip')
  16. conflicts=('spotify-beta')
  17.  
  18. #Spotify changelog is installed to /usr/share/doc/spotify-client-qt/
  19.  
  20. if [ "${CARCH}" = "x86_64" ]; then
  21.   md5sums=('405101c92eb0755973bd6ed4c3ebc0f4'
  22.            'b38dc759e47d476e34aa7a453353c494'
  23.            '5267317ef2b23cd0a1621c61474f8dc6'
  24.            'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4')
  25.   _carch=_amd64
  26. elif [ "${CARCH}" = "i686" ]; then
  27.   md5sums=('2e98d59b11387f9e74ac440de49ec11d'
  28.            'b38dc759e47d476e34aa7a453353c494'
  29.            '5267317ef2b23cd0a1621c61474f8dc6'
  30.            'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4')
  31.   _carch=_i386
  32. fi
  33.  
  34. depends=("alsa-lib>=1.0.14" "glibc>=2.6" "qt>=4.5.0" "libxss" "openssl" "qtwebkit")
  35. optdepends=('desktop-file-utils: Adds URI support to compatible desktop environments')
  36. source=("http://repository.spotify.com/pool/non-free/s/${pkgname}/${pkgname}-client-qt_${pkgver}${_anotherpkgver}${_carch}.deb"
  37.         'spotify.desktop'
  38.         'spotify.png'
  39.         'spotify.protocol')
  40.  
  41. build() {
  42.   cd ${srcdir}
  43.   ar x ${pkgname}-client-qt_${pkgver}${_anotherpkgver}${_carch}.deb > /dev/null || return 1
  44. }
  45.  
  46. package() {
  47.   cd ${srcdir}
  48.   tar -xzf data.tar.gz -C ${pkgdir} || return 1
  49.  
  50. #Copy license
  51.   install -d ${pkgdir}/usr/share/licenses/${pkgname}
  52.   install -D -m644 ${pkgdir}/usr/share/doc/${pkgname}-client-qt/copyright \
  53.           ${pkgdir}/usr/share/licenses/${pkgname}/ || return 1
  54.  
  55. #Copy icon
  56.   install -d ${pkgdir}/usr/share/pixmaps/
  57.   install -D -m644 ${srcdir}/spotify.png ${pkgdir}/usr/share/pixmaps/ || return 1
  58.  
  59. #Copy desktop file
  60.   install -d ${pkgdir}/usr/share/applications/
  61.   install -D -m644 ${srcdir}/spotify.desktop ${pkgdir}/usr/share/applications/ || return 1
  62.  
  63. #Copy protocol file if KDE is installed
  64. if [ -f /usr/bin/startkde ]; then
  65.   echo "Installing with KDE support"
  66.   install -d ${pkgdir}/usr/share/kde4/services/
  67.   install -D -m644 ${srcdir}/spotify.protocol ${pkgdir}/usr/share/kde4/services/ || return 1
  68. fi
  69.  
  70. #Link ssl 0.9.8 libraries to most up to date openssl
  71. #as long as the libraries don't already exist as a standard file (ie and isn't a symlink)
  72. if [ ! -f /usr/lib/libssl.so.0.9.8 ] || [ -L /usr/lib/libssl.so.0.9.8 ]; then
  73. if [ ! -f /usr/lib/libcrypto.so.0.9.8 ] || [ -L /usr/lib/libcrypto.so.0.9.8 ]; then
  74.   install -d ${pkgdir}/usr/lib
  75.   ln -s /usr/lib/libssl.so ${pkgdir}/usr/lib/libssl.so.0.9.8
  76.   ln -s /usr/lib/libcrypto.so ${pkgdir}/usr/lib/libcrypto.so.0.9.8
  77. fi
  78. fi
  79. }