updated on Sun Jan 22 16:00:49 UTC 2012
[aur-mirror.git] / mathematica / PKGBUILD
blobbca2c0249471d54fe695d44ac3e574c136b9e798
1 # Maintainer: Michael Pusterhofer <pusterhofer at student dot tugraz dot at>
2 # Contributor: Raphael Scholer <rscholer@gmx.de>
3 pkgname=mathematica
4 pkgver=8.0.4
5 pkgrel=2
6 pkgdesc="A computational software program used in scientific, engineering, and mathematical fields and other areas of technical computing."
7 arch=('i686' 'x86_64')
8 url="http://www.wolfram.com/mathematica/"
9 license=('proprietary')
10 depends=('ttf-bitstream-vera')
11 source=("Mathematica_${pkgver}_LINUX.sh")
12 md5sums=('02d4619b55c1d1289de651fdf896d29a')
13 install='mathematica.install'
14 options=('!strip')
16 PKGEXT=".pkg.tar"
18 # To build this package you need to place the mathematica-installer into your startdir
19 # If you don't own the installer you can download a trial version at http://www.wolfram.com/mathematica/trial
21 # Product Name: Mathematica for Students for Sites
22 # Version: 8.0.4
23 # URL: http://www.wolfram.com/solutions/education/students/
25 build() {
26   chmod +x ${srcdir}/Mathematica_${pkgver}_LINUX.sh
27   ${srcdir}/Mathematica_${pkgver}_LINUX.sh -- -execdir=${pkgdir}/usr/bin -targetdir=${pkgdir}/opt/Mathematica -auto
30 package() {
31   #Fix absolute links
32   echo "Fixing symbolic symlinks"
33   cd $pkgdir/usr/bin
34   rm *
35   ln -s /opt/Mathematica/Executables/math
36   ln -s /opt/Mathematica/Executables/mathematica
37   ln -s /opt/Mathematica/Executables/Mathematica
38   ln -s /opt/Mathematica/Executables/mcc
39   ln -s /opt/Mathematica/Executables/MathKernel
40   if [ "${CARCH}" = "x86_64" ]; then
41     ln -s /opt/Mathematica/SystemFiles/Kernel/Binaries/Linux-x86-64/MathematicaScript
42   else
43     ln -s /opt/Mathematica/SystemFiles/Kernel/Binaries/Linux/MathematicaScript
44   fi
46   # Copying menu and mimetype information
47   echo "Copying menu and mimetype information..."
48   mkdir -p ${pkgdir}/usr/share/applications
49   mkdir -p ${pkgdir}/usr/share/desktop-directories
50   mkdir -p ${pkgdir}/usr/share/mime/packages
52   cd ${pkgdir}/opt/Mathematica/SystemFiles/Installation
54   cp wolfram-mathematica.desktop ${pkgdir}/usr/share/applications/wolfram-mathematica8.desktop
55   cp wolfram-all.directory ${pkgdir}/usr/share/desktop-directories/
56   cp *.xml ${pkgdir}/usr/share/mime/packages/
58   # Copying icons...
59   echo "Copying icons..."
60   mkdir -p ${pkgdir}/usr/share/icons/hicolor/{32x32,64x64,128x128}/{apps,mimetypes}
61   cd ${pkgdir}/opt/Mathematica/SystemFiles/FrontEnd/SystemResources/X
62   for i in "32" "64" "128"; do
63     cp Mathematica-${i}.png ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/wolfram-mathematica.png
64     cp MathematicaPlayer-${i}.png ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/wolfram-mathematicaplayer.png
65     cp vnd.wolfram.cdf-${i}.png ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/mimetypes/application-vnd.wolfram.cdf.png
67     cp MathematicaDoc-${i}.png ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/mimetypes/application-mathematica.png
68     cp MathematicaPlayerDoc-${i}.png ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/mimetypes/application-mathematicaplayer.png
69     cp vnd.wolfram.cdfDoc-${i}.png ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/mimetypes/application-vnd.wolfram.cdf.png
71     cp MathematicaDoc-${i}.png ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/mimetypes/gnome-mime-application-mathematica.png
72     cp MathematicaPlayerDoc-${i}.png ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/mimetypes/gnome-mime-application-mathematicaplayer.png
73     cp vnd.wolfram.cdfDoc-${i}.png ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/mimetypes/gnome-mime-application-vnd.wolfram.cdf.png
74   done
76   echo "Copying manpages..."
77   mkdir -p ${pkgdir}/usr/share/man/man1
78   cd ${pkgdir}/opt/Mathematica/SystemFiles/SystemDocumentation/Unix
79   cp *.1 ${pkgdir}/usr/share/man/man1
81   echo "Done."
84 # vim:set ts=2 sw=2 et: