summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-07-01 08:51:45 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-07-01 08:51:45 +0000
commit7a5096f29f4b15cf18963f6254ba7a585d7d28a0 (patch)
treef66dfd03c19218ba4a84055dc92345eafa8f6de2 /core
parent57c9b6bd414e41b98b0c8ef99d011cd32a3e0f4f (diff)
downloadaports-7a5096f29f4b15cf18963f6254ba7a585d7d28a0.tar.bz2
aports-7a5096f29f4b15cf18963f6254ba7a585d7d28a0.tar.xz
core/linux-grsec: create link to /boot/<flavor>. add some comments
Diffstat (limited to 'core')
-rw-r--r--core/linux-grsec/APKBUILD24
1 files changed, 19 insertions, 5 deletions
diff --git a/core/linux-grsec/APKBUILD b/core/linux-grsec/APKBUILD
index 160d9abf..74f8eb6f 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=1
+pkgrel=2
pkgdesc="Linux kernel with grsecurity"
url=http://grsecurity.net
makedepends="perl installkernel"
@@ -57,24 +57,38 @@ build() {
INSTALL_MOD_PATH="$pkgdir" \
INSTALL_PATH="$pkgdir"/boot
- # point the build symlink to headers dir
+ ln -s vmlinuz-${_abi_release} "${pkgdir}"/boot/$_flavor
+
rm -f "$pkgdir"/lib/modules/${_abi_release}/build \
"$pkgdir"/lib/modules/${_abi_release}/source
}
-dev() {
+dev() {
+ # copy the only the parts that we really need for build 3rd party
+ # kernel modules and install those as /usr/src/linux-headers,
+ # simlar to what ubuntu does
+ #
+ # this way you dont need to install the 300-400 kernel sources to
+ # build a tiny kernel module
+ #
pkgdesc="Headers and script for third party modules for grsec kernel"
- # create flavored headers ubuntu style
local dir="$subpkgdir"/usr/src/linux-headers-${_abi_release}
+
+ # first we import config, run prepare to set up for building
+ # external modules, and create the scripts
mkdir -p "$dir"
cp "$srcdir"/kernelconfig "$dir"/.config
make -j1 -C "$srcdir"/linux-$_kernver O="$dir" HOSTCC="$CC" \
silentoldconfig prepare scripts
+ # remove the stuff that poits to real sources. we want 3rd party
+ # modules to believe this is the soruces
rm "$dir"/Makefile "$dir"/source
- # copy the only the parts that we really need
+ # copy the needed stuff from real sources
+ #
# this is taken from ubuntu kernel build script
+ # http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-jaunty.git;a=blob;f=debian/rules.d/3-binary-indep.mk;hb=HEAD
cd "$srcdir"/linux-$_kernver
find . -path './include/*' -prune -o -path './scripts/*' -prune \
-o -type f \( -name 'Makefile*' -o -name 'Kconfig*' \