# Maintainer: Coelacanthus <uwu@coelacanthus.name>

pkgbase=ttf-plangothic
pkgname=(ttf-plangothic otf-plangothic ttc-plangothic otc-plangothic)
epoch=2
pkgver=2.9.5795
pkgrel=1
pkgdesc='A project based on SourceHan to expand and supplement characters, and its ultimate goal is to complete the entire Unicode as much as possible.'
url='https://github.com/Fitzgerald-Porthmouth-Koenigsegg/Plangothic'
arch=('any')
license=('OFL-1.1')
replaces=('ttf-plangothic-mob')
source=(
    https://github.com/Fitzgerald-Porthmouth-Koenigsegg/Plangothic_Project/releases/download/V$pkgver/Plangothic-Super-V$pkgver.zip
    $pkgbase-$pkgver-LICENSE.txt::https://github.com/Fitzgerald-Porthmouth-Koenigsegg/Plangothic_Project/raw/refs/tags/V$pkgver/LICENSE-OFL.txt
)
b2sums=('b205a2998400f6dbac95fe7b05d3dffdbfe3be278256c5640202e4b914371b7698a138c52f930e713bfd156bb468afb9956fde63f6fb62443443fea05d39d1a0'
        'e3b7def662ec2412a460be8aebf5da2c2e57955d30438a7222c800c5ef6f5dce32cf510ea3f57f3435d93758725c172ea4e7e28d91f17ef049b45d4a428f88d9')

package_otf-plangothic() {
    cd "Plangothic-Super-V$pkgver"
    install -Dm755 -d "$pkgdir/usr/share/fonts/OTF/Plangothic"
    install -Dm644 "otf/PlangothicP1-Regular.otf" "$pkgdir/usr/share/fonts/OTF/Plangothic/PlangothicP1-Regular.otf"
    install -Dm644 "otf/PlangothicP2-Regular.otf" "$pkgdir/usr/share/fonts/OTF/Plangothic/PlangothicP2-Regular.otf"
    install -Dm644 ../"$pkgbase-$pkgver-LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_otc-plangothic() {
    cd "Plangothic-Super-V$pkgver"
    install -Dm755 -d "$pkgdir/usr/share/fonts/OTF/Plangothic"
    install -Dm644 "otf/Plangothic.ttc" "$pkgdir/usr/share/fonts/OTF/Plangothic/Plangothic.ttc"
    install -Dm644 ../"$pkgbase-$pkgver-LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_ttf-plangothic() {
    cd "Plangothic-Super-V$pkgver"
    install -Dm755 -d "$pkgdir/usr/share/fonts/TTF/Plangothic"
    install -Dm644 "static/PlangothicP1-Regular.ttf" "$pkgdir/usr/share/fonts/TTF/Plangothic/PlangothicP1-Regular.ttf"
    install -Dm644 "static/PlangothicP2-Regular.ttf" "$pkgdir/usr/share/fonts/TTF/Plangothic/PlangothicP2-Regular.ttf"
    install -Dm644 ../"$pkgbase-$pkgver-LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_ttc-plangothic() {
    cd "Plangothic-Super-V$pkgver"
    install -Dm755 -d "$pkgdir/usr/share/fonts/TTF/Plangothic"
    install -Dm644 "static/Plangothic.ttc" "$pkgdir/usr/share/fonts/TTF/Plangothic/Plangothic.ttc"
    install -Dm644 ../"$pkgbase-$pkgver-LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim: set ts=4 sw=4 et:
