# Contributor: Holger Jaekel <holger.jaekel@gmx.de>
# Maintainer: Holger Jaekel <holger.jaekel@gmx.de>
pkgname=font-urw-base35
pkgver=20200910
pkgrel=0
pkgdesc="URW++ font set metric-compatible with the 35 PostScript Level 2 Base Fonts"
url="https://github.com/ArtifexSoftware/urw-base35-fonts"
arch="noarch"
license="AGPL-3.0-only"
source="$pkgname-$pkgver.tar.gz::https://github.com/ArtifexSoftware/urw-base35-fonts/archive/refs/tags/$pkgver.tar.gz"
options="!check"  # it's a font
builddir="$srcdir/urw-base35-fonts-$pkgver"

package() {
	install -vDm 644 fonts/*.otf -t "$pkgdir/usr/share/fonts/$pkgname"
	install -vDm 644 appstream/*.xml -t "$pkgdir/usr/share/metainfo"

	install -vdm 755 "$pkgdir/usr/share/fontconfig/conf.default/"
	for _config in fontconfig/*.conf; do
		local config_path="$pkgdir/usr/share/fontconfig/conf.avail/69-${_config##*/}"
		install -vDm 644 "$_config" "$config_path"
		ln -s "../conf.avail/69-${_config##*/}" "$pkgdir/usr/share/fontconfig/conf.default/69-${_config##*/}"
	done
}

sha512sums="
71fb27baadf5abc4ff624cdede02038681acd5fffdc728a5b2e7808713b80cb2f2174f90a1862e69d390c4434c49d5167ab095100032fa3ba80b586eb8ae51d1  font-urw-base35-20200910.tar.gz
"
