linux-tools: fix build on ARM

This commit is contained in:
Christian Neukirchen 2014-08-19 21:18:57 +02:00
parent 4cc17d7b04
commit 12e2dc03dd
1 changed files with 30 additions and 16 deletions

View File

@ -1,20 +1,28 @@
# Template file for 'linux-tools'
pkgname=linux-tools
version=3.15
revision=1
revision=2
wrksrc="linux-${version}"
short_desc="Linux kernel tools meta-pkg"
hostmakedepends="flex perl asciidoc xmlto python automake libtool"
makedepends="pciutils-devel libnuma-devel python-devel libglib-devel libsysfs-devel
makedepends="pciutils-devel python-devel libglib-devel libsysfs-devel
elfutils-devel libunwind-devel binutils-devel zlib-devel slang-devel libudev-devel"
depends="cpupower>=${version} perf>=${version} usbip>=${version} x86_energy_perf_policy>=${version}"
depends="cpupower>=${version} perf>=${version} usbip>=${version}"
maintainer="Juan RP <xtraeme@gmail.com>"
license="GPL-2"
homepage="http://www.kernel.org"
distfiles="http://ftp.kernel.org/pub/linux/kernel/v3.x/linux-${version}.tar.xz"
checksum=c3927e87be4040fa8aca1b58663dc0776aaf00485604ff88a623be2f3fb07794
only_for_archs="i686 x86_64"
if [ "$XBPS_TARGET_MACHINE" = "i686" -o "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
makedepends+=" libnuma-devel"
depends+=" x86_energy_perf_policy>=${version}"
fi
if [ "$CROSS_BUILD" ]; then
msg_red "${pkgname}-${version}: this package cannot be cross compiled right now.\n"
exit 0
fi
do_build() {
cd ${wrksrc}/tools/perf
@ -31,8 +39,10 @@ do_build() {
unset LDFLAGS
make CC=$CC VERSION=${version}_${revision}
cd ${wrksrc}/tools/power/x86/x86_energy_perf_policy
make ${makejobs}
if [ "$XBPS_TARGET_MACHINE" = "i686" -o "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
cd ${wrksrc}/tools/power/x86/x86_energy_perf_policy
make ${makejobs}
fi
cd ${wrksrc}/drivers/staging/usbip/userspace
# fix missing man page
@ -71,10 +81,12 @@ do_install() {
${DESTDIR}/usr/lib/modules-load.d/usbip.conf
vinstall ${FILESDIR}/usbipd.service 644 usr/lib/systemd/system
# x86_energy_perf_policy
cd ${wrksrc}/tools/power/x86/x86_energy_perf_policy
vinstall x86_energy_perf_policy 755 usr/bin
vinstall x86_energy_perf_policy.8 644 usr/share/man/man8
if [ "$XBPS_TARGET_MACHINE" = "i686" -o "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
# x86_energy_perf_policy
cd ${wrksrc}/tools/power/x86/x86_energy_perf_policy
vinstall x86_energy_perf_policy 755 usr/bin
vinstall x86_energy_perf_policy.8 644 usr/share/man/man8
fi
if [ -d ${DESTDIR}/usr/lib64 ]; then
mv ${DESTDIR}/usr/lib64/* ${DESTDIR}/usr/lib/
@ -138,13 +150,15 @@ perf_package() {
}
}
x86_energy_perf_policy_package() {
short_desc="Read or write MSR_IA32_ENERGY_PERF_BIAS"
pkg_install() {
vmove usr/bin/x86_energy_perf_policy
vmove usr/share/man/man8/x86_energy_perf_policy.8
if [ "$XBPS_TARGET_MACHINE" = "i686" -o "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
x86_energy_perf_policy_package() {
short_desc="Read or write MSR_IA32_ENERGY_PERF_BIAS"
pkg_install() {
vmove usr/bin/x86_energy_perf_policy
vmove usr/share/man/man8/x86_energy_perf_policy.8
}
}
}
fi
usbip_package() {
short_desc="An USB device sharing system over IP network"