diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-06-30 14:37:18 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-06-30 14:37:18 +0000 |
commit | c22f41c0fc0520e302e8de1b42acc83fcaf7725e (patch) | |
tree | 069242e6e6334de711ecfb85569f4c9ca47fb50f | |
parent | b386386fbd9a04b1efd01a38cd2849d39de53abd (diff) | |
download | aports-c22f41c0fc0520e302e8de1b42acc83fcaf7725e.tar.bz2 aports-c22f41c0fc0520e302e8de1b42acc83fcaf7725e.tar.xz |
core/linux-grsec: fix the -dev package to work as intended
We copy the needed stuff from kernel source thats enough to fool
third party modules that we have the full source even if we dont.
This was taken from ubuntu build scripts.
-rw-r--r-- | core/linux-grsec/APKBUILD | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/core/linux-grsec/APKBUILD b/core/linux-grsec/APKBUILD index 6f02ab6425..b12d5615f7 100644 --- a/core/linux-grsec/APKBUILD +++ b/core/linux-grsec/APKBUILD @@ -4,7 +4,7 @@ _flavor=grsec pkgname=linux-${_flavor} pkgver=2.6.29.5 _kernver=2.6.29 -pkgrel=0 +pkgrel=1 pkgdesc="Linux kernel with grsecurity" url=http://grsecurity.net makedepends="perl installkernel" @@ -58,7 +58,8 @@ build() { INSTALL_PATH="$pkgdir"/boot # point the build symlink to headers dir - rm -f "$pkgdir"/lib/modules/${_abi_release}/build + rm -f "$pkgdir"/lib/modules/${_abi_release}/build \ + "$pkgdir"/lib/modules/${_abi_release}/source ln -sf /usr/src/linux-headers-${_abi_release} \ "$pkgdir"/lib/modules/${_abi_release}/build } @@ -69,7 +70,23 @@ dev() { mkdir -p "$dir" cp "$srcdir"/kernelconfig "$dir"/.config make -j1 -C "$srcdir"/linux-$_kernver O="$dir" HOSTCC="$CC" \ - silentoldconfig prepare scripts + silentoldconfig prepare scripts + + rm "$dir"/Makefile "$dir"/source + + # copy the only the parts that we really need + # this is taken from ubuntu kernel build script + cd "$srcdir"/linux-$_kernver + find . -path './include/*' -prune -o -path './scripts/*' -prune \ + -o -type f \( -name 'Makefile*' -o -name 'Kconfig*' \ + -o -name 'Kbuild*' -o -name '*.sh' -o -name '*.pl' \ + -o -name '*.lds' \) | cpio -pdm "$dir" + cp -a drivers/media/dvb/dvb-core/*.h "$dir"/drivers/media/dvb/dvb-core + cp -a drivers/media/video/*.h "$dir"/drivers/media/video + cp -a drivers/media/dvb/frontends/*.h "$dir"/drivers/media/dvb/frontends + cp -a scripts include "$dir" + find $(find arch -name include -type d -print) -type f \ + | cpio -pdm "$dir" install -Dm644 "$srcdir"/build/Module.symvers \ "$dir"/Module.symvers |