/[gentoo-x86]/eclass/kernel-2.eclass
Gentoo

Diff of /eclass/kernel-2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.12 Revision 1.14
1# Copyright 1999-2004 Gentoo Technologies, Inc.
2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.14 2004/01/23 18:14:06 johnm Exp $
4
1# kernel.eclass rewrite for a clean base regarding the 2.6 series of kernel 5# kernel.eclass rewrite for a clean base regarding the 2.6 series of kernel
2# with back-compatibility for 2.4 6# with back-compatibility for 2.4
3# 7#
4# Author: John Mylchreest <johnm@gentoo.org> 8# Author: John Mylchreest <johnm@gentoo.org>
5# Copyright 2004 Gentoo Linux 9# Copyright 2004 Gentoo Linux
13# A Couple of env vars are available to effect usage of this eclass 17# A Couple of env vars are available to effect usage of this eclass
14# These are as follows: 18# These are as follows:
15# 19#
16# K_NOSETEXTRAVERSION - if this is set then EXTRAVERSION will not be automatically set within the kernel Makefile 20# K_NOSETEXTRAVERSION - if this is set then EXTRAVERSION will not be automatically set within the kernel Makefile
17# K_NOUSENAME - if this is set then EXTRAVERSION will not include the first part of ${PN} in EXTRAVERSION 21# K_NOUSENAME - if this is set then EXTRAVERSION will not include the first part of ${PN} in EXTRAVERSION
18# K_PREPATCHED - if the patchset is prepatched (ie: mm-sources, ck-sources, ac-sources) it will use PR (ie: -r5) as the patchset version for EXTRAVERSION 22# K_PREPATCHED - if the patchset is prepatched (ie: mm-sources, ck-sources, ac-sources) it will use PR (ie: -r5) as the patchset version for
19# - and not use it as a true package revision 23# - and not use it as a true package revision
20# K_EXTRAEINFO - this is a new-line seperated list of einfo displays in postinst and can be used to carry additional postinst messages 24# K_EXTRAEINFO - this is a new-line seperated list of einfo displays in postinst and can be used to carry additional postinst messages
21# K_EXTRAEWARN - same as K_EXTRAEINFO except ewarn's instead of einfo's 25# K_EXTRAEWARN - same as K_EXTRAEINFO except ewarn's instead of einfo's
22 26
23# H_SUPPORTEDARCH - this should be a space separated list of ARCH's which can be supported by the headers ebuild 27# H_SUPPORTEDARCH - this should be a space separated list of ARCH's which can be supported by the headers ebuild
24 28
25# UNIPATCH_LIST - space delimetered list of patches to be applied to the kernel 29# UNIPATCH_LIST - space delimetered list of patches to be applied to the kernel
26# UNIPATCH_DOCS - space delimemeted list of docs to be installed to the doc dir 30# UNIPATCH_DOCS - space delimemeted list of docs to be installed to the doc dir
27 31
28ECLASS="kernel-2" 32ECLASS="kernel-2"
29EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_preinst pkg_postinst 33EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_preinst pkg_postinst
30 34
31HOMEPAGE="http://www.kernel.org/ http://www.gentoo.org/" 35HOMEPAGE="http://www.kernel.org/ http://www.gentoo.org/"
32LICENSE="GPL-2" 36LICENSE="GPL-2"
33IUSE="${IUSE} build" 37IUSE="${IUSE} build"
34SLOT="${KV}" 38SLOT="${KV}"
133} 137}
134 138
135install_headers() { 139install_headers() {
136 [ $(kernel_is_2_4) $? == 0 ] && unpack_2_4 140 [ $(kernel_is_2_4) $? == 0 ] && unpack_2_4
137 [ $(kernel_is_2_6) $? == 0 ] && ln -sf ${S}/include/asm-${ARCH} ${S}/include/asm 141 [ $(kernel_is_2_6) $? == 0 ] && ln -sf ${S}/include/asm-${ARCH} ${S}/include/asm
138 142
143
139 cd ${S} 144 cd ${S}
140 dodir /usr/include/linux 145 dodir /usr/include/linux
141 cp -ax ${S}/include/linux/* ${D}/usr/include/linux 146 cp -ax ${S}/include/linux/* ${D}/usr/include/linux
142 rm -rf ${D}/usr/include/linux/modules 147 rm -rf ${D}/usr/include/linux/modules
148
143 dodir /usr/include/asm 149 dodir /usr/include/asm
144 cp -ax ${S}/include/asm/* ${D}/usr/include/asm 150 cp -ax ${S}/include/asm/* ${D}/usr/include/asm
145 151
146 if [ $(kernel_is_2_6) $? == 0 ] 152 if [ $(kernel_is_2_6) $? == 0 ]
147 then 153 then
509 [ "${ETYPE}" == "sources" ] && postinst_sources 515 [ "${ETYPE}" == "sources" ] && postinst_sources
510} 516}
511 517
512pkg_setup() { 518pkg_setup() {
513 [ "${ETYPE}" == "headers" ] && setup_headers 519 [ "${ETYPE}" == "headers" ] && setup_headers
520
521 # this is to fix some weird portage bug? in stable versions of portage.
522 [ "${ETYPE}" == "sources" ] && echo ">>> Preparing to "
514} 523}

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.20