updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / cdfplayer / PKGBUILD
blobf937937e34ef4b22b4870a37405790fbf697c572
1 # contrib: kevku <kevku@gmx.com>
2 pkgname=cdfplayer
3 pkgver=8.0.4
4 pkgrel=1
5 pkgdesc="Wolfram CDF Player"
6 arch=('x86_64' 'i686')
7 url="http://www.wolfram.com/cdf-player/"
8 license=('custom')
9 depends=('unixodbc')
10 if [[ "$CARCH" == 'i686' ]]; then
11   depends+=('alsa-lib' 'mesa' 'libxmu' 'glib2' 'libxi' 'libxrender')
12 else
13   depends+=('lib32'-{'alsa-lib','mesa','libxmu','glib2','libxi','libxrender'})
15 makedepends=('curl')
16 options=("!strip")
17 source=('LICENCE')
18 md5sums=('eb33d6bb6c6730fbe0438f25b394d328')
20 build() {
21   cd "$srcdir/"
22   msg "DL package"
23 curl -c cookie http://www.wolfram.com/cdf-player/ &>/dev/null
24 IP=$(curl -b cookie -e http://www.wolfram.com/cdf-player/request.cgi http://www.wolfram.com/cdf-player/request.cgi | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}')
25 wget $(curl -b cookie -e http://www.wolfram.com/cdf-player/request.cgi \
26 -d "the-platform=lnx&user-isa=&organization=&institution=&email=linux@linux.xxx&location=$IP&action=submit-verify&source_name=NoneProvided" \
27 http://www.wolfram.com/cdf-player/request.cgi  | sed -n '/no-start/s/^.*href="\(.*\)" target.*$/\1/p') -O CDFPlayer_"$pkgver"_LINUX.sh
28   msg "DL done"
31 package() {
32   cd "$srcdir/"
33   sh CDFPlayer_"$pkgver"_LINUX.sh --nox11 <<- EOF
34         $pkgdir/opt/Wolfram/CDFPlayer/8.0
35         y
36         $pkgdir/usr/bin
37         y
38                 EOF
39   ln -sf /opt/Wolfram/CDFPlayer/8.0/Executables/WolframCDFPlayer $pkgdir/usr/bin/WolframCDFPlayer
40   ln -sf /opt/Wolfram/CDFPlayer/8.0/Executables/wolframcdfplayer $pkgdir/usr/bin/wolframcdfplayer
41   install -Dm644 LICENCE  $pkgdir/usr/share/licenses/cdfplayer/LICENCE
42   rm $pkgdir/opt/Wolfram/CDFPlayer/8.0/InstallErrors
46 # vim:set ts=2 sw=2 et: