/[gentoo-x86]/eclass/linux-mod.eclass
Gentoo

Diff of /eclass/linux-mod.eclass

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

Revision 1.98 Revision 1.100
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2011 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/linux-mod.eclass,v 1.98 2010/01/17 04:00:07 robbat2 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.100 2011/04/24 18:55:20 ulm Exp $
4 4
5# Author(s): John Mylchreest <johnm@gentoo.org>, 5# Author(s): John Mylchreest <johnm@gentoo.org>,
6# Stefan Schweizer <genstef@gentoo.org> 6# Stefan Schweizer <genstef@gentoo.org>
7# Maintainer: kernel-misc@gentoo.org 7# Maintainer: kernel-misc@gentoo.org
8# 8#
55# srcdir = place for ebuild to cd to before running make (by default it's ${S}) 55# srcdir = place for ebuild to cd to before running make (by default it's ${S})
56# objdir = place the .ko and objects are located after make runs (by default it's set to srcdir) 56# objdir = place the .ko and objects are located after make runs (by default it's set to srcdir)
57# 57#
58# To get an idea of how these variables are used, here's a few lines 58# To get an idea of how these variables are used, here's a few lines
59# of code from around line 540 in this eclass: 59# of code from around line 540 in this eclass:
60# 60#
61# einfo "Installing ${modulename} module" 61# einfo "Installing ${modulename} module"
62# cd ${objdir} || die "${objdir} does not exist" 62# cd ${objdir} || die "${objdir} does not exist"
63# insinto /lib/modules/${KV_FULL}/${libdir} 63# insinto /lib/modules/${KV_FULL}/${libdir}
64# doins ${modulename}.${KV_OBJ} || die "doins ${modulename}.${KV_OBJ} failed" 64# doins ${modulename}.${KV_OBJ} || die "doins ${modulename}.${KV_OBJ} failed"
65# 65#
134EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst src_install src_compile pkg_postrm 134EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst src_install src_compile pkg_postrm
135 135
136IUSE="kernel_linux" 136IUSE="kernel_linux"
137SLOT="0" 137SLOT="0"
138DESCRIPTION="Based on the $ECLASS eclass" 138DESCRIPTION="Based on the $ECLASS eclass"
139RDEPEND="kernel_linux? ( virtual/modutils )" 139RDEPEND="kernel_linux? ( sys-apps/module-init-tools )"
140DEPEND="${RDEPEND} 140DEPEND="${RDEPEND}
141 sys-apps/sed 141 sys-apps/sed
142 kernel_linux? ( virtual/linux-sources )" 142 kernel_linux? ( virtual/linux-sources )"
143 143
144# eclass utilities 144# eclass utilities
600# /proc/config.gz might not be present. Do not do anything that requires kernel 600# /proc/config.gz might not be present. Do not do anything that requires kernel
601# sources. 601# sources.
602linux-mod_pkg_setup_binary() { 602linux-mod_pkg_setup_binary() {
603 debug-print-function ${FUNCNAME} $* 603 debug-print-function ${FUNCNAME} $*
604 local new_CONFIG_CHECK 604 local new_CONFIG_CHECK
605 # ~ needs always to be quoted, else bash expands it.
605 for config in $CONFIG_CHECK ; do 606 for config in $CONFIG_CHECK ; do
606 case ${config:0:1} in 607 optional='~'
607 ~) optional="" ;; 608 [[ ${config:0:1} == "~" ]] && optional=''
608 *) optional="~" ;;
609 esac
610 new_CONFIG_CHECK="${new_CONFIG_CHECK} ${optional}${config}" 609 new_CONFIG_CHECK="${new_CONFIG_CHECK} ${optional}${config}"
611 done 610 done
612 export CONFIG_CHECK="${new_CONFIG_CHECK}" 611 export CONFIG_CHECK="${new_CONFIG_CHECK}"
613 linux-info_pkg_setup; 612 linux-info_pkg_setup;
614} 613}

Legend:
Removed from v.1.98  
changed lines
  Added in v.1.100

  ViewVC Help
Powered by ViewVC 1.1.20