# $Id: PKGBUILD 65194 2012-02-20 10:10:26Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Roman Kyrylych <Roman.Kyrylycg@gmail.com>
# Contributor: Darwin Bautista <djclue917@gmail.com>

pkgname=font-mathematica
pkgver=6.0
pkgrel=3
pkgdesc="Mathematica fonts by Wolfram Research, Inc."
arch=('any')
url="http://support.wolfram.com/mathematica/systems/windows/general/latestfonts.html"
depends=('fontconfig' 'xorg-font-utils')
makedepends=('unzip')
conflicts=('ttf-mathematica')
replaces=('ttf-mathematica')
install=font.install
license=('custom')
source=(http://support.wolfram.com/technotes/fonts/windows/files/MathFonts_$pkgver.zip
	license.txt)
md5sums=('f97df8a304d3c17c4137bb963f8cbe9e'
         '4d95629d78541826cb543764c8025c0b')

build() {
  cd $srcdir/Fonts/
  # Install TrueType fonts
  mkdir -p $pkgdir/usr/share/fonts/TTF
  install -m644 TrueType/*.ttf $pkgdir/usr/share/fonts/TTF/
  # Install Type1 fonts
  mkdir -p $pkgdir/usr/share/fonts/Type1
  install -m644 Type1/*.pfa $pkgdir/usr/share/fonts/Type1/
  # Remove unnecessary Type1 fonts
  rm $pkgdir/usr/share/fonts/Type1/{UT*,cour*,c06*}
  # Remove SVG files
  rm -rf $pkgdir/usr/share/fonts/SVG
  # Install license
  install -D -m644 $srcdir/license.txt $pkgdir/usr/share/licenses/${pkgname}/license.txt
}
