# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xproto
pkgver=7.0.31
pkgrel=1
pkgdesc="X11 core wire protocol and auxiliary headers"
url="http://xorg.freedesktop.org/"
arch="noarch"
license="custom"
depends=""
makedepends="util-macros xmlto"
# only headers here so no need for subpkgs
subpackages="$pkgname-doc"
source="http://www.x.org/releases/individual/proto/$pkgname-$pkgver.tar.bz2"

builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$builddir"
	default_prepare
	update_config_sub
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make -j1 DESTDIR="$pkgdir" install
	install -D -m644 "$srcdir"/$pkgname-$pkgver/COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

md5sums="16791f7ca8c51a20608af11702e51083  xproto-7.0.31.tar.bz2"
sha256sums="c6f9747da0bd3a95f86b17fb8dd5e717c8f3ab7f0ece3ba1b247899ec1ef7747  xproto-7.0.31.tar.bz2"
sha512sums="bba6141525c21fd9a3cf210853658cc7af69f82e1ac15bacfffb9280efc3fe3c6fa708095b541b6f33f114c11e808bde8c8839ae63ff88e30963abdfac12702b  xproto-7.0.31.tar.bz2"
