# Maintainer: David Runge <dvzrv@archlinux.org>
pkgbase=libtraceevent
pkgname=(
libtraceevent
libtraceevent-docs
)
pkgver=1.8.2
pkgrel=1
epoch=1
pkgdesc="Linux kernel trace event library"
arch=(x86_64 'armv7h')
url="https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/about/"
license=(
GPL-2.0-only
LGPL-2.1-only
)
makedepends=(
asciidoc
xmlto
)
source=(
https://git.kernel.org/pub/scm/libs/libtrace/$pkgname.git/snapshot/$pkgname-$pkgver.tar.gz
$pkgname-1.5.0-documentation.patch
)
sha512sums=('52b7a23e8bf04feaa568199c99c98217fcb8df1b99d46197ef9edcea19b42e71ff9d2e6c45ebf5335ec782d636ad3d14be4acae5a9e5158650f5f62813081fa2'
'74b34a722d3fb9d672826e0b6b137f94a7fcd41bb372f8944bb6a0c652c0e725aaef8e95284fc091c2e9954bcf1656b5428d7e0f121682d40c25623178ee4a1e')
b2sums=('afadd9f559bdc071b3741ce42b8bf0c320523f2b39c437bcf4180f277eb804c33b2feac447fae15a869164475fb5f019ef171b69be32c46b74e5f22a3ed3808b'
'f66f4f20dfe562407a0d4bb53785d1515c4b5f4be64dd96e06ea6c9e03c299b2f0f613901c30893a976b3874d13e768791632a7cb89be92f3788330e4f5ab97d')
_pick() {
local p="$1" f d; shift
for f; do
d="$srcdir/$p/${f#$pkgdir/}"
mkdir -p "$(dirname "$d")"
mv "$f" "$d"
rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
done
}
prepare() {
patch -d $pkgname-$pkgver -p1 -i ../$pkgname-1.5.0-documentation.patch
}
build() {
make -C $pkgname-$pkgver
make -C $pkgname-$pkgver/Documentation
}
package_libtraceevent() {
depends=(glibc)
optdepends=('libtraceevent-docs: for documentation')
provides=(libtraceevent.so)
make libdir_relative=lib prefix=/usr DESTDIR="$pkgdir/" install -C $pkgname-$pkgver
make libdir_relative=lib prefix=/usr DESTDIR="$pkgdir/" install -C $pkgname-$pkgver/Documentation
(
cd "$pkgdir"
_pick libtraceevent-docs usr/share/doc
)
}
package_libtraceevent-docs() {
pkgdesc+=" - documentation"
mv -v $pkgname/* "$pkgdir"
}