summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 43c765307b15be4927fb02ec6a0fcc805cb90a81 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Maintainer: William Turner <willtur.will@gmail.com>
# Maintainer: Caleb Maclennan <caleb@alerque.com>

pkgname=afdko-git
pkgver=3.4.0
pkgrel=1
pkgdesc='Adobe Font Development Kit for OpenType'
arch=('x86_64')
url="https://github.com/adobe-type-tools/${pkgname%-git}"
license=('custom')
_py_deps=('booleanoperations'
          'brotli' # for fonttools
          'cu2qu'
          'fontmath'
          'fontparts'
          'fontpens' # for defcon
          'fonttools>=4.8.1'
          'fs' # for fonttools
          'lxml'
          'mutatormath>=3.0.1'
          'ufonormalizer>=0.4.1'
          'ufoprocessor'
          'unicodedata2' # for fonttools
          'zopfli') # for fonttools
depends=('python' 'psautohint' "${_py_deps[@]/#/python-}")
makedepends=('git' 'python-setuptools' 'python-wheel')
checkdepends=('python-pytest')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("git+$url.git")
sha256sums=('SKIP')

pkgver() {
    cd "${pkgname%-git}"
    # Upstream develop branch doesn't reparent to master with tags :(
    git tag -f 3.4.0 6874081 2>&1 >/dev/null ||:
    git describe --tags --abbrev=7 --match="[0-9]*" HEAD |
        sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare () {
    cd "${pkgname%-git}"
    sed -i -e 's/==/>=/g;s/,<=[0-9.]\+//' requirements.txt
}

build() {
    cd "${pkgname%-git}"
    python setup.py build
}

check() {
    cd "${pkgname%-git}"
    python setup.py test
}

package() {
    cd "${pkgname%-git}"
    python setup.py -q install --root="$pkgdir" --optimize=1 --skip-build
    install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE.md
}