# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Orion <systmkor@gmail.com>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=terminus-font
pkgver=4.46
pkgrel=0
pkgdesc="Monospace bitmap font (for X11 and console)"
url="http://terminus-font.sourceforge.net/"
arch="noarch"
license="custom"
depends=""
depends_dev=""
makedepends="bdftopcf fontconfig mkfontscale mkfontdir python3"
options="!check"
install=""
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/project/$pkgname/$pkgname-$pkgver/$pkgname-$pkgver.tar.gz"

builddir="$srcdir"/$pkgname-$pkgver
build() {
	cd "$builddir"
	make \
		prefix=/usr \
		x11dir=/usr/share/fonts/misc \
		psfdir=/usr/share/consolefonts
}

package() {
	cd "$builddir"
	make \
		prefix=/usr \
		x11dir=/usr/share/fonts/misc \
		psfdir=/usr/share/consolefonts \
		DESTDIR="$pkgdir" install \
		|| return 1

	install -d "$pkgdir"/usr/share/doc/$pkgname
	install -Dm655 README README-BG \
		"$pkgdir"/usr/share/doc/$pkgname/ || return 1

	install -Dm644 75-yes-terminus.conf \
		"$pkgdir"/etc/fonts/conf.avail/75-yes-terminus.conf
	install -Dm644 OFL.TXT \
		"$pkgdir"/usr/share/licenses/$pkgname/LICENSE

	install -d "$pkgdir/etc/fonts/conf.d"
	cd "$pkgdir/etc/fonts/conf.d"
	ln -s ../conf.avail/75-yes-terminus.conf . || return 1
}

sha512sums="ae221920ecff54b9575a25d30a429feee6e19ef1e9669896c34f86f80d5495c3654f5423ff1df76e86bc999d1f37c306048b44d8ca55144f0f299926d3d33b58  terminus-font-4.46.tar.gz"
