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

archlinux-google-musicmanager-pkgbuild

By: a guest on Sep 22nd, 2011  |  syntax: Bash  |  size: 2.23 KB  |  views: 106  |  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.16.6403
  6. pkgrel=1
  7. pkgdesc="A simple application for adding the music files on your computer to your 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. install=${pkgname}.install
  13.  
  14. if [ "$CARCH" = "i686" ]; then
  15.     options=(!strip)
  16.     _arch='i386'    
  17.     md5sums=('412ed6fad2c7b0971f801ea2a8cdefb0')
  18. elif [ "$CARCH" = "x86_64" ]; then
  19.     _arch='amd64'
  20.     md5sums=('1bce82a86ee96581899388fc27027c05')
  21. fi
  22.  
  23. source=("http://dl.google.com/linux/direct/google-musicmanager-beta_current_${_arch}.deb")
  24.  
  25. build() {
  26.     #Get binary sources.
  27.     ar -xv google-musicmanager-beta_current_${_arch}.deb || return 1
  28.     tar -xvf data.tar.lzma || return 1
  29.  
  30.     #This crontab script is for debian only,remove it.
  31.     rm -r $srcdir/etc
  32.  
  33.     #Change install path in all files.
  34.     cd $srcdir/opt/google/musicmanager
  35.     find . -type f | xargs sed -i 's:/google/musicmanager:/google-musicmanager:g' || return 1
  36. }
  37. package() {
  38.     install -d "$pkgdir"/{opt,usr/{bin,share/applications}}
  39.  
  40.     #Install files.
  41.     cd $srcdir/opt/google/musicmanager
  42.     find . -type d -exec install -d {,${pkgdir}/opt/google-musicmanager/}{} \; || return 1
  43.     find . -type f -exec install -D -m 644 {,${pkgdir}/opt/google-musicmanager/}{} \; || return 1
  44.  
  45.     mv $pkgdir/opt/google-musicmanager/google-musicmanager.desktop $pkgdir/usr/share/applications
  46.  
  47.     # Installing icons to /usr/share/icons/hicolor/
  48.     rm $pkgdir/opt/google-musicmanager/product_logo_32.xpm
  49.     for i in 16 32 48 128
  50.     do
  51.         install -D -m644 $pkgdir/opt/google-musicmanager/product_logo_${i}.png $pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/google-musicmanager.png
  52.         rm $pkgdir/opt/google-musicmanager/product_logo_${i}.png
  53.     done
  54.  
  55.     #Make google-musicmanager executable.
  56.     chmod 755 ${pkgdir}/opt/google-musicmanager/{google-musicmanager,minidump_upload,xdg-settings,xdg-mime,MusicManager} || return 1
  57.  
  58.     ln -s /opt/google-musicmanager/google-musicmanager $pkgdir/usr/bin/
  59. }
clone this paste RAW Paste Data