diff options
Diffstat (limited to 'sys-kernel/rs-sources/rs-sources-2.6.26.2.ebuild')
-rw-r--r-- | sys-kernel/rs-sources/rs-sources-2.6.26.2.ebuild | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/sys-kernel/rs-sources/rs-sources-2.6.26.2.ebuild b/sys-kernel/rs-sources/rs-sources-2.6.26.2.ebuild new file mode 100644 index 0000000..8f344f9 --- /dev/null +++ b/sys-kernel/rs-sources/rs-sources-2.6.26.2.ebuild @@ -0,0 +1,112 @@ +# Copyright 2005-2006 Radoslaw Stachowiak <radek@alter.pl> +# Distributed under the terms of the GNU General Public License v2 +# $Header: Exp $ + +# needed for .x patches? /probably :)/ +K_SECURITY_UNSUPPORTED="1" + +ETYPE="sources" +inherit eutils kernel-2 +detect_version +detect_arch + +IUSE="rspentium2 rskerni" + +# hack to change versions +MY_PR=${PR/r0/r} +MY_PR=${MY_PR/r/} + +# MODIFYHERE: extraversion is used in kernel Makefile (results in uname -r) +# set to empty on full releases and .digit (e.g. ".6") on sub releases +KV_EXTRA=".2" +# /modifyhere + +EXTRAVERSION=${KV_EXTRA}-rs${MY_PR} + +# okv is simply orginal kernel version +OKV=$KV_MAJOR.$KV_MINOR.$KV_PATCH +# kv_full is used as dir name +KV_FULL=${OKV}${EXTRAVERSION} + +S=${WORKDIR}/linux-${KV_FULL} + +# MODIFYHERE: version of gentoo patchset +GPV="26-1" +# /modifyhere +GPV_URL="http://dev.gentoo.org/~dsd/gentoo-sources/tarballs/" +GPV_SRC="${GPV_URL}/genpatches-${KV_MAJOR}.${KV_MINOR}.${GPV}.base.tar.bz2 + ${GPV_URL}/genpatches-${KV_MAJOR}.${KV_MINOR}.${GPV}.extras.tar.bz2" + +# MODIFYHERE: Version of my patchset +RSV="23-1" +# /modifyhere +RSV_URL="http://dev.gentoo.org/~radek/kernel" +RSV_SRC="${RSV_URL}/rspatches-${KV_MAJOR}.${KV_MINOR}.${RSV}.tar.bz2" + +# MODIFYHERE: set correct arch +KEYWORDS="~x86" +# /modifyhere + +UNIPATCH_LIST="${DISTDIR}/genpatches-${KV_MAJOR}.${KV_MINOR}.${GPV}.base.tar.bz2 + ${DISTDIR}/genpatches-${KV_MAJOR}.${KV_MINOR}.${GPV}.extras.tar.bz2" +# DISBLED ${DISTDIR}/rspatches-${KV_MAJOR}.${KV_MINOR}.${RSV}.tar.bz2" + +UNIPATCH_DOCS="${WORKDIR}/patches/${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}/0000_README" + +DESCRIPTION="RS kernel sources including the gentoo patchset v$GPV" +SRC_URI="${KERNEL_URI} ${GPV_SRC} ${RSV_SRC} ${ARCH_URI}" + +src_compile() { + + cp ${FILESDIR}/${PN}-${OKV}_config ${S}/.config || die "can initialize .config" + + if use rspentium2 + then + epatch ${FILESDIR}/${PN}-2.6.12_config_pentium2.patch + fi + + # prepare oldconfig + K_DEFCONFIG=oldconfig + compile_headers + + # need to save it to survive upgrade (merge -> unmerge) + cp ${S}/.config ${S}/.config.rs +} + +pkg_postinst() { + postinst_sources + + # rskerni useflags means build kernel and install + if use rskerni + then + einfo + einfo "building kernel $KV_FULL (please wait..)" + einfo + cd /usr/src/linux-$KV_FULL || return + + # this cp is needed because at replace (merge/unmerge) its being deleted + cp .config.rs .config + + # this is stupid patch for gentoo-sources mistake + # sed -i -e "s:KERN_ERROR:KERN_ERR:" drivers/pcmcia/yenta_socket.c + + unset ARCH + make || return + make modules_install || return + cp System.map /boot/System.map-${KV_FULL} + cp arch/i386/boot/bzImage /boot/vmlinuz-${KV_FULL} + cp .config /boot/config-${KV_FULL} + fi + ewarn + ewarn "Reiser 4 is disabled (not present et all) starting from rs-sources-2.6.23 (radek@20071111)" + ewarn + einfo + einfo "Kernel installed, to update modules:" + einfo 'Please do: emerge -av $(equery b /lib/modules | sed -e "s:^:>=:")' + einfo +} + +pkg_config() { + einfo "Not used currently." +} + |