updated on Fri Jan 20 16:18:17 UTC 2012
[aur-mirror.git] / helixplayer / PKGBUILD
blobf3d03667c1e6cd1e3ec994fa6c4c5d43675e7513
1 # $Id: PKGBUILD,v 1.12 2007/06/21 05:44:00 tardo Exp $
2 # Maintainer: tardo <tardo@nagi-fanboi.net>
4 pkgname=helixplayer
5 pkgver=1.0.8
6 pkgrel=4
7 pkgdesc="An Open-Source media player produced by RealNetworks"
8 arch=('i686' 'x86_64')
9 url="http://www.helixcommunity.org"
10 license=("GPL" "custom:RPSL" "custom:RCSL")
11 depends=('gtk2' 'gcc' 'libxv' 'bash')
12 source=(https://helixcommunity.org/projects/player/files/download/2156 \
13         https://community.helixcommunity.org/content/rpsl.txt \
14         https://community.helixcommunity.org/content/Real_Format_Source_Code_Decoder.pdf \
15         https://community.helixcommunity.org/content/RCSL_Commercial_Client.pdf \
16         https://community.helixcommunity.org/content/Real_Format_Code_Commercial.pdf rcsl.txt gcc4.patch \
17                 amd64-fixes.patch x11-path-fixes.patch)
18 md5sums=('6c07239fbe84d9a5002746a6fa4be8a8'
19          'b3b2a3eb663b96e569ad792a3e2d2f2e'
20          '9961cac41f010e1c9e4e9779e23fad89'
21          '04cb3dfc03ad3c5dfefe19bd42262c43'
22          '1692e15b68773aca964b1ef568573a40'
23          'ef4f38d05a7c0931171aadbd6ddb7e84'
24          'b1daa26c3e9e1ded3a2ea12ffc311803'
25          '0cebf030173e09a8a2038fa162ba5c7b'
26          '42a29bb4da89e9f6a31da64aa9a40a61')
28 build() {
29   # compiling/add patches
30   cd $startdir/src/hxplay-$pkgver
31   patch -p1 < ../gcc4.patch || return 1
32   patch -p1 < ../x11-path-fixes.patch || return 1
33   [ "$CARCH" == "x86_64" ] && (patch -p1 < ../amd64-fixes.patch || return 1)
34   [ "$CARCH" == "i686" ] && export SYSTEM_ID=linux-2.6-glibc23-i686
35   [ "$CARCH" == "x86_64" ] && export SYSTEM_ID=linux-2.6-glibc23-amd64
37   # override wrong libogg/libvorbis paths
38   echo "SetSDKPath(\"oggvorbissdk\", \"/usr\")" > $startdir/src/hxplay-$pkgver/buildrc
39   export BUILDRC=$startdir/src/hxplay-$pkgver/buildrc
40   export BUILD_ROOT=$startdir/src/hxplay-$pkgver/build
41   build/bin/build.py -m hxplay_gtk_release -trelease -k -j 1 -P helix-client-all-defines-free player_installer_app
43   # prepare dirs for copying
44   mkdir -p $startdir/src/builddir
45   tar -xjf release/hxplay-${pkgver}.806-$SYSTEM_ID.tar.bz2 -C $startdir/src/builddir
46   install -d  $startdir/pkg/opt/helixplayer
47   install -d $startdir/pkg/usr/{bin,share}
49   # copying files
50   cd $startdir/src/builddir
51   cp -R codecs common lib plugins share $startdir/pkg/opt/helixplayer
52   find $startdir/pkg/opt/helixplayer/share -type f -exec chmod 644 {} \;
53   find $startdir/pkg/opt/helixplayer -type d -exec chmod 755 {} \;
54   install -D -m755 hxplay hxplay.bin $startdir/pkg/opt/helixplayer
55   ln -s /opt/helixplayer/hxplay $startdir/pkg/usr/bin/hxplay
57   # installing icons
58   for res in 16 192 32 48; do
59     install -d $startdir/pkg/usr/share/icons/hicolor/${res}x${res}/apps
60     cp $startdir/pkg/opt/helixplayer/share/icons/hxplay_${res}x${res}.png \
61        $startdir/pkg/usr/share/icons/hicolor/${res}x${res}/apps/hxplay.png
62   done
64   install -d $startdir/pkg/usr/share/icons/hicolor/{48x48,192x192}/mimetypes
66   for mime in generic ogg ram rpm smil; do
67     ln -s /opt/helixplayer/share/icons/mime-application-${mime}_48x48.png \
68         $startdir/pkg/usr/share/icons/hicolor/48x48/mimetypes/hxplay-application-${mime}.png
69     ln -s /opt/helixplayer/share/icons/mime-application-${mime}_192x192.png \
70         $startdir/pkg/usr/share/icons/hicolor/192x192/mimetypes/hxplay-application-${mime}.png
71   done
73   for mime in aiff au generic ogg wav; do
74     ln -s /opt/helixplayer/share/icons/mime-audio-${mime}_48x48.png \
75         $startdir/pkg/usr/share/icons/hicolor/48x48/mimetypes/hxplay-audio-${mime}.png
76     ln -s /opt/helixplayer/share/icons/mime-audio-${mime}_192x192.png \
77         $startdir/pkg/usr/share/icons/hicolor/192x192/mimetypes/hxplay-audio-${mime}.png
78   done
80   ln -s /opt/helixplayer/share/icons/mime-text-realtext_48x48.png \
81         $startdir/pkg/usr/share/icons/hicolor/48x48/mimetypes/hxplay-text-realtext.png
82   ln -s /opt/helixplayer/share/icons/mime-text-realtext_192x192.png \
83         $startdir/pkg/usr/share/icons/hicolor/192x192/mimetypes/hxplay-text-realtext.png
85   for mime in generic ogg; do
86     ln -s /opt/helixplayer/share/icons/mime-video-${mime}_48x48.png \
87         $startdir/pkg/usr/share/icons/hicolor/48x48/mimetypes/hxplay-video-${mime}.png
88     ln -s /opt/helixplayer/share/icons/mime-video-${mime}_192x192.png \
89         $startdir/pkg/usr/share/icons/hicolor/192x192/mimetypes/hxplay-video-${mime}.png
90   done
92   # setting up locales
93   for locale in de es fr hi it ja ko pl pt_BR zh_CN zh_TW; do
94     install -d $startdir/pkg/usr/share/locale/${locale}/LC_MESSAGES
95     rm -f $startdir/pkg/opt/helixplayer/share/locale/${locale}/{LICENSE,README}
96     ln -s /opt/helixplayer/share/locale/${locale}/player.mo \
97         $startdir/pkg/usr/share/locale/${locale}/LC_MESSAGES/hxplay.mo
98     ln -s /opt/helixplayer/share/locale/${locale}/widget.mo \
99         $startdir/pkg/usr/share/locale/${locale}/LC_MESSAGES/libgtkhx.mo
100   done
102   # installing pixmap, .desktop file, etc.
103   install -d $startdir/pkg/usr/share/pixmaps
104   ln -s /opt/helixplayer/share/hxplay.png $startdir/pkg/usr/share/pixmaps/hxplay.png
106   install -D -m644 $startdir/pkg/opt/helixplayer/share/hxplay.applications \
107                    $startdir/pkg/usr/share/application-registry/hxplay.applications
109   install -D -m644 $startdir/pkg/opt/helixplayer/share/hxplay.desktop \
110                    $startdir/pkg/usr/share/applications/hxplay.desktop
112   install -D -m644 $startdir/pkg/opt/helixplayer/share/hxplay.keys \
113                    $startdir/pkg/usr/share/mime-info/hxplay.keys
115   install -D -m644 $startdir/pkg/opt/helixplayer/share/hxplay.mime \
116                    $startdir/pkg/usr/share/mime-info/hxplay.mime
117   # installing mozilla plugin
118   install -d $startdir/pkg/opt/mozilla/lib/plugins
119   install -D -m755 mozilla/nphelix.so $startdir/pkg/opt/mozilla/lib/plugins/nphelix.so
120   install -D -m755 mozilla/nphelix.xpt $startdir/pkg/opt/mozilla/lib/plugins/nphelix.xpt
122   # installing license
123   install -D -m644 $startdir/src/rpsl.txt $startdir/pkg/usr/share/licenses/$pkgname/rpsl.txt
124   install -D -m644 $startdir/src/rcsl.txt $startdir/pkg/usr/share/licenses/$pkgname/rcsl.txt
125   install -D -m644 $startdir/src/Real_Format_Source_Code_Decoder.pdf $startdir/pkg/usr/share/licenses/$pkgname/Real_Format_Source_Code_Decoder.pdf
126   install -D -m644 $startdir/src/RCSL_Commercial_Client.pdf $startdir/pkg/usr/share/licenses/$pkgname/RCSL_Commercial_Client.pdf
127   install -D -m644 $startdir/src/Real_Format_Code_Commercial.pdf $startdir/pkg/usr/share/licenses/$pkgname/Real_Format_Code_Commercial.pdf
128   install -D -m644 LICENSE $startdir/pkg/usr/share/licenses/$pkgname/LICENSE