# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libpciaccess
pkgver=0.18.1
pkgrel=0
pkgdesc="X11 PCI access library"
url="https://xorg.freedesktop.org/"
arch="all"
license="X11"
options="!check"  # No test suite.
depends="hwdata-pci"
makedepends="meson"
subpackages="$pkgname-dev $pkgname-doc"
source="https://www.x.org/releases/individual/lib/libpciaccess-$pkgver.tar.xz"

build() {
	abuild-meson \
		-Db_lto=true \
		. output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

sha512sums="
ef27999446e735df2331e94219ee3dafe9198a2472bb452f63ef9c9c446d5431f9e231e224cfabdeba1402974a5a0064546f9abced4d1770f994f5fc0c2b3310  libpciaccess-0.18.1.tar.xz
"
