LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File PKGBUILD of Package phallus-fonts-git (Project home:metakcahura)

# Maintainer: Josip Ponjavic <josipponjavic at gmail dot com>
# Contributor: pzl <alsoelp@gmail.com>

pkgname=phallus-fonts-git
pkgver=141.3e8bf64
pkgrel=2
pkgdesc="Lemon and Uushi fonts by phallus"
arch=('any')
url="https://github.com/phallus/fonts"
license=('custom:WTFPL')
depends=('xorg-font-utils')
makedepends=('git' 'fontconfig' 'xorg-font-utils')
install="${pkgname%-*}.install"
provides=("${pkgname%-*}")
conflicts=("${pkgname%-*}")
source=("${pkgname}-${pkgver}.tar.xz")
md5sums=('SKIP')

_maps=(ISO8859-1 ISO8859-2 ISO8859-4 ISO8859-9 ISO8859-15)

prepare() {
	cd "${pkgname}-${pkgver}"

	sed -i '/^\(FONT\|CHARSET_REGISTRY\)/s/ISO8859/ISO10646/' *.bdf
	for f in *.bdf; do
	    for m in "${_maps[@]}"; do
	        ucs2any "$f" "/usr/share/fonts/util/map-$m" "$m"
	    done
	done
}

build() {
	cd "${pkgname}-${pkgver}"

	for f in *.bdf; do
	    bdftopcf -o "${f%.bdf}.pcf" "$f"
	done
}

package() {
	cd "${pkgname}-${pkgver}"

	for f in *.pcf; do
	    install -D -m644 "$f" "${pkgdir}/usr/share/fonts/misc/$f"
	done
	install -D -m644 license "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}