# Maintainer: Michael Pusterhofer # Contributor: Raphael Scholer pkgname=mathematica pkgver=8.0.4 pkgrel=2 pkgdesc="A computational software program used in scientific, engineering, and mathematical fields and other areas of technical computing." arch=('i686' 'x86_64') url="http://www.wolfram.com/mathematica/" license=('proprietary') depends=('ttf-bitstream-vera') source=("Mathematica_${pkgver}_LINUX.sh") md5sums=('02d4619b55c1d1289de651fdf896d29a') install='install' options=('!strip') PKGEXT=".pkg.tar" # To build this package you need to place the mathematica-installer into your startdir # If you don't own the installer you can download a trial version at http://www.wolfram.com/mathematica/trial # Product Name: Mathematica for Students for Sites # Version: 8.0.4 # URL: http://www.wolfram.com/solutions/education/students/ build() { chmod +x ${srcdir}/Mathematica_${pkgver}_LINUX.sh ${srcdir}/Mathematica_${pkgver}_LINUX.sh -- -execdir=${pkgdir}/usr/bin -targetdir=${pkgdir}/opt/Mathematica -auto } package() { #Fix absolute links echo "Fixing symbolic symlinks" cd $pkgdir/usr/bin rm * ln -s /opt/Mathematica/Executables/math ln -s /opt/Mathematica/Executables/mathematica ln -s /opt/Mathematica/Executables/Mathematica ln -s /opt/Mathematica/Executables/mcc ln -s /opt/Mathematica/Executables/MathKernel if [ "${CARCH}" = "x86_64" ]; then ln -s /opt/Mathematica/SystemFiles/Kernel/Binaries/Linux-x86-64/MathematicaScript else ln -s /opt/Mathematica/SystemFiles/Kernel/Binaries/Linux/MathematicaScript fi # Copying menu and mimetype information echo "Copying menu and mimetype information..." mkdir -p ${pkgdir}/usr/share/applications mkdir -p ${pkgdir}/usr/share/desktop-directories mkdir -p ${pkgdir}/usr/share/mime/packages cd ${pkgdir}/opt/Mathematica/SystemFiles/Installation cp wolfram-mathematica.desktop ${pkgdir}/usr/share/applications/wolfram-mathematica8.desktop cp wolfram-all.directory ${pkgdir}/usr/share/desktop-directories/ cp *.xml ${pkgdir}/usr/share/mime/packages/ # Copying icons... echo "Copying icons..." mkdir -p ${pkgdir}/usr/share/icons/hicolor/{32x32,64x64,128x128}/{apps,mimetypes} cd ${pkgdir}/opt/Mathematica/SystemFiles/FrontEnd/SystemResources/X for i in "32" "64" "128"; do cp Mathematica-${i}.png ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/wolfram-mathematica.png cp MathematicaPlayer-${i}.png ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/wolfram-mathematicaplayer.png cp vnd.wolfram.cdf-${i}.png ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/mimetypes/application-vnd.wolfram.cdf.png cp MathematicaDoc-${i}.png ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/mimetypes/application-mathematica.png cp MathematicaPlayerDoc-${i}.png ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/mimetypes/application-mathematicaplayer.png cp vnd.wolfram.cdfDoc-${i}.png ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/mimetypes/application-vnd.wolfram.cdf.png cp MathematicaDoc-${i}.png ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/mimetypes/gnome-mime-application-mathematica.png cp MathematicaPlayerDoc-${i}.png ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/mimetypes/gnome-mime-application-mathematicaplayer.png cp vnd.wolfram.cdfDoc-${i}.png ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/mimetypes/gnome-mime-application-vnd.wolfram.cdf.png done echo "Copying manpages..." mkdir -p ${pkgdir}/usr/share/man/man1 cd ${pkgdir}/opt/Mathematica/SystemFiles/SystemDocumentation/Unix cp *.1 ${pkgdir}/usr/share/man/man1 echo "Done." } # vim:set ts=2 sw=2 et: