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

spotify.PKGBUILD

By: a guest on Feb 19th, 2013  |  syntax: None  |  size: 4.07 KB  |  views: 117  |  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=1
  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.            '37ef199620c3257d1a3e3fb304f4d9b9'
  22.            'dedc9038d009da84ba889ddb3794a74c'
  23.            '53702d38b8bb0e1a7738805449214b54'
  24.            'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4')
  25.   _carch=_amd64
  26.   libarch=x86_64-linux-gnu
  27. elif [ "${CARCH}" = "i686" ]; then
  28.   md5sums=('c2f61cd9e2496c06af471bbc1d071f42'
  29.            'e2cc39229a453fb3da9662dcb87a2ad4'
  30.            '583e531ba01663791a2eaa29c3caa950'
  31.            '53702d38b8bb0e1a7738805449214b54'
  32.            'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4')
  33.   _carch=_i386
  34.   libarch=i386-linux-gnu
  35. fi
  36.  
  37. depends=("alsa-lib>=1.0.14" "glibc>=2.6" "qt>=4.5.0" "libxss" "qtwebkit" "gconf" "libpng12")
  38. optdepends=('desktop-file-utils: Adds URI support to compatible desktop environments'
  39.             'ffmpeg-spotify: Adds playback support for local files')
  40. source=("http://repository.spotify.com/pool/non-free/s/${pkgname}/${pkgname}-client_${pkgver}${_anotherpkgver}${_carch}.deb"
  41.         "http://mirrors.us.kernel.org/ubuntu/pool/main/n/nspr/libnspr4_4.8.7-0ubuntu3${_carch}.deb"
  42.         "http://mirrors.us.kernel.org/ubuntu/pool/main/q/qtwebkit-source/libqtwebkit4_2.2~2011week36-0ubuntu1${_carch}.deb"
  43.         'spotify'
  44.         'spotify.protocol')
  45.  
  46. build() {
  47.   cd ${srcdir}
  48.   ar x ${pkgname}-client_${pkgver}${_anotherpkgver}${_carch}.deb > /dev/null || return 1
  49.   tar -xzf data.tar.gz -C ${pkgdir} || return 1
  50.  
  51.   # libnspr4 - ubuntu oneiric
  52.   install -d "${srcdir}/libnspr4"
  53.   ar x "${srcdir}/libnspr4_4.8.7-0ubuntu3${_carch}.deb" > /dev/null || return 1
  54.   tar -xzf data.tar.gz -C "${srcdir}/libnspr4"
  55.  
  56.   # qtwebkit - ubuntu oneiric
  57.   install -d "${srcdir}/libqtwebkit"
  58.   ar x "${srcdir}/libqtwebkit4_2.2~2011week36-0ubuntu1${_carch}.deb" > /dev/null || return 1
  59.   tar -xf data.tar.lzma -C "${srcdir}/libqtwebkit"
  60. }
  61.  
  62. package() {
  63.   cd ${srcdir}
  64.  
  65.   # Bin Script
  66.   install -d "${pkgdir}/usr/bin"
  67.   install -D -m755 "${srcdir}/spotify" "${pkgdir}/usr/bin"
  68.  
  69.   # Install Ubuntu Libs
  70.   install -d "${pkgdir}/opt/spotify/libs"
  71.  
  72.   # libnspr4.so
  73.   install -D -m644 "${srcdir}/libnspr4/usr/lib/${libarch}/libnspr4.so" \
  74.     "${pkgdir}/opt/spotify/libs/"
  75.   ln -s ./libnspr4.so "${pkgdir}/opt/spotify/libs/libnspr4.so.0d"
  76.  
  77.   # libplc4.so
  78.   install -D -m644 "${srcdir}/libnspr4/usr/lib/$libarch/libplc4.so" \
  79.     "${pkgdir}/opt/spotify/libs/"
  80.   ln -s ./libplc4.so "${pkgdir}/opt/spotify/libs/libplc4.so.0d"
  81.  
  82.   # libnss3.so
  83.   ln -s /usr/lib/libnss3.so "${pkgdir}/opt/spotify/libs/libnss3.so.1d"
  84.  
  85.   # libnssutil3.so
  86.   ln -s /usr/lib/libnssutil3.so "${pkgdir}/opt/spotify/libs/libnssutil3.so.1d"
  87.  
  88.   # openssl
  89.   ln -s /usr/lib/libssl.so.1.0.0 "${pkgdir}/opt/spotify/libs/libssl.so.0.9.8"
  90.   ln -s /usr/lib/libcrypto.so.1.0.0 "${pkgdir}/opt/spotify/libs/libcrypto.so.0.9.8"
  91.  
  92.   # libsmime3.so
  93.   ln -s /usr/lib/libsmime3.so "${pkgdir}/opt/spotify/libs/libsmime3.so.1d"
  94.  
  95.   # libqtwebkit3.so
  96.   install -D -m644 "${srcdir}/libqtwebkit/usr/lib/${libarch}/libQtWebKit.so.4.9.0" \
  97.     "${pkgdir}/opt/spotify/libs/"
  98.   ln -s ./libQtWebKit.so.4.9.0 "${pkgdir}/opt/spotify/libs/libQtWebKit.so.4"
  99.  
  100.   #Copy license
  101.   install -d ${pkgdir}/usr/share/licenses/${pkgname}
  102.   install -D -m644 ${pkgdir}/usr/share/doc/${pkgname}-client/copyright \
  103.       ${pkgdir}/usr/share/licenses/${pkgname}/ || return 1
  104.  
  105.   #Copy protocol file if KDE is installed
  106.   if [ -f /usr/bin/startkde ]; then
  107.     echo "Installing with KDE support"
  108.     install -d ${pkgdir}/usr/share/kde4/services/
  109.     install -D -m644 ${srcdir}/spotify.protocol ${pkgdir}/usr/share/kde4/services/ || return 1
  110.   fi
  111. }
clone this paste RAW Paste Data