updated on Tue Jan 10 08:08:34 UTC 2012
[aur-mirror.git] / realplayer / PKGBUILD
blob77cad4213d29c69ff965723ab885c9d85b61eebe
1 # Maintainer: Arkham <arkham at archlinux dot us>
2 # Contributor: Eric Belanger <eric@archlinux.org>
3 # Contributor: Mario Vazquez <mario_vazq@hotmail.com>
5 pkgname=realplayer
6 pkgver=11.0.2.2315
7 pkgrel=1
8 pkgdesc="Real Media Player produced by RealNetworks"
9 arch=('i686')
10 url="http://www.real.com/linux/"
11 license=('custom')
12 depends=('gtk2' 'libxv' 'alsa-lib')
13 makedepends=('rpmextract')
14 source=(http://www.real.com/realcom/R?href=http://forms.real.com/real/player/download.html?f=unix/RealPlayer11GOLD.rpm)
15 md5sums=('768cde61d80f3d60110d8bc92fcb156d')
17 build() {
18     cd $srcdir
19     rpmextract.sh RealPlayer11GOLD.rpm
21     # copying files
22     install -d  $pkgdir/opt/realplayer
23     install -d $pkgdir/usr/{bin,share}
25     cd opt/real/RealPlayer
26     cp -R codecs common plugins share $pkgdir/opt/realplayer
28     find $pkgdir/opt/realplayer/share -type f -exec chmod 644 {} +
29     find $pkgdir/opt/realplayer -type d -exec chmod 755 {} +
31     install -Dm 755 realplay realplay.bin $pkgdir/opt/realplayer
32     ln -s /opt/realplayer/realplay $pkgdir/usr/bin/realplay
34     # installing icons
35     for res in 16 192 32 48; do
36         install -Dm 644 $pkgdir/opt/realplayer/share/icons/realplay_${res}x${res}.png \
37             $pkgdir/usr/share/icons/hicolor/${res}x${res}/apps/realplay.png
38     done
40     install -d $pkgdir/usr/share/icons/hicolor/{48x48,192x192}/mimetypes
42     for mime in generic ogg ram rpm smil; do
43         ln -s /opt/realplayer/share/icons/mime-application-${mime}_48x48.png \
44             $pkgdir/usr/share/icons/hicolor/48x48/mimetypes/realplay-application-${mime}.png
45         ln -s /opt/realplayer/share/icons/mime-application-${mime}_192x192.png \
46             $pkgdir/usr/share/icons/hicolor/192x192/mimetypes/realplay-application-${mime}.png
47     done
49     for mime in aiff au generic ogg wav; do
50         ln -s /opt/realplayer/share/icons/mime-audio-${mime}_48x48.png \
51             $pkgdir/usr/share/icons/hicolor/48x48/mimetypes/realplay-audio-${mime}.png
52         ln -s /opt/realplayer/share/icons/mime-audio-${mime}_192x192.png \
53             $pkgdir/usr/share/icons/hicolor/192x192/mimetypes/realplay-audio-${mime}.png
54     done
56     ln -s /opt/realplayer/share/icons/mime-text-realtext_48x48.png \
57         $pkgdir/usr/share/icons/hicolor/48x48/mimetypes/realplay-text-realtext.png
58     ln -s /opt/realplayer/share/icons/mime-text-realtext_192x192.png \
59         $pkgdir/usr/share/icons/hicolor/192x192/mimetypes/realplay-text-realtext.png
61     for mime in generic ogg; do
62         ln -s /opt/realplayer/share/icons/mime-video-${mime}_48x48.png \
63             $pkgdir/usr/share/icons/hicolor/48x48/mimetypes/realplay-video-${mime}.png
64         ln -s /opt/realplayer/share/icons/mime-video-${mime}_192x192.png \
65             $pkgdir/usr/share/icons/hicolor/192x192/mimetypes/realplay-video-${mime}.png
66     done
68     # setting up locales
69     for locale in $(ls share/locale); do
70         install -d $pkgdir/usr/share/locale/${locale}/LC_MESSAGES
71         ln -s /opt/realplayer/share/locale/${locale}/player.mo \
72             $pkgdir/usr/share/locale/${locale}/LC_MESSAGES/realplay.mo
73         ln -s /opt/realplayer/share/locale/${locale}/widget.mo \
74             $pkgdir/usr/share/locale/${locale}/LC_MESSAGES/widget.mo
75     done
77     # installing pixmap, .desktop file, etc.
78     install -d $pkgdir/usr/share/pixmaps
79     ln -s /opt/realplayer/share/realplay.png $pkgdir/usr/share/pixmaps/realplay.png
80     install -Dm 644 $pkgdir/opt/realplayer/share/realplay.applications \
81         $pkgdir/usr/share/application-registry/realplay.applications
82     install -Dm 644 $pkgdir/opt/realplayer/share/realplay.desktop \
83         $pkgdir/usr/share/applications/realplay.desktop
84     install -Dm 644 $pkgdir/opt/realplayer/share/realplay.keys \
85         $pkgdir/usr/share/mime-info/realplay.keys
86     install -Dm 644 $pkgdir/opt/realplayer/share/realplay.mime \
87         $pkgdir/usr/share/mime-info/realplay.mime
88     
89     # installing mozilla plugin
90     install -d $pkgdir/usr/lib/mozilla/plugins
91     install -Dm 755 mozilla/nphelix.so $pkgdir/usr/lib/mozilla/plugins/npreal.so
92     install -Dm 755 mozilla/nphelix.xpt $pkgdir/usr/lib/mozilla/plugins/npreal.xpt
94     # installing licence
95     install -Dm 644 LICENSE $pkgdir/usr/share/licenses/${pkgname}/LICENSE
97     # installing docs for setup assistant
98     install -Dm 644 README $pkgdir/opt/realplayer/README
99     install -Dm 644 LICENSE $pkgdir/opt/realplayer/LICENSE