# Contributor: Johannes Matheis <jomat+alpinebuild@jmt.gr>
# Maintainer: Johannes Matheis <jomat+alpinebuild@jmt.gr>
pkgname=xorg-cf-files
pkgver=1.0.6
pkgrel=0
pkgdesc="Data files for the imake utility"
url="http://xorg.freedesktop.org/"
arch="noarch"
license="custom"
depends=""
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages="$pkgname-doc"
source="${url}releases/individual/util/${pkgname}-${pkgver}.tar.bz2"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
   local i
   cd "$_builddir"
   for i in $source; do
       case $i in
       *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
       esac
   done
}

build() {
   cd "$_builddir"
   ./configure \
       --build=$CBUILD \
       --host=$CHOST \
       --prefix=/usr \
       --sysconfdir=/etc \
       --mandir=/usr/share/man \
       --infodir=/usr/share/info \
       --localstatedir=/var \
       || return 1
   make || return 1
}

package() {
   cd "$_builddir"
   make DESTDIR="$pkgdir" install || return 1
   install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
   install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
}

md5sums="28649f34fa23143f1945aa2750e1472a  xorg-cf-files-1.0.6.tar.bz2"
sha256sums="4dcf5a9dbe3c6ecb9d2dd05e629b3d373eae9ba12d13942df87107fdc1b3934d  xorg-cf-files-1.0.6.tar.bz2"
sha512sums="1749a5fbcda2c15c300028abce79a3304cfb10f215bf98cf30558144eb64f9fa06a69203159f44405224ed567ac5bc0ff1222e3656367f69acc99f44871424fa  xorg-cf-files-1.0.6.tar.bz2"