# Maintainer: Coelacanthus <uwu@coelacanthus.name>

pkgbase=chiron-sung-fonts
pkgname=(
    otf-chiron-sung-hk
    ttf-chiron-sung-hk
    otf-chiron-sung-hk-vf
    ttf-chiron-sung-hk-vf
)
pkgver=1.024
pkgrel=1
pkgdesc='昭源宋體：現代筆形風格，平衡標準字形和印刷體慣用筆形的免費開源宋體字型'
url='https://github.com/chiron-fonts/chiron-sung-hk'
arch=('any')
license=('OFL-1.1')
source=(
    $pkgbase-$pkgver.tar.gz::https://github.com/chiron-fonts/chiron-sung-hk/archive/refs/tags/v$pkgver.tar.gz
)
b2sums=('64aea69fb2f1fd62a1c1f2880857124db765fa830c356afd1cb83c6a8876d566579d78a9357481953998fa5ac6a6400d8f283ef8bba46d9a2e1ce287f02a8b21')

prepare() {
    cd chiron-sung-hk-$pkgver
}

package_ttf-chiron-sung-hk() {
    cd chiron-sung-hk-$pkgver
    install -Dm644 -t "$pkgdir/usr/share/fonts/TTF/$pkgname" STATIC_TTF/*.ttf
    install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.md
}
package_otf-chiron-sung-hk() {
    cd chiron-sung-hk-$pkgver
    install -Dm644 -t "$pkgdir/usr/share/fonts/OTF/$pkgname" STATIC_OTF/*.otf
    install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.md
}
package_ttf-chiron-sung-hk-vf() {
    cd chiron-sung-hk-$pkgver
    install -Dm644 -t "$pkgdir/usr/share/fonts/TTF/$pkgname" VAR_TTF/*.ttf
    install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.md
}
package_otf-chiron-sung-hk-vf() {
    cd chiron-sung-hk-$pkgver
    install -Dm644 -t "$pkgdir/usr/share/fonts/OTF/$pkgname" VAR_OTF/*.otf
    install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.md
}
