Commit c22f41c0 authored by Natanael Copa's avatar Natanael Copa
Browse files

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.
parent b386386f
......@@ -4,7 +4,7 @@ _flavor=grsec
pkgdesc="Linux kernel with grsecurity"
makedepends="perl installkernel"
......@@ -58,7 +58,8 @@ build() {
# point the build symlink to headers dir
rm -f "$pkgdir"/lib/modules/${_abi_release}/build
rm -f "$pkgdir"/lib/modules/${_abi_release}/build \
ln -sf /usr/src/linux-headers-${_abi_release} \
......@@ -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 \
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