/[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.64 Revision 1.65
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/linux-mod.eclass,v 1.64 2006/05/11 08:23:43 johnm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.65 2006/05/22 09:27:50 genstef Exp $
4 4
5# Description: This eclass is used to interface with linux-info in such a way 5# Description: This eclass is used to interface with linux-info in such a way
6# to provide the functionality required and initial functions 6# to provide the functionality required and initial functions
7# required to install external modules against a kernel source 7# required to install external modules against a kernel source
8# tree. 8# tree.
82# set_arch_to_kernel and set_arch_to_portage functions and the ones in eutils 82# set_arch_to_kernel and set_arch_to_portage functions and the ones in eutils
83# are deprecated in favor of the ones in linux-info. 83# are deprecated in favor of the ones in linux-info.
84# See http://bugs.gentoo.org/show_bug.cgi?id=127506 84# See http://bugs.gentoo.org/show_bug.cgi?id=127506
85 85
86inherit eutils linux-info multilib 86inherit eutils linux-info multilib
87EXPORT_FUNCTIONS pkg_setup pkg_postinst src_install src_compile pkg_postrm 87EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst src_install src_compile pkg_postrm
88 88
89IUSE="" # don't put pcmcia here, rather in the ebuilds that actually support pcmcia 89IUSE="" # don't put pcmcia here, rather in the ebuilds that actually support pcmcia
90SLOT="0" 90SLOT="0"
91DESCRIPTION="Based on the $ECLASS eclass" 91DESCRIPTION="Based on the $ECLASS eclass"
92RDEPEND="virtual/modutils 92RDEPEND="kernel_linux? ( virtual/modutils
93 pcmcia? ( virtual/pcmcia )" 93 pcmcia? ( virtual/pcmcia ) )"
94DEPEND="sys-apps/sed 94DEPEND="${RDEPEND}
95 pcmcia? ( virtual/pcmcia )" 95 sys-apps/sed"
96 96
97# eclass utilities 97# eclass utilities
98# ---------------------------------- 98# ----------------------------------
99 99
100check_vermagic() { 100check_vermagic() {
546 546
547 generate_modulesd ${objdir}/${modulename} 547 generate_modulesd ${objdir}/${modulename}
548 done 548 done
549} 549}
550 550
551linux-mod_pkg_preinst() {
552 [ -d ${IMAGE}/lib/modules ] && UPDATE_DEPMOD=true || UPDATE_DEPMOD=false
553 [ -d ${IMAGE}/etc/modules.d ] && UPDATE_MODULES=true || UPDATE_MODULES=false
554 [ -d ${IMAGE}/lib/modules ] && UPDATE_MODULEDB=true || UPDATE_MODULEDB=false
555}
556
551linux-mod_pkg_postinst() { 557linux-mod_pkg_postinst() {
552 update_depmod; 558 ${UPDATE_DEPMOD} && update_depmod;
553 update_modules; 559 ${UPDATE_MODULES} && update_modules;
554 update_moduledb; 560 ${UPDATE_MODULEDB} && update_moduledb;
555} 561}
556 562
557linux-mod_pkg_postrm() { 563linux-mod_pkg_postrm() {
558 remove_moduledb; 564 remove_moduledb;
559} 565}

Legend:
Removed from v.1.64  
changed lines
  Added in v.1.65

  ViewVC Help
Powered by ViewVC 1.1.20