Want more features on Pastebin? Sign Up, it's FREE!
Guest

ttf-vista-fonts PKGBUILD

By: Marcel- on Mar 23rd, 2014  |  syntax: Bash  |  size: 1.50 KB  |  views: 92  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Contributor: mutlu_inek <mutlu_inek@yahoo.de>
  2. # Maintainer: jnbek print "<",join('', qw(j n b e k), int(qw(one nine seven two)),"_AT_ geeee mail __DOT__ com",">";
  3. pkgname=ttf-vista-fonts
  4. pkgver=1
  5. pkgrel=8
  6. pkgdesc="Microsoft Vista True Type Fonts"
  7. url="http://www.microsoft.com/en-us/download/confirmation.aspx?id=13"
  8. license=('custom')
  9. arch=('any')
  10. depends=()
  11. makedepends=('fontforge' 'fontconfig' 'xorg-font-utils' 'cabextract')
  12. conflicts=('ttf-ms-extrafonts')
  13. provides=()
  14. replaces=('vista-fonts')
  15. install=$pkgname.install
  16. source=('http://download.microsoft.com/download/E/6/7/E675FFFC-2A6D-4AB0-B3EB-27C9F8C8F696/PowerPointViewer.exe')
  17. md5sums=('35ff8ebbea457ba426b47ff6d8377284')
  18.  
  19. package() {
  20.     mkdir -p "$srcdir/$pkgname-$pkgver"
  21.     cabextract --lowercase "$srcdir/PowerPointViewer.exe" -d "$srcdir/$pkgname-$pkgver"
  22.     cabextract --lowercase -F '*.tt[fc]' "$srcdir/$pkgname-$pkgver/ppviewer.cab" -d "$srcdir/$pkgname-$pkgver"
  23.  
  24.     # cambria.ttc is a TrueType Collection (TTC) which causes problems with
  25.     # LibreOffice (Cambria Regular cannot be selected) so we need to convert
  26.     # the TTC into a TrueType Font (TTF).
  27.     cd "$srcdir/$pkgname-$pkgver"
  28.     FONTFORGE_LANGUAGE=ff fontforge -c 'Open("cambria.ttc"); Generate("cambria.ttf")'
  29.     rm cambria.ttc
  30.  
  31.     mkdir -p "$pkgdir/usr/share/fonts/TTF"
  32.     install -m644 "$srcdir"/$pkgname-$pkgver/*.{ttf,ttc} "$pkgdir/usr/share/fonts/TTF"
  33.     install -Dm644 "$srcdir/$pkgname-$pkgver/eula" "$pkgdir/usr/share/licenses/$pkgname/EULA"
  34. }
clone this paste RAW Paste Data