void-packages/srcpkgs/crash/template
Christian Neukirchen 856990ab07 crash: nopie on i686.
2015-12-17 15:46:07 +01:00

39 lines
1.1 KiB
Bash

# Template file for 'crash'
pkgname=crash
version=7.1.4
revision=1
build_style=gnu-makefile
hostmakedepends="flex"
makedepends="ncurses-devel zlib-devel lzo-devel"
short_desc="Kernel crash dump debugger and live inspector"
maintainer="Christian Neukirchen <chneukirchen@gmail.com>"
license="GPL-3"
homepage="http://people.redhat.com/anderson/"
distfiles="http://people.redhat.com/anderson/${pkgname}-${version}.tar.gz"
checksum=2c84b7d33cbf2145fc5af8064744a8496dd2383d63d51cd00f657f474a82434c
nocross=yes
case "$XBPS_TARGET_MACHINE" in
i686*) nopie=yes;; # broken CPUID inline assembly
esac
post_extract() {
sed -i 's|arch|uname -a|g' extensions/snap.mk
sed -i 's|/usr/lib/debug/lib/modules|/usr/lib/debug/usr/lib/modules|g' defs.h
sed -i 's|/boot/efi/redhat|/usr/lib/debug/boot/|g' filesys.c
}
do_build() {
make gdb_unzip
sed -i 's|sys/debugreg.h|asm/debugreg.h|g' gdb-7.6/gdb/amd64-linux-nat.c
make ${makejobs} lzo
make ${makejobs} extensions
}
do_install() {
vbin crash
vman crash.8
vmkdir usr/lib/crash/extensions
for f in extensions/*.so; do
vinstall $f 0644 usr/lib/crash/extensions
done
}