Advertisement
Guest User

Untitled

a guest
Apr 17th, 2010
868
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.52 KB | None | 0 0
  1. # Maintainer: doorknob60 <doorknob60@gmail.com>
  2.  
  3. pkgname=huludesktop
  4. pkgver=0.9.7
  5. pkgrel=2
  6. pkgdesc="Official Hulu Desktop client for Linux. You may need to edit ~/.huludesktop to the correct path of your Flash plugin."
  7. arch=(i686 x86_64)
  8. url="http://www.hulu.com/labs/hulu-desktop-linux"
  9. license=('custom')
  10. groups=('multimedia')
  11. depends=('flashplugin' 'gtk2' 'glib2')
  12. optdepends=('lirc: for remote control functionality')
  13.  
  14. if [ `uname -m` = "x86_64" ]; then   # On 64 bit machines
  15.     md5sums=('13806c114bd0727f837ed4d9c0763006')
  16.     _debsrc=huludesktop_amd64.deb
  17. else   # On 32 bit machines
  18.     md5sums=('60fad12c91c09f9721b7fb0f5bdae1ab')
  19.     _debsrc=huludesktop_i386.deb
  20. fi
  21. source=(http://download.hulu.com/$_debsrc)
  22. noextract=($_debsrc)
  23.  
  24.  
  25. build() {
  26.     # Config variables
  27.     local hulubin=$pkgdir/usr/bin/huludesktop
  28.     local flashplugin=/usr/lib/mozilla/plugins/libflashplayer.so
  29.     # End config variables
  30.  
  31.     cd $srcdir
  32.  
  33.     ar p $_debsrc data.tar.gz | (cd $pkgdir; bsdtar xf -)
  34.  
  35.     # Fix menu entry
  36.     sed -i 's/Categories=GTK;AudioVideo;Audio;Video;Player;TV;/Categories=GNOME;Application;Network;/' $pkgdir/usr/share/applications/huludesktop.desktop
  37.  
  38.     # Create a huludesktop.ini if necessary on first startup
  39.     mv $hulubin $hulubin-bin
  40.     cat <<EOF >>$hulubin
  41. #!/bin/dash
  42.  
  43. [ -f ~/.huludesktop ] || cat <<! >~/.huludesktop
  44. [flash]
  45. flash_location = $flashplugin
  46.  
  47. ; To bypass first-run EULA, uncomment:
  48. ;[version]
  49. ;eula_version = 1
  50. !
  51.  
  52. exec huludesktop-bin
  53. EOF
  54.     chmod 755 $hulubin
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement