mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-28 03:51:35 +01:00
87 lines
2.9 KiB
Plaintext
87 lines
2.9 KiB
Plaintext
# Contributor: Leo <thinkabit.ukim@gmail.com>
|
|
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
|
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
|
pkgname=linux-tools
|
|
pkgver=5.4.3
|
|
_kernver=${pkgver%.*}
|
|
pkgrel=0
|
|
pkgdesc="Linux kernel tools meta package"
|
|
url="https://www.kernel.org/"
|
|
arch="all !aarch64 !armhf !armv7"
|
|
license="GPL-2.0-only"
|
|
depends="cpupower perf"
|
|
depends_dev="pciutils-dev readline-dev gettext-dev"
|
|
makedepends="$depends_dev elfutils-dev bash linux-headers flex bison diffutils
|
|
zlib-dev findutils"
|
|
subpackages="perf perf-bash-completion:bashcomp:noarch cpupower $pkgname-doc $pkgname-dev"
|
|
source="https://kernel.org/pub/linux/kernel/v5.x/linux-$_kernver.tar.xz
|
|
https://kernel.org/pub/linux/kernel/v5.x/patch-$pkgver.xz
|
|
cpupower-libs.patch
|
|
disable-Werror.patch
|
|
"
|
|
|
|
builddir="$srcdir"/linux-$_kernver
|
|
|
|
prepare() {
|
|
cd "$srcdir"/linux-$_kernver
|
|
if [ "${pkgver%.0}" = "$pkgver" ]; then
|
|
msg "Applying patch-$pkgver.xz"
|
|
unxz -c < "$srcdir"/patch-$pkgver.xz | patch -p1 -N
|
|
fi
|
|
default_prepare
|
|
}
|
|
|
|
_make_tools() {
|
|
make -C "$builddir"/tools \
|
|
VERSION=$pkgver-$pkgrel NLS=false LIBINTL_LIBS=-lintl WERROR=0 \
|
|
prefix=/usr libdir=/usr/lib lib=lib mandir=/usr/share/man \
|
|
"$@"
|
|
}
|
|
|
|
build() {
|
|
_make_tools perf cpupower
|
|
}
|
|
|
|
package() {
|
|
mkdir -p "$pkgdir"
|
|
_make_tools DESTDIR="$pkgdir" \
|
|
perf_install cpupower_install
|
|
}
|
|
|
|
cpupower() {
|
|
pkgdesc="Linux kernel tool to set CPU power features"
|
|
mkdir -p "$subpkgdir"/usr/sbin \
|
|
"$subpkgdir"/usr/bin \
|
|
"$subpkgdir"/usr/lib \
|
|
"$subpkgdir"/etc
|
|
|
|
mv "$pkgdir"/usr/bin/cpu* "$subpkgdir"/usr/bin/
|
|
mv "$pkgdir"/usr/sbin/cpu* "$subpkgdir"/usr/sbin/
|
|
mv "$pkgdir"/usr/lib/libcpu*.so.* "$subpkgdir"/usr/lib/
|
|
mv "$pkgdir"/etc/cpu* "$subpkgdir"/etc/
|
|
}
|
|
|
|
perf() {
|
|
pkgdesc="Linux kernel performance auditing tool"
|
|
mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib
|
|
mv "$pkgdir"/usr/bin/perf \
|
|
"$pkgdir"/usr/bin/trace \
|
|
"$subpkgdir"/usr/bin
|
|
mv "$pkgdir"/usr/lib/traceevent \
|
|
"$subpkgdir"/usr/lib/
|
|
mv "$pkgdir"/usr/libexec "$subpkgdir"/usr/
|
|
}
|
|
|
|
bashcomp() {
|
|
replaces="$pkgname-bash-completion" # Backward compatibility
|
|
pkgdesc="Bash autocompletion for $pkgname"
|
|
install_if="perf=$pkgver-r$pkgrel bash-completion"
|
|
mkdir -p "$subpkgdir"/usr/share/bash-completion/completions
|
|
mv "$pkgdir"/etc/bash_completion.d "$subpkgdir"/usr/share/bash-completion/completions
|
|
}
|
|
|
|
sha512sums="9f60f77e8ab972b9438ac648bed17551c8491d6585a5e85f694b2eaa4c623fbc61eb18419b2656b6795eac5deec0edaa04547fc6723fbda52256bd7f3486898f linux-5.4.tar.xz
|
|
7146258dcd169552fdcc6ad02b709310e57d413be84c76061669712c840a6de3e8e104fdba763df284b465e0217a6e74435f1fb2e0faf16feb2d595193bd8a4a patch-5.4.3.xz
|
|
a46e3a84b00a39a356618831d0ddfb7f0d10f0a3799d1307ba2cc832e73c01f8d637a4e801a6dd25025f6f13155c6ad8b836422ff72d365e51063ac0bf907f52 cpupower-libs.patch
|
|
a0b90cead5f80a7e785b2fdd8ac9faed1234f4aa5eebf658af8d8b4d3b8593147ff43810d0b28a95b057bb7781113a48723b9cf9432ec8d9510451b51416e3de disable-Werror.patch"
|