# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xwininfo
pkgver=1.1.3
pkgrel=0
pkgdesc="Window information utility for X"
url="https://cgit.freedesktop.org/xorg/app/xwininfo/"
arch="all"
license="custom"
options="!check"  # No test suite.
depends=
makedepends="libx11-dev libxext-dev util-macros"
install=
subpackages="$pkgname-doc"
source="http://www.x.org/releases/individual/app/xwininfo-$pkgver.tar.bz2"

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

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

sha512sums="b4c3c72de157d33e309694be96dcafabb3240c1883fb3caf44843cba8b90fe09496eb4ab061eba9107115d76ca59a8ec660e11ff968e422ab35cd5e1749ca466  xwininfo-1.1.3.tar.bz2"
