# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=xorg-mkfontdir
pkgver=1.0.7
pkgrel=11
pkgdesc="Create an index of X font files in a directory"
arch=(any)
url="https://xorg.freedesktop.org/"
license=('custom')
depends=('bash' 'xorg-mkfontscale')
makedepends=('xorg-util-macros')
groups=('xorg' 'xorg-apps')
install=xorg-mkfontdir.install
source=(https://xorg.freedesktop.org/archive/individual/app/mkfontdir-${pkgver}.tar.bz2
        xorg-mkfontdir.hook
        xorg-mkfontdir.script)
sha256sums=('56d52a482df130484e51fd066d1b6eda7c2c02ddbc91fe6e2be1b9c4e7306530'
            '4b43af2f2683aad73ddc01b862a3a3744a2c74c1a8697daaba31a4350d407c02'
            '06c60e3e46a76b5300c3224cea6b5094556ea712a08ff9a0103be2eb58d222b5')

build() {
  cd mkfontdir-${pkgver}
  ./configure --prefix=/usr \
	      --build=$CHOST
  make
}

package() {
  cd mkfontdir-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
  install -Dm644 ../xorg-mkfontdir.hook "${pkgdir}/usr/share/libalpm/hooks/xorg-mkfontdir.hook"
  install -D ../xorg-mkfontdir.script "${pkgdir}/usr/share/libalpm/scripts/xorg-mkfontdir"
}
