summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b9818c2234eff6ed2e8b0ebde366ba793d6ad34c (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
# Maintainer: Caleb Maclennan <caleb@alerque.com>

pkgname=python-fontmake-git
pkgver=2.3.0.r0.g8705253
pkgrel=1
pkgdesc='Compile fonts from sources (UFO, Glyphs) to binary (OpenType, TrueType)'
url="https://github.com/googlefonts/fontmake"
license=('MIT')
arch=('x86_64')
checkdepends=('python-pytest')
_py_depends=('cu2qu'
             'defcon'
             'fonttools>=4.18.1'
             'fontmath'
             'glyphslib'
             'mutatormath'
             'ufolib2'
             'ufo2ft>=2.19.1')
depends+=("${_py_deps[@]/#/python-}")
makedepends=('python-setuptools-scm')
provides=("${pkgname%-git}=$pkgver")
conflicts=("${pkgname%-git}")
source=("$pkgname::git+$url.git")
sha256sums=('SKIP')

pkgver() {
    cd "$pkgname"
    git describe --long --tags --abbrev=7 HEAD |
        sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

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

check() {
    cd "$pkgname"
    PYTHONPATH=Lib pytest tests
}

package() {
    cd "$pkgname"
    python setup.py install --skip-build --root="$pkgdir" --optimize=1
    install -D -m755 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}