libdmx: Add fso-specs to DEPENDS
[openembedded.git] / recipes / nvidia-drivers / nvidia-drivers.inc
blobef65ae4c91b61e885db76ebe02fe0154f23b6288
1 # nvidia-display .bb build file
2 # Copyright (C) 2005-2006, Advanced Micro Devices, Inc.  All Rights Reserved
3 # Released under the MIT license (see /COPYING)
5 HOMEPAGE="http://www.nvidia.com/object/unix.html"
6 DESCRIPTION="NVidia Graphics Driver Binary"
7 LICENSE = "NVIDIA"
9 inherit module
10 PACKAGE_STRIP = "no"
12 def nvidia_pkgrun(d):
13         import bb, re
14         arch = bb.data.getVar('TARGET_ARCH', d, 1)
15         pkgrun = "pkg2"
16         if re.match("^i.86$", arch):
17                 pkgrun = "pkg1"
18         return pkgrun
19         
20 def nvidia_arch(d):
21         import bb, re
22         arch = bb.data.getVar('TARGET_ARCH', d, 1)
23         if re.match("^i.86$", arch):
24                 arch = "x86"
25         return arch
27 def get_kernelpatchlevel(p):
28         import re
29         r = re.compile("[0-9]+\.([0-9]+).*")
30         m = r.match(p);
31         if m:
32                 return m.group(1)
33         return None
34                                                                         
35 NVIDIA_ARCH := "${@nvidia_arch(d)}"
36 NVIDIA_PKGRUN := "${@nvidia_pkgrun(d)}"
38 COMPATIBLE_HOST = '.*86.*-linux'
40 KERNEL_PATCHLEVEL = "${@get_kernelpatchlevel('${KERNEL_VERSION}')}"
41 EXTRA_OEMAKE=" KERNEL_SOURCES=${STAGING_KERNEL_DIR} KERNEL_MODLIB=${STAGING_KERNEL_DIR} KERNEL_UNAME=${KERNEL_VERSION} PATCHLEVEL=${KERNEL_PATCHLEVEL} MODULE_ROOT=${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers IGNORE_CC_MISMATCH=1"
43 PKG_BASENAME="NVIDIA-Linux-${NVIDIA_ARCH}-${PV}-${NVIDIA_PKGRUN}"
45 FILES_${PN}-doc += " /usr/share/doc/*"
47 nvidia_do_unpack() {
48         sh ${PKG_BASENAME}.run -x
51 python do_unpack() {
52         bb.build.exec_func('base_do_unpack', d)
53         bb.build.exec_func('nvidia_do_unpack', d)