# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=msttcorefonts-installer
pkgver=3.8.1
pkgrel=1
pkgdesc="Installer for Microsoft TrueType core fonts"
url="https://packages.debian.org/sid/ttf-mscorefonts-installer"
arch="noarch"
license="GPL-2.0-or-later"
depends="cabextract wget"
makedepends="$depends_dev"
install="$pkgname.post-install"
options="!check" #no test suite
source="http://ftp.debian.org/debian/pool/contrib/m/msttcorefonts/msttcorefonts_$pkgver.tar.xz
	remove-debian-stuff.patch
	"
builddir="$srcdir"/msttcorefonts

prepare() {
	default_prepare

	# default script has -Z selinux flag, not present
	# on busybox
	sed -i "s|mv -Z|mv|" "$builddir"/update-ms-fonts
}

package() {
	mkdir -p "$pkgdir"/usr/share/fonts/truetype/msttcorefonts
	install -m755 -D update-ms-fonts "$pkgdir"/usr/bin/update-ms-fonts
	install -m644 -D cabfiles.sha256sums \
		"$pkgdir"/var/lib/msttcorefonts/cabfiles.sha256sums
}

sha512sums="
27383a885e451d15b5acccedcda9a35f6a67955fd9fc269037f89c7d5102fb117c7b1b7ffe0ae2bd98436b8771b8fd34ea4e005b5fef8c670fd1bc88b9471854  msttcorefonts_3.8.1.tar.xz
3d1117b070beed9ac37eaf70f27ec4f3d9c894ad8622999ea772f9f7cb796e079723d86ff79fc2cdace0ff4c885dbc5c617ff8a144fc333277c27fd2a3f2f8e1  remove-debian-stuff.patch
"
