summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9c8e4be8dee42ebe05a111771d15614498769b10 (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
# Maintainer: aksr <aksr at t-com dot me>
# Maintainer: Caleb Maclennan <caleb@alerque.com>

pkgbase=ttf-crimson-pro-git
pkgname=("$pkgbase" "${pkgbase%-git}-variable-git")
_pkgname=CrimsonPro
pkgver=1.002.r0.g04168bb
pkgrel=1
pkgdesc='A professionally produced redesign of Crimson by Jacques Le Bailly'
arch=('any')
url="https://github.com/Fonthausen/$_pkgname"
license=('OFL')
source=("$pkgbase::git+$url")
sha256sums=('SKIP')

pkgver() {
    cd "$pkgbase"
    # Upstream release commits are not always tagged, tag the last known release
    # manually here so the number of commits since the stable release is clear.
    git tag | grep -Fq '1.002' || git tag '1.002' 04168bb
    git describe --long --tags --abbrev=7 --match='[0-9]*' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

package_ttf-crimson-pro-git () {
    pkgdesc+=" (8 fixed weights)"
    provides=("${pkgname%-git}")
    conflicts=("${pkgname%-git}")
    cd "$pkgbase"
    install -Dm644 -t "$pkgdir/usr/share/fonts/TTF" "fonts/ttfs/$_pkgname"*.ttf
    install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" {OFL,AUTHORS,CONTRIBUTORS}.txt
}

package_ttf-crimson-pro-variable-git () {
    pkgdesc+=" (variable weight)"
    provides=("${pkgname%-git}")
    conflicts=("${pkgname%-git}")
    cd "$pkgbase"
    install -Dm644 -t "$pkgdir/usr/share/fonts/TTF" "fonts/variable/$_pkgname"*.ttf
    install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" {OFL,AUTHORS,CONTRIBUTORS}.txt
}