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

Spotify PKGBUILD

By: a guest on Oct 14th, 2011  |  syntax: Bash  |  size: 5.81 KB  |  views: 60  |  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. # Contributor (slightly): Extreme_Tomato <stephenwattam@gmail.com>
  4.  
  5. pkgname=spotify
  6. pkgver=0.6.2.291
  7. _anotherpkgver=.gcccc1f5.116-1
  8. pkgrel=1
  9. pkgdesc="A proprietary peer-to-peer music streaming service"
  10. makedepends=('deb2targz' 'tar')
  11. arch=('x86_64' 'i686')
  12. license=('custom:"Copyright (c) 2006-2010 Spotify Ltd"')
  13. url="http://www.spotify.com"
  14. changelog=('spotify.changelog')
  15.  
  16. if [ -f /usr/bin/gnome-session ]; then
  17.         if [ "${CARCH}" = "x86_64" ]; then
  18.         md5sums=('36db1cd30b76d015d5799a400cb90fef'
  19.                  '9772c75591d0214186bcbfad792214eb'
  20.                  'e7254fd65743703b361723f1ae9d3425'
  21.                  'b30c062c7cfc15567f29629e0f9fabdb'
  22.                  'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4')
  23.         _carch=_amd64
  24.         elif [ "${CARCH}" = "i686" ]; then
  25.         md5sums=('36db1cd30b76d015d5799a400cb90fef'
  26.                  'c8f7b713b4200edfe0bb63be128d3aab'
  27.                  'e7254fd65743703b361723f1ae9d3425'
  28.                  'b30c062c7cfc15567f29629e0f9fabdb'
  29.                  'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4')
  30.         _carch=_i386
  31.         fi
  32. depends=("alsa-lib>=1.0.14" "glibc>=2.6" "qt>=4.5.0" "gconf>=2.12" "libxss" "openssl")
  33. source=("http://repository.spotify.com/pool/non-free/s/${pkgname}/${pkgname}-client-gnome-support_0.5.2.84.g6d797eb-1_all.deb"
  34.         "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'
  38. )
  39.  
  40.  
  41.  
  42. else
  43.         if [ "${CARCH}" = "x86_64" ]; then
  44.           md5sums=('9772c75591d0214186bcbfad792214eb'
  45.                    'e7254fd65743703b361723f1ae9d3425'
  46.                    'b30c062c7cfc15567f29629e0f9fabdb'
  47.                    'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4')
  48.           _carch=_amd64
  49.         elif [ "${CARCH}" = "i686" ]; then
  50.           md5sums=('c8f7b713b4200edfe0bb63be128d3aab'
  51.                    'e7254fd65743703b361723f1ae9d3425'
  52.                    'b30c062c7cfc15567f29629e0f9fabdb'
  53.                    'ef25ddc5b6bf8fe1a0d64cbd79e1f7b4')
  54.           _carch=_i386
  55.         fi
  56.  
  57. depends=("alsa-lib>=1.0.14" "glibc>=2.6" "qt>=4.5.0" "libxss" "openssl")
  58. source=("http://repository.spotify.com/pool/non-free/s/${pkgname}/${pkgname}-client-qt_${pkgver}${_anotherpkgver}${_carch}.deb"
  59.         'spotify.desktop'
  60.         'spotify.png'
  61.         'spotify.protocol'
  62. )
  63.  
  64. fi
  65.  
  66.  
  67. build() {
  68.   pwd
  69.   deb2targz ${pkgname}-client-qt_${pkgver}${_anotherpkgver}${_carch}.deb > /dev/null || return 1
  70. #  tar -xzf ${pkgname}-client-qt_${pkgver}${_anotherpkgver}${_carch}.tar.gz -C ${pkgdir} || return 1
  71.  
  72. if [ -f /usr/bin/gnome-session ]; then
  73.   echo "Installing with gnome support"
  74.   deb2targz ${pkgname}-client-gnome-support_0.5.2.84.g6d797eb-1_all.deb > /dev/null || return 1
  75. #  tar -xzf ${pkgname}-client-gnome-support_0.5.2.84.g6d797eb-1_all.tar.gz -C ${pkgdir} || return 1
  76. fi
  77. }
  78.  
  79. package() {
  80.  
  81. tar -xzf ${pkgname}-client-qt_${pkgver}${_anotherpkgver}${_carch}.tar.gz -C ${pkgdir} || return 1
  82.  
  83. if [ -f /usr/bin/gnome-session ]; then
  84.   tar -xzf ${pkgname}-client-gnome-support_0.5.2.84.g6d797eb-1_all.tar.gz -C ${pkgdir} || return 1
  85. fi
  86.  
  87. #Copy license
  88.   install -d ${pkgdir}/usr/share/licenses/${pkgname}
  89.   install -D -m644 ${pkgdir}/usr/share/doc/${pkgname}-client-qt/copyright \
  90.           ${pkgdir}/usr/share/licenses/${pkgname}/ || return 1
  91. if [ -f /usr/bin/gnome-session ]; then
  92.   install -d ${pkgdir}/usr/share/licenses/${pkgname}-client-gnome-support
  93.   install -D -m644 ${pkgdir}/usr/share/doc/${pkgname}-client-gnome-support/copyright \
  94.           ${pkgdir}/usr/share/licenses/${pkgname}-client-gnome-support/ || return 1
  95. fi
  96.  
  97. #Copy icon
  98.   install -d ${pkgdir}/usr/share/pixmaps/
  99.   install -D -m644 ${srcdir}/spotify.png ${pkgdir}/usr/share/pixmaps/ || return 1
  100.  
  101. #Copy desktop file
  102.   install -d ${pkgdir}/usr/share/applications/
  103.   install -D -m644 ${srcdir}/spotify.desktop ${pkgdir}/usr/share/applications/ || 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.  
  112. #Link ssl 0.9.8 libraries to most up to date openssl
  113. if [ -z "$(pacman -Qs openssl | grep 0.9.8)"]; then
  114.   install -d ${pkgdir}/usr/lib
  115.   ln -s /usr/lib/libssl.so ${pkgdir}/usr/lib/libssl.so.0.9.8
  116.   ln -s /usr/lib/libcrypto.so ${pkgdir}/usr/lib/libcrypto.so.0.9.8
  117. fi
  118. }
  119.  
  120. #PKGBUILD Changelog:
  121. #14th October 2011: Updated spotify version [Stephen Wattam]
  122. #23rd September 2011:Updated spotify version
  123. #                    Added openssl as a dependency
  124. #20th July 2011:Updated spotify version
  125. #7th June 2011:Updated spotify version
  126. #24th December 2010:Updated spotify version
  127. #16th December 2010:Added libxss as a dependency
  128. #28th November 2010:Replaced pulseaudio in the dependencies with libpulse
  129. #11th November 2010:Updated spotify version
  130. #10th November 2010:Updated spotify version
  131. #                  Updated dependencies (pulseaudio added)
  132. #29th October 2010:Updated spotify version
  133. #8th September 2010:Updated dependencies
  134. #                   SPOTIFYGNOMESUPPORT environment variable is no longer required
  135. #24th August 2010:Updated spotify version
  136. #28th July 2010:Updated spotify version
  137. #27th July 2010:More closely follows packaging etiquette at
  138. #                       http://wiki.archlinux.org/index.php/Arch_Packaging_Standards
  139. #23rd July 2010:Added AudioVideo category to the .desktop file for KDE users
  140. #               Updated spotify version
  141. #               Added KDE support
  142. #15th July 2010:Updated spotify version
  143. #13th July 2010:Added Eothred's ammendments for adding both architectures and
  144. #                       placement of the license file
  145. #               Added an icon file and desktop file
  146. #               Added Gnome support package but requires a higher version of gconf
  147. #                       than the official binaries or in the AUR.
  148.  
  149. #Spotify changelog is installed to /usr/share/doc/spotify-client-qt/
  150. #Spotify gnome-support changelog is installed to /usr/share/doc/spotify-client-gnome-support/
  151.  
  152.  
clone this paste RAW Paste Data