summaryrefslogtreecommitdiff
path: root/community/python2-fonttools/PKGBUILD
blob: bfdcc4a71cee662c36be6e36c21e3d67dfedfe6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# $Id: PKGBUILD 96094 2013-08-20 06:32:32Z lcarlier $
# Maintainer: Andrzej Giniewicz <gginiu@gmail.com>
# Contributor: Firmicus <firmicus āt gmx dōt net>

pkgname=python2-fonttools
pkgver=2.4
pkgrel=2
pkgdesc="Converts OpenType and TrueType fonts to and from XML"
url="http://sourceforge.net/projects/fonttools/"
license=("BSD")
arch=('i686' 'x86_64' 'mips64el')
depends=("python2-numpy")
makedepends=("python2-setuptools")
provides=('fonttools') # temporary compatibility because of rename
replaces=('fonttools')
source=(http://downloads.sourceforge.net/fonttools/fonttools-$pkgver.tar.gz)
md5sums=('41b2d2be48214d2af848e04fded54689')

build() {
  cd "$srcdir"/fonttools-$pkgver

  python2 setup.py build
}

package() {
  cd "$srcdir"/fonttools-$pkgver

  python2 setup.py install --root="$pkgdir" --optimize=1

  install -D -m755 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
  chmod oga+r "$pkgdir"/usr/share/man/man1/ttx.1
  sed -i -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
    $(find "${pkgdir}" -name '*.py')
}