# Template file for 'dtrace-utils'
pkgname=dtrace-utils
version=2.0.7
revision=1
archs="~*-musl" # ld.so internals, other glibc specifics
build_style=gnu-configure
hostmakedepends="cross-bpf-binutils cross-bpf-gcc flex libgomp-devel pkg-config
 shadow"
makedepends="binutils-devel elfutils-devel fuse-devel libbpf-devel libpcap-devel
 libpfm4-devel valgrind-devel"
short_desc="Linux version of the DTrace tracing tool"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="UPL-1.0"
homepage="https://github.com/oracle/dtrace"
changelog="https://github.com/oracle/dtrace/blob/devel/NEWS"
distfiles="https://github.com/oracle/dtrace/archive/refs/tags/${version}.tar.gz"
checksum=c155df58c954d9b40782e060eb113e7967511fafbab3a291c6671e4f5d222d30
nostrip_files="bpf_dlib.o libdtrace.so.2.0.0"
make_check=no  # needs root
nocross=yes # mkoffsets
conflicts="systemtap>=0"

export BPFC="bpf-gcc"
export BPFLD="bpf-ld"

post_install() {
	rm ${DESTDIR}/usr/share/doc/dtrace-*/showUSDT
	mv ${DESTDIR}/lib64/* ${DESTDIR}/usr/lib/
	rmdir ${DESTDIR}/lib64
}
