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

Untitled

By: a guest on Jan 27th, 2012  |  syntax: None  |  size: 2.34 KB  |  views: 111  |  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: Patrick Mullaney  <pajmullaney@gmail.com>
  2. # Contributor: Techlive Zheng <techlivezheng@gmail.com>
  3.  
  4. pkgname=google-musicmanager
  5. pkgver=1.0.24.7712_r0
  6. pkgrel=1
  7. pkgdesc="A simple application for adding the music files on your computer to your Google Music library."
  8. arch=('i686' 'x86_64')
  9. url="http://music.google.com"
  10. license=('custom:musicmanager')
  11. depends=('flac' 'qt' 'fontconfig' 'libogg' 'freetype2' 'libvorbis' 'xdg-utils' 'libidn')
  12. optdepends=('log4cxx')
  13. options=(!strip)
  14. install=${pkgname}.install
  15.  
  16. if [ "$CARCH" = "x86_64" ]; then
  17.     _arch='amd64'
  18.    
  19. md5sums=('21f981fda89e10791d06fc9c6ac73e67')
  20. elif [ "$CARCH" = "i686" ]; then
  21.     _arch='i386'
  22.     md5sums=('9918c083e638a00ab506e55ae80c58a3 ')
  23. fi
  24.  
  25. source=("google-musicmanager-beta_current-${_arch}.deb::http://dl.google.com/linux/direct/google-musicmanager-beta_current_${_arch}.deb")
  26.  
  27. build() {
  28.     #Get binary sources.
  29.     ar -xv google-musicmanager-beta_current-${_arch}.deb
  30.     tar -xvf data.tar.lzma
  31.     tar -xvf control.tar.gz
  32.  
  33.     #Auto fetch the latest version.
  34.     :;pkgver=`grep "Version" control | cut -d: -f2 | sed 's/^ *//g' | sed 's/ *$//g' | sed 's/-/_/g'`
  35.  
  36.     #Debian package source files cleaning.
  37.     rm -r $srcdir/etc
  38.     rm -r $srcdir/usr
  39.     rm -f $srcdir/opt/google/musicmanager/product_logo_32.xpm
  40. }
  41. package() {
  42.     #Auto fetch the latest version.
  43.     :;pkgver=`grep "Version" control | cut -d: -f2 | sed 's/^ *//g' | sed 's/ *$//g' | sed 's/-/_/g'`
  44.  
  45.     install -d $pkgdir/{opt,usr/{bin,share/applications}}
  46.  
  47.     #Install files.
  48.     cd $srcdir/opt/google/musicmanager
  49.     find . -type d -exec install -d {,${pkgdir}/opt/google/musicmanager/}{} \;
  50.     find . -type f -exec install -D -m 644 {,${pkgdir}/opt/google/musicmanager/}{} \;
  51.  
  52.     #Make google/musicmanager executable.
  53.     chmod 755 ${pkgdir}/opt/google/musicmanager/{google-musicmanager,minidump_upload,xdg-settings,xdg-mime,MusicManager}
  54.  
  55.     #Installing icons to /usr/share/icons/hicolor/
  56.     for i in 16 32 48 128
  57.     do
  58.         install -D -m644 $pkgdir/opt/google/musicmanager/product_logo_${i}.png $pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/google-musicmanager.png
  59.     done
  60.  
  61.     install -D -m644 $pkgdir/opt/google/musicmanager/google-musicmanager.desktop $pkgdir/usr/share/applications
  62.  
  63.     ln -s /opt/google/musicmanager/google-musicmanager $pkgdir/usr/bin/
  64. }
clone this paste RAW Paste Data