/[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.93 Revision 1.102
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.93 2008/11/05 12:00:19 dsd Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.102 2011/06/01 06:51:30 robbat2 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 143
143# eclass utilities 144# eclass utilities
144# ---------------------------------- 145# ----------------------------------
145 146
146check_vermagic() { 147check_vermagic() {
147 debug-print-function ${FUNCNAME} $* 148 debug-print-function ${FUNCNAME} $*
148 149
149 local curr_gcc_ver=$(gcc -dumpversion) 150 local curr_gcc_ver=$(gcc -dumpversion)
150 local tmpfile old_chost old_gcc_ver result=0 151 local tmpfile old_chost old_gcc_ver result=0
151 152
152 tmpfile=`find ${KV_DIR}/ -iname "*.o.cmd" -exec grep usr/lib/gcc {} \; -quit` 153 tmpfile=`find "${KV_DIR}/" -iname "*.o.cmd" -exec grep usr/lib/gcc {} \; -quit`
153 tmpfile=${tmpfile//*usr/lib} 154 tmpfile=${tmpfile//*usr/lib}
154 tmpfile=${tmpfile//\/include*} 155 tmpfile=${tmpfile//\/include*}
155 old_chost=${tmpfile//*gcc\/} 156 old_chost=${tmpfile//*gcc\/}
156 old_chost=${old_chost//\/*} 157 old_chost=${old_chost//\/*}
157 old_gcc_ver=${tmpfile//*\/} 158 old_gcc_ver=${tmpfile//*\/}
192 # if we haven't determined the version yet, we need too. 193 # if we haven't determined the version yet, we need too.
193 get_version; 194 get_version;
194 195
195 # if the kernel version is greater than 2.6.6 then we should use 196 # if the kernel version is greater than 2.6.6 then we should use
196 # M= instead of SUBDIRS= 197 # M= instead of SUBDIRS=
198 [ ${KV_MAJOR} -eq 3 ] && return 0
197 [ ${KV_MAJOR} -eq 2 -a ${KV_MINOR} -gt 5 -a ${KV_PATCH} -gt 5 ] && \ 199 [ ${KV_MAJOR} -eq 2 -a ${KV_MINOR} -gt 5 -a ${KV_PATCH} -gt 5 ] && \
198 return 0 || return 1 200 return 0 || return 1
199} 201}
200 202
201# @FUNCTION: convert_to_m 203# @FUNCTION: convert_to_m
208 if use_m 210 if use_m
209 then 211 then
210 [ ! -f "${1}" ] && \ 212 [ ! -f "${1}" ] && \
211 die "convert_to_m() requires a filename as an argument" 213 die "convert_to_m() requires a filename as an argument"
212 ebegin "Converting ${1/${WORKDIR}\//} to use M= instead of SUBDIRS=" 214 ebegin "Converting ${1/${WORKDIR}\//} to use M= instead of SUBDIRS="
213 sed -i 's:SUBDIRS=:M=:g' ${1} 215 sed -i 's:SUBDIRS=:M=:g' "${1}"
214 eend $? 216 eend $?
215 fi 217 fi
216} 218}
217 219
218# internal function 220# internal function
225 227
226 # if we haven't determined the version yet, we need too. 228 # if we haven't determined the version yet, we need too.
227 get_version; 229 get_version;
228 230
229 ebegin "Updating module dependencies for ${KV_FULL}" 231 ebegin "Updating module dependencies for ${KV_FULL}"
230 if [ -r ${KV_OUT_DIR}/System.map ] 232 if [ -r "${KV_OUT_DIR}"/System.map ]
231 then 233 then
232 depmod -ae -F ${KV_OUT_DIR}/System.map -b ${ROOT} -r ${KV_FULL} 234 depmod -ae -F "${KV_OUT_DIR}"/System.map -b "${ROOT}" -r ${KV_FULL}
233 eend $? 235 eend $?
234 else 236 else
235 ewarn 237 ewarn
236 ewarn "${KV_OUT_DIR}/System.map not found." 238 ewarn "${KV_OUT_DIR}/System.map not found."
237 ewarn "You must manually update the kernel module dependencies using depmod." 239 ewarn "You must manually update the kernel module dependencies using depmod."
247# It calls the update-modules utility. 249# It calls the update-modules utility.
248update_modules() { 250update_modules() {
249 debug-print-function ${FUNCNAME} $* 251 debug-print-function ${FUNCNAME} $*
250 252
251 if [ -x /sbin/update-modules ] && \ 253 if [ -x /sbin/update-modules ] && \
252 grep -v -e "^#" -e "^$" ${D}/etc/modules.d/* >/dev/null 2>&1; then 254 grep -v -e "^#" -e "^$" "${D}"/etc/modules.d/* >/dev/null 2>&1; then
253 ebegin "Updating modules.conf" 255 ebegin "Updating modules.conf"
254 /sbin/update-modules 256 /sbin/update-modules
255 eend $? 257 eend $?
256 elif [ -x /sbin/update-modules ] && \ 258 elif [ -x /sbin/update-modules ] && \
257 grep -v -e "^#" -e "^$" ${D}/etc/modules.d/* >/dev/null 2>&1; then 259 grep -v -e "^#" -e "^$" "${D}"/etc/modules.d/* >/dev/null 2>&1; then
258 ebegin "Updating modules.conf" 260 ebegin "Updating modules.conf"
259 /sbin/update-modules 261 /sbin/update-modules
260 eend $? 262 eend $?
261 fi 263 fi
262} 264}
267# DESCRIPTION: 269# DESCRIPTION:
268# It updates the location of the database used by the module-rebuild utility. 270# It updates the location of the database used by the module-rebuild utility.
269move_old_moduledb() { 271move_old_moduledb() {
270 debug-print-function ${FUNCNAME} $* 272 debug-print-function ${FUNCNAME} $*
271 273
272 local OLDDIR=${ROOT}/usr/share/module-rebuild/ 274 local OLDDIR="${ROOT}"/usr/share/module-rebuild/
273 local NEWDIR=${ROOT}/var/lib/module-rebuild/ 275 local NEWDIR="${ROOT}"/var/lib/module-rebuild/
274 276
275 if [[ -f ${OLDDIR}/moduledb ]]; then 277 if [[ -f "${OLDDIR}"/moduledb ]]; then
276 [[ ! -d ${NEWDIR} ]] && mkdir -p ${NEWDIR} 278 [[ ! -d "${NEWDIR}" ]] && mkdir -p "${NEWDIR}"
277 [[ ! -f ${NEWDIR}/moduledb ]] && \ 279 [[ ! -f "${NEWDIR}"/moduledb ]] && \
278 mv ${OLDDIR}/moduledb ${NEWDIR}/moduledb 280 mv "${OLDDIR}"/moduledb "${NEWDIR}"/moduledb
279 rm -f ${OLDDIR}/* 281 rm -f "${OLDDIR}"/*
280 rmdir ${OLDDIR} 282 rmdir "${OLDDIR}"
281 fi 283 fi
282} 284}
283 285
284# internal function 286# internal function
285# 287#
287# DESCRIPTION: 289# DESCRIPTION:
288# It adds the package to the /var/lib/module-rebuild/moduledb database used by the module-rebuild utility. 290# It adds the package to the /var/lib/module-rebuild/moduledb database used by the module-rebuild utility.
289update_moduledb() { 291update_moduledb() {
290 debug-print-function ${FUNCNAME} $* 292 debug-print-function ${FUNCNAME} $*
291 293
292 local MODULEDB_DIR=${ROOT}/var/lib/module-rebuild/ 294 local MODULEDB_DIR="${ROOT}"/var/lib/module-rebuild/
293 move_old_moduledb 295 move_old_moduledb
294 296
295 if [[ ! -f ${MODULEDB_DIR}/moduledb ]]; then 297 if [[ ! -f "${MODULEDB_DIR}"/moduledb ]]; then
296 [[ ! -d ${MODULEDB_DIR} ]] && mkdir -p ${MODULEDB_DIR} 298 [[ ! -d "${MODULEDB_DIR}" ]] && mkdir -p "${MODULEDB_DIR}"
297 touch ${MODULEDB_DIR}/moduledb 299 touch "${MODULEDB_DIR}"/moduledb
298 fi 300 fi
299 301
300 if ! grep -qs ${CATEGORY}/${PN}-${PVR} ${MODULEDB_DIR}/moduledb ; then 302 if ! grep -qs ${CATEGORY}/${PN}-${PVR} "${MODULEDB_DIR}"/moduledb ; then
301 einfo "Adding module to moduledb." 303 einfo "Adding module to moduledb."
302 echo "a:1:${CATEGORY}/${PN}-${PVR}" >> ${MODULEDB_DIR}/moduledb 304 echo "a:1:${CATEGORY}/${PN}-${PVR}" >> "${MODULEDB_DIR}"/moduledb
303 fi 305 fi
304} 306}
305 307
306# internal function 308# internal function
307# 309#
310# It removes the package from the /var/lib/module-rebuild/moduledb database used by 312# It removes the package from the /var/lib/module-rebuild/moduledb database used by
311# the module-rebuild utility. 313# the module-rebuild utility.
312remove_moduledb() { 314remove_moduledb() {
313 debug-print-function ${FUNCNAME} $* 315 debug-print-function ${FUNCNAME} $*
314 316
315 local MODULEDB_DIR=${ROOT}/var/lib/module-rebuild/ 317 local MODULEDB_DIR="${ROOT}"/var/lib/module-rebuild/
316 move_old_moduledb 318 move_old_moduledb
317 319
318 if grep -qs ${CATEGORY}/${PN}-${PVR} ${MODULEDB_DIR}/moduledb ; then 320 if grep -qs ${CATEGORY}/${PN}-${PVR} "${MODULEDB_DIR}"/moduledb ; then
319 einfo "Removing ${CATEGORY}/${PN}-${PVR} from moduledb." 321 einfo "Removing ${CATEGORY}/${PN}-${PVR} from moduledb."
320 sed -i -e "/.*${CATEGORY}\/${PN}-${PVR}.*/d" ${MODULEDB_DIR}/moduledb 322 sed -i -e "/.*${CATEGORY}\/${PN}-${PVR}.*/d" "${MODULEDB_DIR}"/moduledb
321 fi 323 fi
322} 324}
323 325
324# @FUNCTION: set_kvobj 326# @FUNCTION: set_kvobj
325# @DESCRIPTION: 327# @DESCRIPTION:
326# It sets the KV_OBJ variable. 328# It sets the KV_OBJ variable.
327set_kvobj() { 329set_kvobj() {
328 debug-print-function ${FUNCNAME} $* 330 debug-print-function ${FUNCNAME} $*
329 331
330 if kernel_is 2 6 332 if kernel_is ge 2 6
331 then 333 then
332 KV_OBJ="ko" 334 KV_OBJ="ko"
333 else 335 else
334 KV_OBJ="o" 336 KV_OBJ="o"
335 fi 337 fi
413 module_modinfo="$(modinfo -p ${currm_path}.${KV_OBJ})" 415 module_modinfo="$(modinfo -p ${currm_path}.${KV_OBJ})"
414 module_config="${T}/modulesd-${currm}" 416 module_config="${T}/modulesd-${currm}"
415 417
416 ebegin "Preparing file for modules.d" 418 ebegin "Preparing file for modules.d"
417 #----------------------------------------------------------------------- 419 #-----------------------------------------------------------------------
418 echo "# modules.d configuration file for ${currm}" >> ${module_config} 420 echo "# modules.d configuration file for ${currm}" >> "${module_config}"
419 #----------------------------------------------------------------------- 421 #-----------------------------------------------------------------------
420 [[ -n ${module_docs} ]] && \ 422 [[ -n ${module_docs} ]] && \
421 echo "# For more information please read:" >> ${module_config} 423 echo "# For more information please read:" >> "${module_config}"
422 for t in ${module_docs} 424 for t in ${module_docs}
423 do 425 do
424 echo "# ${t//*\/}" >> ${module_config} 426 echo "# ${t//*\/}" >> "${module_config}"
425 done 427 done
426 echo >> ${module_config} 428 echo >> "${module_config}"
427 429
428 #----------------------------------------------------------------------- 430 #-----------------------------------------------------------------------
429 if [[ ${module_aliases} -gt 0 ]] 431 if [[ ${module_aliases} -gt 0 ]]
430 then 432 then
431 echo "# Internal Aliases - Do not edit" >> ${module_config} 433 echo "# Internal Aliases - Do not edit" >> "${module_config}"
432 echo "# ------------------------------" >> ${module_config} 434 echo "# ------------------------------" >> "${module_config}"
433 435
434 for((t=0; t<${module_aliases}; t++)) 436 for((t=0; t<${module_aliases}; t++))
435 do 437 do
436 echo "alias $(eval echo \${MODULESD_${currm}_ALIASES[$t]})" \ 438 echo "alias $(eval echo \${MODULESD_${currm}_ALIASES[$t]})" \
437 >> ${module_config} 439 >> "${module_config}"
438 done 440 done
439 echo '' >> ${module_config} 441 echo '' >> "${module_config}"
440 fi 442 fi
441 443
442 #----------------------------------------------------------------------- 444 #-----------------------------------------------------------------------
443 if [[ -n ${module_modinfo} ]] 445 if [[ -n ${module_modinfo} ]]
444 then 446 then
445 echo >> ${module_config} 447 echo >> "${module_config}"
446 echo "# Configurable module parameters" >> ${module_config} 448 echo "# Configurable module parameters" >> "${module_config}"
447 echo "# ------------------------------" >> ${module_config} 449 echo "# ------------------------------" >> "${module_config}"
448 myIFS="${IFS}" 450 myIFS="${IFS}"
449 IFS="$(echo -en "\n\b")" 451 IFS="$(echo -en "\n\b")"
450 452
451 for t in ${module_modinfo} 453 for t in ${module_modinfo}
452 do 454 do
453 myVAR="$(echo ${t#*:} | grep -e " [0-9][ =]" | sed "s:.*\([01][= ]\).*:\1:")" 455 myVAR="$(echo ${t#*:} | grep -e " [0-9][ =]" | sed "s:.*\([01][= ]\).*:\1:")"
454 if [[ -n ${myVAR} ]] 456 if [[ -n ${myVAR} ]]
455 then 457 then
456 module_opts="${module_opts} ${t%%:*}:${myVAR}" 458 module_opts="${module_opts} ${t%%:*}:${myVAR}"
457 fi 459 fi
458 echo -e "# ${t%%:*}:\t${t#*:}" >> ${module_config} 460 echo -e "# ${t%%:*}:\t${t#*:}" >> "${module_config}"
459 done 461 done
460 IFS="${myIFS}" 462 IFS="${myIFS}"
461 echo '' >> ${module_config} 463 echo '' >> "${module_config}"
462 fi 464 fi
463 465
464 #----------------------------------------------------------------------- 466 #-----------------------------------------------------------------------
465 if [[ $(eval echo \${MODULESD_${currm}_ALIASES[0]}) == guess ]] 467 if [[ $(eval echo \${MODULESD_${currm}_ALIASES[0]}) == guess ]]
466 then 468 then
467 # So lets do some guesswork eh? 469 # So lets do some guesswork eh?
468 if [[ -n ${module_opts} ]] 470 if [[ -n ${module_opts} ]]
469 then 471 then
470 echo "# For Example..." >> ${module_config} 472 echo "# For Example..." >> "${module_config}"
471 echo "# --------------" >> ${module_config} 473 echo "# --------------" >> "${module_config}"
472 for t in ${module_opts} 474 for t in ${module_opts}
473 do 475 do
474 echo "# options ${currm} ${t//:*}=${t//*:}" >> ${module_config} 476 echo "# options ${currm} ${t//:*}=${t//*:}" >> "${module_config}"
475 done 477 done
476 echo '' >> ${module_config} 478 echo '' >> "${module_config}"
477 fi 479 fi
478 elif [[ ${module_examples} -gt 0 ]] 480 elif [[ ${module_examples} -gt 0 ]]
479 then 481 then
480 echo "# For Example..." >> ${module_config} 482 echo "# For Example..." >> "${module_config}"
481 echo "# --------------" >> ${module_config} 483 echo "# --------------" >> "${module_config}"
482 for((t=0; t<${module_examples}; t++)) 484 for((t=0; t<${module_examples}; t++))
483 do 485 do
484 echo "options $(eval echo \${MODULESD_${currm}_EXAMPLES[$t]})" \ 486 echo "options $(eval echo \${MODULESD_${currm}_EXAMPLES[$t]})" \
485 >> ${module_config} 487 >> "${module_config}"
486 done 488 done
487 echo '' >> ${module_config} 489 echo '' >> "${module_config}"
488 fi 490 fi
489 491
490 #----------------------------------------------------------------------- 492 #-----------------------------------------------------------------------
491 if [[ ${module_additions} -gt 0 ]] 493 if [[ ${module_additions} -gt 0 ]]
492 then 494 then
493 for((t=0; t<${module_additions}; t++)) 495 for((t=0; t<${module_additions}; t++))
494 do 496 do
495 echo "$(eval echo \${MODULESD_${currm}_ADDITIONS[$t]})" \ 497 echo "$(eval echo \${MODULESD_${currm}_ADDITIONS[$t]})" \
496 >> ${module_config} 498 >> "${module_config}"
497 done 499 done
498 echo '' >> ${module_config} 500 echo '' >> "${module_config}"
499 fi 501 fi
500 502
501 #----------------------------------------------------------------------- 503 #-----------------------------------------------------------------------
502 504
503 # then we install it 505 # then we install it
504 if kernel_is ge 2 6; then 506 if kernel_is ge 2 6; then
505 insinto /etc/modprobe.d 507 insinto /etc/modprobe.d
506 else 508 else
507 insinto /etc/modules.d 509 insinto /etc/modules.d
508 fi 510 fi
509 newins ${module_config} ${currm_path//*\/} 511 newins "${module_config}" "${currm_path//*\/}.conf"
510 512
511 # and install any documentation we might have. 513 # and install any documentation we might have.
512 [[ -n ${module_docs} ]] && dodoc ${module_docs} 514 [[ -n ${module_docs} ]] && dodoc ${module_docs}
513 done 515 done
514 eend 0 516 eend 0
573# configured, verifies that the sources are prepared, verifies that the modules support is builtin 575# configured, verifies that the sources are prepared, verifies that the modules support is builtin
574# in the kernel and sets the object extension KV_OBJ. 576# in the kernel and sets the object extension KV_OBJ.
575linux-mod_pkg_setup() { 577linux-mod_pkg_setup() {
576 debug-print-function ${FUNCNAME} $* 578 debug-print-function ${FUNCNAME} $*
577 579
580 local is_bin="${MERGE_TYPE}"
581
582 # If we are installing a binpkg, take a different path.
583 # use MERGE_TYPE if available (eapi>=4); else use non-PMS EMERGE_FROM (eapi<4)
584 if has ${EAPI} 0 1 2 3; then
585 is_bin=${EMERGE_FROM}
586 fi
587
588 if [[ ${is_bin} == binary ]]; then
589 linux-mod_pkg_setup_binary
590 return
591 fi
592
578 linux-info_pkg_setup; 593 linux-info_pkg_setup;
579 require_configured_kernel 594 require_configured_kernel
580 check_kernel_built; 595 check_kernel_built;
581 strip_modulenames; 596 strip_modulenames;
582 [[ -n ${MODULE_NAMES} ]] && check_modules_supported 597 [[ -n ${MODULE_NAMES} ]] && check_modules_supported
583 set_kvobj; 598 set_kvobj;
584 # Commented out with permission from johnm until a fixed version for arches 599 # Commented out with permission from johnm until a fixed version for arches
585 # who intentionally use different kernel and userland compilers can be 600 # who intentionally use different kernel and userland compilers can be
586 # introduced - Jason Wever <weeve@gentoo.org>, 23 Oct 2005 601 # introduced - Jason Wever <weeve@gentoo.org>, 23 Oct 2005
587 #check_vermagic; 602 #check_vermagic;
603}
604
605# @FUNCTION: linux-mod_pkg_setup_binary
606# @DESCRIPTION:
607# Perform all kernel option checks non-fatally, as the .config and
608# /proc/config.gz might not be present. Do not do anything that requires kernel
609# sources.
610linux-mod_pkg_setup_binary() {
611 debug-print-function ${FUNCNAME} $*
612 local new_CONFIG_CHECK
613 # ~ needs always to be quoted, else bash expands it.
614 for config in $CONFIG_CHECK ; do
615 optional='~'
616 [[ ${config:0:1} == "~" ]] && optional=''
617 new_CONFIG_CHECK="${new_CONFIG_CHECK} ${optional}${config}"
618 done
619 export CONFIG_CHECK="${new_CONFIG_CHECK}"
620 linux-info_pkg_setup;
588} 621}
589 622
590strip_modulenames() { 623strip_modulenames() {
591 debug-print-function ${FUNCNAME} $* 624 debug-print-function ${FUNCNAME} $*
592 625
626 srcdir=${srcdir:-${S}} 659 srcdir=${srcdir:-${S}}
627 objdir=${objdir:-${srcdir}} 660 objdir=${objdir:-${srcdir}}
628 661
629 if [ ! -f "${srcdir}/.built" ]; 662 if [ ! -f "${srcdir}/.built" ];
630 then 663 then
631 cd ${srcdir} 664 cd "${srcdir}"
632 ln -s "${S}"/Module.symvers Module.symvers 665 ln -s "${S}"/Module.symvers Module.symvers
633 einfo "Preparing ${modulename} module" 666 einfo "Preparing ${modulename} module"
634 if [[ -n ${ECONF_PARAMS} ]] 667 if [[ -n ${ECONF_PARAMS} ]]
635 then 668 then
636 econf ${ECONF_PARAMS} || \ 669 econf ${ECONF_PARAMS} || \
647 LDFLAGS=\"$(get_abi_LDFLAGS)\" \ 680 LDFLAGS=\"$(get_abi_LDFLAGS)\" \
648 ${BUILD_FIXES} \ 681 ${BUILD_FIXES} \
649 ${BUILD_PARAMS} \ 682 ${BUILD_PARAMS} \
650 ${BUILD_TARGETS} " \ 683 ${BUILD_TARGETS} " \
651 || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}" 684 || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}"
652 cd ${OLDPWD} 685 cd "${OLDPWD}"
653 touch ${srcdir}/.built 686 touch "${srcdir}"/.built
654 fi 687 fi
655 done 688 done
656 689
657 set_arch_to_portage 690 set_arch_to_portage
658 ABI="${myABI}" 691 ABI="${myABI}"
685 libdir=${libdir:-misc} 718 libdir=${libdir:-misc}
686 srcdir=${srcdir:-${S}} 719 srcdir=${srcdir:-${S}}
687 objdir=${objdir:-${srcdir}} 720 objdir=${objdir:-${srcdir}}
688 721
689 einfo "Installing ${modulename} module" 722 einfo "Installing ${modulename} module"
690 cd ${objdir} || die "${objdir} does not exist" 723 cd "${objdir}" || die "${objdir} does not exist"
691 insinto /lib/modules/${KV_FULL}/${libdir} 724 insinto /lib/modules/${KV_FULL}/${libdir}
692 doins ${modulename}.${KV_OBJ} || die "doins ${modulename}.${KV_OBJ} failed" 725 doins ${modulename}.${KV_OBJ} || die "doins ${modulename}.${KV_OBJ} failed"
693 cd ${OLDPWD} 726 cd "${OLDPWD}"
694 727
695 generate_modulesd ${objdir}/${modulename} 728 generate_modulesd "${objdir}/${modulename}"
696 done 729 done
697} 730}
698 731
699# @FUNCTION: linux-mod_pkg_preinst 732# @FUNCTION: linux-mod_pkg_preinst
700# @DESCRIPTION: 733# @DESCRIPTION:

Legend:
Removed from v.1.93  
changed lines
  Added in v.1.102

  ViewVC Help
Powered by ViewVC 1.1.20