summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 68c42a27dfad80d87bf62e22a85ad967d8b26068 (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
# Maintainer: taotieren <admin@taotieren.com>

pkgbase=smiley-sans-git
pkgname=({ttf,otf,woff2}-$pkgbase)
pkgver=1.1.1.r2.g2c2945c
pkgrel=1
pkgdesc='得意黑 Smiley Sans 开发版'
url="https://github.com/atelier-anchor/smiley-sans"
depends=(fontconfig)
makedepends=(git python-brotli python-fontmake python-fonttools)
license=("OFL-1.1")
arch=(any)
source=("${pkgbase%-git}::git+${url}.git")
sha256sums=('SKIP')

pkgver() {
    cd "${srcdir}/${pkgbase%-git}"
    git describe --long --tags | sed 's/^v//g;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd "${srcdir}/${pkgbase%-git}"
    rm -rf "${srcdir}/${pkgbase%-git}/build"
    sh  "${srcdir}/${pkgbase%-git}/build.sh"
}

package_ttf-smiley-sans-git() {
    pkgdesc+=" (ttf)"
    conflicts=(${pkgname%-git})

    cd "${srcdir}/${pkgbase%-git}/build"

    install -Dm644 -t "${pkgdir}/usr/share/fonts/${pkgbase%-git}" *.ttf
    install -Dm644 "${srcdir}/${pkgbase%-git}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname%-git}/LICENSE"
}

package_otf-smiley-sans-git() {
    pkgdesc+=" (otf)"
    conflicts=(${pkgname%-git})

    cd "${srcdir}/${pkgbase%-git}/build"

    install -Dm644 -t "${pkgdir}/usr/share/fonts/${pkgbase%-git}" *.otf
    install -Dm644 "${srcdir}/${pkgbase%-git}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname%-git}/LICENSE"
}

package_woff2-smiley-sans-git() {
    pkgdesc+=" (woff2)"
    conflicts=(${pkgname%-git})

    cd "${srcdir}/${pkgbase%-git}/build"

    install -Dm644 -t "${pkgdir}/usr/share/fonts/${pkgbase%-git}" *.woff2
    install -Dm644 "${srcdir}/${pkgbase%-git}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname%-git}/LICENSE"
}