# Maintainer:
pkgname=libtracefs
pkgver=1.8.2
pkgrel=0
pkgdesc="Linux kernel trace file system library"
url="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/about/"
arch="all"
license="LGPL-2.1-or-later"
makedepends="
	asciidoc
	bison
	docbook-xsl-nons
	flex
	libtraceevent-dev
	meson
	source-highlight
	xmlto
	"
checkdepends="cunit-dev"
subpackages="
	$pkgname-bash-completion
	$pkgname-dev
	$pkgname-doc
	$pkgname-utils
	"
source="https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-$pkgver.tar.gz"
options="!check" # fail to start, but exit 0

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

check() {
	meson test --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

utils() {
	pkgdesc="$pkgdesc (utils)"

	amove usr/bin
}

sha512sums="
a4437f40b97c700a643e4a232876b44415f91043b474787784e513d18eafa071a07c9b6431185914a97b258ea6ef89bab247e2feead0366144502e7c95b8c9fd  libtracefs-1.8.2.tar.gz
"
