updated on Tue Jan 17 12:00:36 UTC 2012
[aur-mirror.git] / huludesktop / PKGBUILD
blob6102f22d45b002c986904bffd69350af652f10f5
1 # Maintainer: doorknob60 <doorknob60 at gmail dot com>
3 pkgname=huludesktop
4 pkgver=0.9.8
5 pkgrel=4
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')
14 if [ `uname -m` = "x86_64" ]; then   # On 64 bit machines
15     md5sums=('bccc94d7f327989dab2653d254f40869')
16     _debsrc=huludesktop_amd64.deb
17 else   # On 32 bit machines
18     md5sums=('d9b27d1837ab86526100964e80c3cdd1')
19     _debsrc=huludesktop_i386.deb
21 source=(http://download.hulu.com/$_debsrc)
22 noextract=($_debsrc)
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
31     cd $srcdir
33     ar p $_debsrc data.tar.gz | (cd $pkgdir; bsdtar xf -)
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
38     # Create a huludesktop.ini if necessary on first startup
39     mv $hulubin $hulubin-bin
40     cat <<EOF >>$hulubin
41 #!/bin/dash
43 [ -f ~/.huludesktop ] || cat <<! >~/.huludesktop
44 [flash]
45 flash_location = $flashplugin
47 ; To bypass first-run EULA, uncomment:
48 ;[version]
49 ;eula_version = 1
52 exec huludesktop-bin
53 EOF
54     chmod 755 $hulubin