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

Untitled

By: a guest on Oct 12th, 2013  |  syntax: None  |  size: 5.31 KB  |  views: 239  |  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.9.4.183
  6. _anotherpkgver=.g644e24e.428-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-2013 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. if [ "${CARCH}" = "x86_64" ]; then
  18.   md5sums=('e5d6049689a8ef0f3699986e47478fe2'
  19.            'c9212c9dff57e23ce1b479b36df9af6a'
  20.            '3349ffd847b9ec5620f39e586e20c0b2')
  21.   _carch=_amd64
  22. elif [ "${CARCH}" = "i686" ]; then
  23.   md5sums=('4aeb0de3138d9b89a805bde84a2ac6c8')
  24.   _carch=_i386
  25. fi
  26.  
  27. md5sums+=('9a0c87ea96c460e82517a317be16c74e'
  28.           '8a59e1900d57bc3fd3b4b0e16f1bbfb3'
  29.           '8f854a0d6744f038694bdd67394554a6')
  30.  
  31. depends=("alsa-lib>=1.0.14" "glibc>=2.6" 'libxss' 'gconf' 'gtk2' 'qt4' 'systemd' 'qtwebkit'
  32.          "nspr>=4.0" "nspr<5.0" "nss" 'zenity' 'desktop-file-utils') # 'xdg-utils')
  33. #optdepends=('ffmpeg-spotify: Adds playback support for local files')
  34. source=(http://repository.spotify.com/pool/non-free/s/${pkgname}/${pkgname}-client_${pkgver}${_anotherpkgver}${_carch}.deb
  35.         https://github.com/leamas/spotify-make/raw/master/fedora/${_carch/_/}/libcrypto.so.0.9.8
  36.         https://github.com/leamas/spotify-make/raw/master/fedora/${_carch/_/}/libssl.so.0.9.8
  37.         https://raw.github.com/leamas/spotify-make/master/spotify.desktop.in
  38.         https://raw.github.com/leamas/spotify-make/master/spotify.bash.in
  39.         https://raw.github.com/leamas/spotify-make/master/spotify.1)
  40.  
  41. # see https://github.com/leamas/spotify-make -README.md and  Makefile.in
  42.  
  43. build() {
  44.   cd "${srcdir}"
  45.  
  46.   mkdir tmpdir
  47.  
  48.   ar x "${pkgname}-client_${pkgver}${_anotherpkgver}${_carch}.deb" > /dev/null
  49.   tar -xzf data.tar.gz -C tmpdir
  50. }
  51.  
  52. package() {
  53.   cd "${srcdir}"
  54.  
  55.   install -d ${pkgdir}/usr/bin
  56.   install -d ${pkgdir}/usr/{lib,share}/$pkgname
  57.  
  58.   # copy arch independent stuff to /usr/share
  59.   cp -ar tmpdir/opt/spotify/spotify-client/* ${pkgdir}/usr/share/$pkgname
  60.   cp -ar tmpdir/usr/share/doc ${pkgdir}/usr/share/
  61.   # and arch dependend stuff to /usr/lib
  62.   mv ${pkgdir}/usr/share/$pkgname/Data/libcef.so ${pkgdir}/usr/lib/$pkgname/
  63.   mv ${pkgdir}/usr/share/$pkgname/Data/SpotifyHelper ${pkgdir}/usr/lib/$pkgname/
  64.   mv ${pkgdir}/usr/share/$pkgname/spotify ${pkgdir}/usr/lib/$pkgname/
  65.  
  66.   chmod 755 ${pkgdir}/usr/lib/$pkgname/*.so
  67.  
  68.   # install outdated missing libs
  69.   install -m755 $srcdir/{libcrypto.so.0.9.8,libssl.so.0.9.8} ${pkgdir}/usr/lib/$pkgname/
  70.  
  71.   # Add links to datadir in libdir (where things are searched for)
  72.   pushd ${pkgdir}/usr/lib/$pkgname/
  73.   #ln -sf /usr/share/$pkgname/{chrome,devtools_resources}.pak .
  74.   #ln -sf /usr/share/$pkgname/locales .
  75.   ln -sf /usr/share/$pkgname/Data .
  76.   ln -sf /usr/share/$pkgname/licenses.xhtml .
  77.   popd
  78.  
  79.   # Install icons, desktop file etc.
  80.   icondir="${pkgdir}/usr/share/icons/hicolor"
  81.   src_icons="${pkgdir}/usr/share/$pkgname/Icons"
  82.         for size in 16 22 24 32 48 64 128 256 512; do
  83.             install -m 644 -pD  $src_icons/spotify-linux-$size.png $icondir/${size}x${size}/apps/spotify-client.png
  84.         done
  85.   rm -rf $pkgdir/usr/share/spotify/Icons
  86.  
  87.   install -d m644 $pkgdir/usr/share/applications
  88.   install -Dm644 $srcdir/spotify.desktop.in $pkgdir/usr/share/applications/spotify.desktop
  89.   rm $pkgdir/usr/share/spotify/spotify.desktop
  90.  
  91.   #  Manpage and wrapper script
  92.   sed -i 's|../.local/lib/spotify-client/spotify|/usr/lib/spotify/spotify|' $srcdir/spotify.bash.in
  93.   install -m 755 -p $srcdir/spotify.bash.in $pkgdir/usr/bin/$pkgname
  94.   install -m 644 -pD $srcdir/spotify.1 $pkgdir/usr/share/man/man1/$pkgname.1
  95.  
  96.   # make it find systemlibs - see also /usr/share/spotify/linklibs.sh
  97.   echo "spotify:"; ldd $pkgdir/usr/lib/spotify/spotify | grep 'not found'
  98.   echo "SpotifyHelper:"; ldd $pkgdir/usr/lib/spotify/SpotifyHelper | grep 'not found'
  99.   echo "libcef.so:"; ldd $pkgdir/usr/lib/spotify/libcef.so | grep 'not found'
  100.  
  101.   pushd ${pkgdir}/usr/lib/$pkgname/
  102.     ln -s /usr/lib/libnss3.so ${pkgdir}/usr/lib/spotify/libnss3.so.1d
  103.     ln -s /usr/lib/libnssutil3.so ${pkgdir}/usr/lib/spotify/libnssutil3.so.1d
  104.     #ln -s /usr/lib/libssl3.so ${pkgdir}/usr/lib/spotify/libssl3.so.1d
  105.     ln -s /usr/lib/libsmime3.so ${pkgdir}/usr/lib/spotify/libsmime3.so.1d
  106.     ln -s /usr/lib/libplc4.so ${pkgdir}/usr/lib/spotify/libplc4.so.0d
  107.     ln -s /usr/lib/libnspr4.so ${pkgdir}/usr/lib/spotify/libnspr4.so.0d
  108.     #ln -s /usr/lib/libplds4.so ${pkgdir}/usr/lib/spotify/libplds4.so.0d
  109.  
  110.     ln -s /usr/lib/libudev.so ${pkgdir}/usr/lib/spotify/libudev.so.0
  111.    
  112.     # This is a hack. In the future get rid of the dependency
  113.     # on openssl.
  114.     #ln -sf ${LIB_FOLDER}/libssl.so.10 libssl.so.0.9.8
  115.     #ln -sf ${LIB_FOLDER}/libcrypto.so.10 libcrypto.so.0.9.8
  116.   popd
  117.  
  118.   # links license
  119.   install -d m644 $pkgdir/usr/share/licenses/${pkgname}
  120.   pushd $pkgdir/usr/share/licenses/${pkgname}
  121.     ln -s /usr/share/doc/spotify-client/copyright .
  122.     ln -s /usr/share/spotify/licenses.xhtml .
  123.   popd
  124.  
  125.   # Copy protocol file if KDE is installed
  126. #  if [ -f /usr/bin/startkde ]; then
  127. #    echo "Installing with KDE support"
  128. #    install -Dm644 "${srcdir}/spotify.protocol" "${pkgdir}/usr/share/kde4/services/spotify.protocol"
  129. #  fi
  130. }