linux-tools: add bpftool
Glibc only. :( Also make sure bash completions end up in the right packages.
This commit is contained in:
parent
0efef3dca8
commit
7981c95e74
1
srcpkgs/bpftool
Symbolic link
1
srcpkgs/bpftool
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
linux-tools
|
|
@ -1,14 +1,15 @@
|
||||||
# Template file for 'linux-tools'
|
# Template file for 'linux-tools'
|
||||||
pkgname=linux-tools
|
pkgname=linux-tools
|
||||||
version=5.10.4
|
version=5.10.4
|
||||||
revision=1
|
revision=2
|
||||||
wrksrc="linux-${version}"
|
wrksrc="linux-${version}"
|
||||||
build_style=meta
|
build_style=meta
|
||||||
hostmakedepends="asciidoc automake flex gettext libtool perl python3 xmlto"
|
hostmakedepends="asciidoc automake flex gettext libtool perl python3
|
||||||
makedepends="babeltrace-devel binutils-devel eudev-libudev-devel
|
python3-docutils xmlto"
|
||||||
|
makedepends="babeltrace-devel binutils-devel elfutils-devel eudev-libudev-devel
|
||||||
libcap-devel liblzma-devel libressl-devel libsysfs-devel libunwind-devel
|
libcap-devel liblzma-devel libressl-devel libsysfs-devel libunwind-devel
|
||||||
libzstd-devel ncurses-devel pciutils-devel python3-devel slang-devel
|
libzstd-devel ncurses-devel pciutils-devel python3-devel readline-devel
|
||||||
elfutils-devel"
|
slang-devel"
|
||||||
depends="cpupower-${version}_${revision} perf-${version}_${revision} usbip-${version}_${revision}"
|
depends="cpupower-${version}_${revision} perf-${version}_${revision} usbip-${version}_${revision}"
|
||||||
short_desc="Linux kernel tools meta-pkg"
|
short_desc="Linux kernel tools meta-pkg"
|
||||||
maintainer="Enno Boland <gottox@voidlinux.org>"
|
maintainer="Enno Boland <gottox@voidlinux.org>"
|
||||||
|
@ -18,7 +19,7 @@ distfiles="${KERNEL_SITE}/kernel/v5.x/linux-${version}.tar.xz"
|
||||||
checksum=904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
|
checksum=904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec
|
||||||
python_version=3
|
python_version=3
|
||||||
|
|
||||||
subpackages="cpupower libcpupower libcpupower-devel libusbip libusbip-devel usbip perf freefall tmon"
|
subpackages="cpupower freefall libcpupower libcpupower-devel libusbip libusbip-devel perf tmon usbip"
|
||||||
|
|
||||||
CFLAGS="-Wno-error -fcommon"
|
CFLAGS="-Wno-error -fcommon"
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
|
@ -32,6 +33,10 @@ ppc64*)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
|
*-musl) ;;
|
||||||
|
*) subpackages+=" bpftool";; # needs FTW_ACTIONRETVAL
|
||||||
|
esac
|
||||||
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
i686-musl) makedepends+=" libucontext-devel libunwind-devel" ;;
|
i686-musl) makedepends+=" libucontext-devel libunwind-devel" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -75,6 +80,14 @@ do_build() {
|
||||||
|
|
||||||
cd ${wrksrc}/tools/thermal/tmon
|
cd ${wrksrc}/tools/thermal/tmon
|
||||||
make ${makejobs} CC=$CC LD=$LD CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
|
make ${makejobs} CC=$CC LD=$LD CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
|
||||||
|
|
||||||
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
|
*-musl) ;;
|
||||||
|
*)
|
||||||
|
cd ${wrksrc}/tools/bpf
|
||||||
|
make -C bpftool all doc
|
||||||
|
make -W runqslower
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
|
@ -108,15 +121,35 @@ do_install() {
|
||||||
printf 'usbip-core\nusbip-host\n' > \
|
printf 'usbip-core\nusbip-host\n' > \
|
||||||
${DESTDIR}/usr/lib/modules-load.d/usbip.conf
|
${DESTDIR}/usr/lib/modules-load.d/usbip.conf
|
||||||
|
|
||||||
|
# bpf
|
||||||
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
|
*-musl) ;;
|
||||||
|
*)
|
||||||
|
cd ${wrksrc}/tools/bpf
|
||||||
|
make -W runqslower_install install DESTDIR=${DESTDIR} prefix=/usr
|
||||||
|
make -C bpftool doc-install DESTDIR=${DESTDIR} prefix=/usr/share
|
||||||
|
mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
|
||||||
|
esac
|
||||||
|
|
||||||
rm ${DESTDIR}/usr/include/cpuidle.h
|
rm ${DESTDIR}/usr/include/cpuidle.h
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bpftool_package() {
|
||||||
|
short_desc="Linux kernel tools for BPF"
|
||||||
|
pkg_install() {
|
||||||
|
vmove "usr/bin/bpf*"
|
||||||
|
vmove usr/share/bash-completion/completions/bpftool
|
||||||
|
vmove "usr/share/man/man7/bpf*"
|
||||||
|
vmove "usr/share/man/man8/bpf*"
|
||||||
|
}
|
||||||
|
}
|
||||||
cpupower_package() {
|
cpupower_package() {
|
||||||
short_desc="Linux kernel tool to set CPU power features"
|
short_desc="Linux kernel tool to set CPU power features"
|
||||||
conf_files="/etc/cpufreq-bench.conf"
|
conf_files="/etc/cpufreq-bench.conf"
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
vmove "usr/bin/cpu*"
|
vmove "usr/bin/cpu*"
|
||||||
vmove "usr/share/man/man1/cpu*"
|
vmove "usr/share/man/man1/cpu*"
|
||||||
|
vmove usr/share/bash-completion/completions/cpupower
|
||||||
vmove usr/share/doc/cpupower
|
vmove usr/share/doc/cpupower
|
||||||
vmove usr/share/locale
|
vmove usr/share/locale
|
||||||
vmove etc/cpufreq-bench.conf
|
vmove etc/cpufreq-bench.conf
|
||||||
|
@ -158,7 +191,7 @@ perf_package() {
|
||||||
vmove usr/bin/trace
|
vmove usr/bin/trace
|
||||||
vmove usr/lib/perf
|
vmove usr/lib/perf
|
||||||
vmove usr/libexec/perf-core
|
vmove usr/libexec/perf-core
|
||||||
vmove usr/share/bash-completion
|
vmove usr/share/bash-completion/completions/perf
|
||||||
if ! [ "$XBPS_TARGET_MACHINE" = i686 ]; then
|
if ! [ "$XBPS_TARGET_MACHINE" = i686 ]; then
|
||||||
vmove usr/share/perf-core
|
vmove usr/share/perf-core
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue