updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / helixplayer-nightly-bin / PKGBUILD
blob0d068d2ff7747d80a12412bc5c1d5792e0266966
1 # Contributer Jonathan Wiersma <arch aur at jonw dot org>
3 pkgname=helixplayer-nightly-bin
4 pkgver=11.1.1.2474
5 _pkgdate=20100201
6 _pkgdlhash=022d0e07dcfaab300202
7 pkgrel=1
8 pkgdesc="Open source media player based on the Helix DNA Client media engine"
9 arch=('i686' 'x86_64')
10 url="http://forms.helixcommunity.org/helix/builds/"
11 license=("GPL" "custom:RPSL" "custom:RCSL")
12 depends=('gtk2' 'libxv' 'libstdc++5' 'alsa-lib')
13 provides=("helixplayer=$pkgver")
14 conflicts=("helixplayer" "helixplayer-nightly" "realplayer" "realplayer-nightly" "realplayer-nightly-bin")
15 source=("http://software-dl.real.com/$_pkgdlhash/helix/$_pkgdate/player_all-hxplay_gtk_current-$_pkgdate-linux-2.2-libc6-gcc32-i586/hxplay-$pkgver-linux-2.2-libc6-gcc32-i586.tar.bz2")
16 md5sums=('0614d64debf356ee242d1d2ac56edaf2')
17 if [ "$CARCH" == "x86_64" ]; then
18         source=("http://software-dl.real.com/$_pkgdlhash/helix/$_pkgdate/player_all-hxplay_gtk_current-$_pkgdate-linux-2.6-glibc23-amd64/hxplay-$pkgver-linux-2.6-glibc23-amd64.tar.bz2")
19 md5sums=('aad54244b44b8487f25338bbd9879fca')
23 build() {
24         cd $srcdir || return 1
25         
26         # Set-up Directories
27         install -d $pkgdir/usr/{bin,share} || return 1
28         install -d $pkgdir/opt/hxplay/bin || return 1
29         install -d $pkgdir/usr/lib/mozilla/plugins || return 1
30         install -d $pkgdir/usr/share/licenses/${pkgname} || return 1
31         
32         # Install shared libs
33         for _file in {codecs,common,plugins}/*.so; do
34                 install -Dm755 "$_file" "$pkgdir/opt/hxplay/$_file" || return 1
35         done || return 1
36         
37         # Install selected files from share directory
38         find share/{default,distcode,hxplay*,superbuffer,*.css,*.html} \
39                 -type f | while read _file; do
40                         install -Dm644 "$_file" "$pkgdir/opt/hxplay/$_file" || return 1
41         done || return 1
42         
43         for _file in share/locale/*/{LICENSE,README}; do
44                 install -Dm644 "$_file" "$pkgdir/opt/hxplay/$_file" || return 1
45         done || return 1
46         
47         # Install executables
48         install -m755 hxplay hxplay.bin $pkgdir/opt/hxplay/ || return 1
49         install -m755 Bin/setup $pkgdir/opt/hxplay/bin/ || return 1
50         ln -s /opt/hxplay/hxplay $pkgdir/usr/bin/hxplay || return 1
51         
52         # Install Icons
53         for _res in 16 192 32 48; do
54                 install -Dm644 $srcdir/share/icons/hxplay_${_res}x${_res}.png \
55                          $pkgdir/usr/share/icons/hicolor/${_res}x${_res}/apps/hxplay.png || return 1
56         done || return 1
57         
58         cd $srcdir/share/icons || return 1
59         for _file in *; do
60                 install -Dm644 "$_file" \
61                         "$pkgdir/usr/share/icons/hicolor/$(echo ${_file#*_} \
62                                 | sed -e 's:\..*::g')mimetypes/${_file%_*}.${_file#*.}" || return 1
63         done || return 1
64         
65         # Install Locales
66         cd $srcdir/share/locale || return 1
67         for _locale in *; do
68                 install -d $pkgdir/usr/share/locale/$_locale/LC_MESSAGES || return 1
69                 install -m644 $_locale/*.mo \
70                         $pkgdir/usr/share/locale/$_locale/LC_MESSAGES/ || return 1
71         done
72         
73         # Install desktop extras
74         cd $srcdir || return 1
75         install -Dm644 share/hxplay.png \
76                 $pkgdir/usr/share/pixmaps/hxplay.png || return 1
77         install -Dm644 share/hxplay.applications \
78                 $pkgdir/usr/share/application-registry/hxplay.applications || return 1
79         install -Dm644 share/hxplay.desktop \
80                 $pkgdir/usr/share/applications/hxplay.desktop || return 1
81         
82         install -d $pkgdir/usr/share/mime-info || return 1
83         install -m644 share/hxplay.keys share/hxplay.mime \
84                 $pkgdir/usr/share/mime-info/ || return 1
86         # Install mozilla plugins
87         install -m755 mozilla/*.{so,xpt} \
88                 $pkgdir/usr/lib/mozilla/plugins/ || return 1
90         # Install Licence and extras
91         install -m644 LICENSE $pkgdir/usr/share/licenses/${pkgname}/ || return 1
92         install -m644 LICENSE README $pkgdir/opt/hxplay/ || return 1