This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

spotify PKGBUILD

By: a guest on Mar 4th, 2013  |  syntax: None  |  size: 2.99 KB  |  views: 154  |  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.8.8.323
  6. _anotherpkgver=.gd143501.250-1
  7. pkgrel=3
  8. pkgdesc="A proprietary peer-to-peer music streaming service"
  9. arch=('x86_64' 'i686')
  10. license=('custom:"Copyright (c) 2006-2010 Spotify Ltd"')
  11. install=spotify.install
  12. url="http://www.spotify.com"
  13. changelog='spotify.changelog'
  14. options=('!strip')
  15. conflicts=('spotify-beta')
  16.  
  17. #Spotify changelog is installed to /usr/share/doc/spotify-client/
  18.  
  19. if [ "${CARCH}" = "x86_64" ]; then
  20.   md5sums=('2b7c240a742a45a873b6208f7160b3e0'
  21.            '53702d38b8bb0e1a7738805449214b54'
  22.            'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4')
  23.   _carch=_amd64
  24.   libarch=x86_64-linux-gnu
  25. elif [ "${CARCH}" = "i686" ]; then
  26.   md5sums=('c2f61cd9e2496c06af471bbc1d071f42'
  27.            '53702d38b8bb0e1a7738805449214b54'
  28.            'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4')
  29.   _carch=_i386
  30.   libarch=i386-linux-gnu
  31. fi
  32.  
  33. depends=("alsa-lib>=1.0.14" "glibc>=2.6" "libxss" "qtwebkit" "gconf" "libpng12" "openssl" "nspr")
  34. optdepends=('desktop-file-utils: Adds URI support to compatible desktop environments'
  35.             'ffmpeg-spotify: Adds playback support for local files')
  36. source=("http://repository.spotify.com/pool/non-free/s/${pkgname}/${pkgname}-client_${pkgver}${_anotherpkgver}${_carch}.deb"
  37.         'spotify'
  38.         'spotify.protocol')
  39.  
  40. build() {
  41.   cd ${srcdir}
  42.   ar x ${pkgname}-client_${pkgver}${_anotherpkgver}${_carch}.deb > /dev/null || return 1
  43.   tar -xzf data.tar.gz -C ${pkgdir} || return 1
  44. }
  45.  
  46. package() {
  47.   cd ${srcdir}
  48.  
  49.   # Bin Script
  50.   install -d "${pkgdir}/usr/bin"
  51.   install -D -m755 "${srcdir}/spotify" "${pkgdir}/usr/bin"
  52.  
  53.   # Install Ubuntu Libs
  54.   install -d "${pkgdir}/opt/spotify/libs"
  55.  
  56.   # libnspr4.so
  57.   ln -s /usr/lib/libnspr4.so "${pkgdir}/opt/spotify/libs/libnspr4.so"
  58.   ln -s /usr/lib/libnspr4.so "${pkgdir}/opt/spotify/libs/libnspr4.so.0d"
  59.  
  60.   # libplc4.so
  61.   ln -s /usr/lib/libplc4.so "${pkgdir}/opt/spotify/libs/libplc4.so"
  62.   ln -s /usr/lib/libplc4.so "${pkgdir}/opt/spotify/libs/libplc4.so.0d"
  63.  
  64.   # libnss3.so
  65.   ln -s /usr/lib/libnss3.so "${pkgdir}/opt/spotify/libs/libnss3.so.1d"
  66.  
  67.   # libnssutil3.so
  68.   ln -s /usr/lib/libnssutil3.so "${pkgdir}/opt/spotify/libs/libnssutil3.so.1d"
  69.  
  70.   # libsmime3.so
  71.   ln -s /usr/lib/libsmime3.so "${pkgdir}/opt/spotify/libs/libsmime3.so.1d"
  72.  
  73.   # libssl
  74.   ln -s /usr/lib/libcrypto.so.1.0.0 "${pkgdir}/opt/spotify/libs/libcrypto.so.0.9.8"
  75.   ln -s /usr/lib/libssl.so.1.0.0 "${pkgdir}/opt/spotify/libs/libssl.so.0.9.8"
  76.  
  77.   #Copy license
  78.   install -d ${pkgdir}/usr/share/licenses/${pkgname}
  79.   install -D -m644 ${pkgdir}/usr/share/doc/${pkgname}-client/copyright \
  80.           ${pkgdir}/usr/share/licenses/${pkgname}/ || return 1
  81.  
  82.   #Copy protocol file if KDE is installed
  83.   if [ -f /usr/bin/startkde ]; then
  84.     echo "Installing with KDE support"
  85.     install -d ${pkgdir}/usr/share/kde4/services/
  86.     install -D -m644 ${srcdir}/spotify.protocol ${pkgdir}/usr/share/kde4/services/ || return 1
  87.   fi
  88. }
clone this paste RAW Paste Data