# Maintainer: Adrian Siekierka <kontakt@asie.pl>
pkgname=font-tewi
pkgver=2.0.1
pkgrel=0
pkgdesc="tewi bitmap font"
url="https://github.com/lucy/tewi-font"
arch="noarch"
license="MIT"
depends="encodings font-alias mkfontscale mkfontdir fontconfig"
makedepends="bash font-util-dev python3 bdftopcf"
source="tewi-font-${pkgver}.tar.gz::https://github.com/lucy/tewi-font/archive/$pkgver.tar.gz"
builddir="$srcdir/tewi-font-$pkgver"

prepare() {
	cd "$builddir"
	sed -i -e "s/env python/env python3/" scripts/diff.py || return 1
	sed -i -e "s/env python/env python3/" scripts/merge.py || return 1
}

build() {
	cd "$builddir"
	make || return 1
}

package() {
	cd "$builddir"/out
	mkdir -p "$pkgdir/usr/share/fonts/misc"
	install -Dm644 *.pcf.gz "$pkgdir/usr/share/fonts/misc"
}

md5sums="59a96ba55b39b55bd2be87ad377e56d3  tewi-font-2.0.1.tar.gz"
sha256sums="0af4949608a9541b79d9aade3e3c4f019bd1fdb2590daecf9ce2d81659637aa3  tewi-font-2.0.1.tar.gz"
sha512sums="bec89fab374d919d17690d16c317ca5ee433159ccd51ab15f088e4754c8684a842e78a663c4f407a4c06d8c2678911240c66b14a833204f3a9103f778a2f9b20  tewi-font-2.0.1.tar.gz"
