/[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.36 Revision 1.37
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.36 2004/07/04 23:48:19 tseng Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.37 2004/07/05 00:00:13 spock Exp $
4 4
5# 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
6# with back-compatibility for 2.4 6# with back-compatibility for 2.4
7# 7#
8# Author: John Mylchreest <johnm@gentoo.org> 8# Author: John Mylchreest <johnm@gentoo.org>
40# we set KV and re-set it later on as well. 40# we set KV and re-set it later on as well.
41[ -z "${KV}" ] && KV=${PV} 41[ -z "${KV}" ] && KV=${PV}
42 42
43HOMEPAGE="http://www.kernel.org/ http://www.gentoo.org/" 43HOMEPAGE="http://www.kernel.org/ http://www.gentoo.org/"
44LICENSE="GPL-2" 44LICENSE="GPL-2"
45IUSE="${IUSE} build" 45IUSE="${IUSE} build doc"
46SLOT="${KV}" 46SLOT="${KV}"
47 47
48# Grab kernel version from KV 48# Grab kernel version from KV
49KV_MAJOR=$(echo ${KV} | cut -d. -f1) 49KV_MAJOR=$(echo ${KV} | cut -d. -f1)
50KV_MINOR=$(echo ${KV} | cut -d. -f2) 50KV_MINOR=$(echo ${KV} | cut -d. -f2)
164 yes "" | make oldconfig 164 yes "" | make oldconfig
165 echo ">>> make oldconfig complete" 165 echo ">>> make oldconfig complete"
166 ARCH=${MY_ARCH} 166 ARCH=${MY_ARCH}
167} 167}
168 168
169compile_manpages() {
170 local MY_ARCH
171
172 einfo "Making manpages..."
173 MY_ARCH=${ARCH}
174 unset ARCH
175 make mandocs
176 ARCH=${MY_ARCH}
177}
178
169# install functions 179# install functions
170#============================================================== 180#==============================================================
171install_universal() { 181install_universal() {
172 #fix silly permissions in tarball 182 #fix silly permissions in tarball
173 cd ${WORKDIR} 183 cd ${WORKDIR}
228 238
229 if [ -f ${S}/patches.txt ]; then 239 if [ -f ${S}/patches.txt ]; then
230 docs="${docs} ${S}/patches.txt" 240 docs="${docs} ${S}/patches.txt"
231 fi 241 fi
232 242
243 if use doc; then
244 install_manpages
245 fi
246
233 dodoc ${docs} 247 dodoc ${docs}
234 mv ${WORKDIR}/linux* ${D}/usr/src 248 mv ${WORKDIR}/linux* ${D}/usr/src
249}
250
251install_manpages() {
252 local MY_ARCH
253
254 ebegin "Installing mapages"
255 MY_ARCH=${ARCH}
256 unset ARCH
257 sed -i -e "s#/usr/local/man#${D}/usr/man#g" scripts/makeman
258 make installmandocs
259 eend $?
260 sed -i -e "s#${D}/usr/man#/usr/local/man#g" scripts/makeman
261 ARCH=${MY_ARCH}
235} 262}
236 263
237# pkg_preinst functions 264# pkg_preinst functions
238#============================================================== 265#==============================================================
239preinst_headers() { 266preinst_headers() {
612 [ $(kernel_is_2_4) $? == 0 ] && unpack_2_4 639 [ $(kernel_is_2_4) $? == 0 ] && unpack_2_4
613} 640}
614 641
615kernel-2_src_compile() { 642kernel-2_src_compile() {
616 [ "${ETYPE}" == "headers" ] && compile_headers 643 [ "${ETYPE}" == "headers" ] && compile_headers
644 [ "${ETYPE}" == "sources" ] && use doc && compile_manpages
617} 645}
618 646
619kernel-2_pkg_preinst() { 647kernel-2_pkg_preinst() {
620 [ "${ETYPE}" == "headers" ] && preinst_headers 648 [ "${ETYPE}" == "headers" ] && preinst_headers
621} 649}

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

  ViewVC Help
Powered by ViewVC 1.1.20