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

pkgname=gftools-git
pkgver=0.6.1.r0.g5c76b41
pkgrel=2
pkgdesc='Misc tools for working with the Google Fonts library'
arch=('any')
url="https://github.com/googlefonts/${pkgname%-git}"
license=('Apache')
_py_deps=('babelfont'
          'brotli'
          'browserstack-local'
          'fontmake'
          'fonttools'
          'fs' # optdepends of fonttols required for [ufo]
          'glyphslib'
          'opentype-sanitizer'
          'protobuf'
          'pyaml'
          'pybrowserstack-screenshots'
          'pygit2'
          'pygithub'
          'requests'
          'strictyaml'
          'tabulate'
          'ttfautohint-py'
          'unidecode'
          'vttlib')
depends=('absl-py'
         'python'
         "${_py_deps[@]/#/python-}"
         'statmake')
makedepends=('python-setuptools-scm')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("$pkgname::git+$url.git")
sha256sums=('SKIP')

pkgver() {
    cd "$pkgname"
    # TODO: Drop tag hack when upstream fixes their releases, see:
    # https://github.com/googlefonts/gftools/issues/197
    git tag | grep -Fxq v0.3.14 || git tag v0.3.14 6e6a19a
    git describe --long --abbrev=7 --match 'v*' --tags |
        sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

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

package() {
    cd "$pkgname"
    python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}