### this file is sourced not run
PKGVER=4.49.1
PKGBUILD=1
PKGARCH=noarch

# source: james
TARBALL=terminus-font-$PKGVER.tar.gz
MD5SUM=1b6acbd221957e33c8a792ebfaf3a659
SRC_URL=http://downloads.sourceforge.net/terminus-font/$TARBALL
BUNDLE=

X11_FONT_PATH=/usr/share/fonts/X11

SLACKREQ= # python3, bdftopcf build-time (if we build PCF variant)
SLACKDESC="console-terminus: console-terminus $PKGVER (Terminus Bitmap Font)
console-terminus: 
console-terminus: Terminus Font is a clean, fixed width bitmap font, designed for long 
console-terminus: (8 and more hours per day) work with computers. It contains 1356 
console-terminus: characters, and covers about 120 language sets. This package contains 
console-terminus: the PSF fonts for Linux console. It contains the ll2 td1 and br1 
console-terminus: variant.
console-terminus: 
console-terminus: https://terminus-font.sourceforge.net/
console-terminus: 
console-terminus:
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&

	# enable variants: ll2, td1 and br1
	cd tmp/terminus* &&
	patch -Np1 -i alt/ll2.diff &&
	patch -Np1 -i alt/td1.diff &&
	patch -Np1 -i alt/br1.diff &&
	true
}

### default pkg_package

### build
pkg_build() {
	cd /tmp/terminus* &&
	./configure --prefix=/usr        \
		--x11dir=$X11_FONT_PATH/misc \
		--otbdir=$X11_FONT_PATH/TTF  \
	&&
	make -j8 psf &&     # otb pcf
	make install-psf && # install-otb install-pcf
	install -Dm644 -t /usr/share/doc/terminus README CHANGES &&
	
	pkg_build_slackdesc
}
