Commit d85e87e8 authored by Natanael Copa's avatar Natanael Copa

testing/kqemu-vserver: use prepare() and package()

parent 955233cd
......@@ -12,7 +12,7 @@ _abi_release=$pkgver-${_flavor}
pkgname=${_realname}-${_flavor}
pkgver=$pkgver
_realver=1.4.0pre1
pkgrel=0
pkgrel=1
pkgdesc="$_flavor kernel modules for kemu"
url="http://www.nongnu.org/qemu/"
license="GPL"
......@@ -22,11 +22,22 @@ makedepends="linux-${_flavor}-dev=${_kernelver}"
subpackages=
source="http://www.nongnu.org/qemu/kqemu-$_realver.tar.gz"
# override the kernel's prepare()
prepare() {
cd "$srcdir"/$_realname-$_realver
sed -i 's:MODULE_PARM(\([^,]*\),"i");:module_param(\1, int, 0);:' kqemu-linux.c
}
build() {
cd "$srcdir"/$_realname-$_realver
export CFLAGS="$CFLAGS -fno-pie -fno-stack-protector"
export KERNEL_CFLAGS="$CFLAGS"
./configure --kernel-path=/lib/modules/${_abi_release}/build
make || return 1
}
package() {
cd "$srcdir"/$_realname-$_realver
install -D -m644 kqemu.ko \
"$pkgdir"/lib/modules/${_abi_release}/misc/kqemu.ko \
|| return 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment