#OKV=original kernel version, KV=patched kernel version. They can be the same. #we use this next variable to avoid duplicating stuff on cvs GFILESDIR=${PORTDIR}/sys-kernel/linux-sources/files OKV=${PV} KV=${PVR} CTX_PATCH="patch-2.4.20ctx-16" S=${WORKDIR}/linux-${KV} # What's in this kernel? # INCLUDED: # Security context aware kernel patch from the VServer project # http://www.solucorp.qc.ca/miscprj/s_context.hc DESCRIPTION="Security context aware kernel from the VServer project" SRC_URI="ftp://ftp.solucorp.qc.ca/pub/vserver/${CTX_PATCH}.gz http://www.kernel.org/pub/linux/kernel/v2.4/linux-${OKV}.tar.bz2" HOMEPAGE="http://www.kernel.org/ http://www.solucorp.qc.ca/miscprj/s_context.hc" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86 -ppc -sparc -alpha" src_unpack() { cd ${WORKDIR} unpack linux-${OKV}.tar.bz2 mv linux-${OKV} linux-${KV} || die cd ${S} gunzip --stdout ${DISTDIR}/${CTX_PATCH}.gz | patch -d ${S} -p1 echo "Preparing for compilation..." #fix silly permissions in tarball cd ${WORKDIR} chown -R 0.0 * chmod -R a+r-w+X,u+w * } src_compile() { echo "Nothing to compile. That's up to the user" } src_install() { dodir /usr/src/ctx cd ${S} echo ">>> Copying sources..." mv ${WORKDIR}/* ${D}/usr/src/ctx cd ${D}/usr/src/ctx ln -sf linux-${KV} linux }