summaryrefslogtreecommitdiff
path: root/packages/wlan-ng/wlan-ng-modules.inc
blob: 8be211d4c911e1befedd062a0670d83a5e75c6f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
DESCRIPTION = "linux-wlan-ng (prism2.x, prism3, pcmcia, pci, usb) driver for 11Mbps wireless lan cards"
HOMEPAGE = "http://www.linux-wlan.org"
SECTION = "kernel/modules"
DEPENDS = "virtual/kernel"
RRECOMMENDS = "wlan-ng-utils"
LICENSE = "GPL"

SRC_URI = "file://no-compat.patch;patch=1 \
	file://msleep-vs-mdelay.patch;patch=1 \
	file://might-sleep.patch;patch=1 \
	file://only-the-modules.patch;patch=1 \
#	file://module_param_array.patch;patch=1 \
	file://scripts-makefile-hostcc.patch;patch=1 \
	file://pcmciasrc.patch;patch=1 \
	file://usb-owner.patch;patch=1 \
	file://pcmcia-driver.patch;patch=1 \
	file://config.in"

inherit module

PARALLEL_MAKE = ""
EXTRA_OEMAKE = "CC="${KERNEL_CC}" LD=${KERNEL_LD} PARALLEL_MAKE=''"

do_configure() {
	install -m 0655 ${WORKDIR}/config.in ${S}/config.in
	oe_runmake LINUX_SRC=${KERNEL_SOURCE} auto_config

#        if grep CONFIG_PCMCIA=[ym] ${STAGING_KERNEL_DIR}/kernel-config; then
#                echo "PRISM2_PCMCIA=y"          >> config.mk
#                echo "WLAN_KERN_PCMCIA=y"       >> config.mk
#        fi
        echo "TARGET_ROOT_ON_HOST=${D}/"         >> config.mk
        echo "TARGET_MODDIR=${D}/lib/modules/${KERNEL_VERSION}/wlan-ng" >> config.mk
	echo "CC=${KERNEL_CC}"			>> config.mk
	echo "LD=${KERNEL_LD}"			>> config.mk
	echo "LDFLAGS="				>> config.mk

	# Listen closely... sssshhh... can you hear the wlan-ng build system suck?
	rm -f ${KERNEL_SOURCE}/../config.mk
	rm -f ${KERNEL_SOURCE}/../../config.mk
	ln -sf ${S}/config.mk	${KERNEL_SOURCE}/..
	ln -sf ${S}/config.mk	${KERNEL_SOURCE}/../..
	install -m 0655 config.mk src/prism2/config.mk
	install -d src/prism2/driver/include
	ln -sf ${S}/src/include/wlan 		src/prism2/driver/include/wlan
	ln -sf ${S}/src/prism2/include/prism2	src/prism2/driver/include/prism2
}

do_compile() {
	oe_runmake -C src all
}

do_install() {
	oe_runmake install DESTDIR=${D}

        # Listen closely... sssshhh... can you hear the wlan-ng build system suck?
        rm -f ${KERNEL_SOURCE}/../config.mk
        rm -f ${KERNEL_SOURCE}/../../config.mk	
}

PACKAGES = "wlan-ng-modules-usb wlan-ng-modules-cs wlan-ng-modules-pci wlan-ng-modules-p80211"
FILES_wlan-ng-modules-p80211 = "/lib/modules/${KERNEL_VERSION}/wlan-ng/p80211${KERNEL_OBJECT_SUFFIX}"
FILES_wlan-ng-modules-usb = "/lib/modules/${KERNEL_VERSION}/wlan-ng/prism2_usb${KERNEL_OBJECT_SUFFIX}"
FILES_wlan-ng-modules-cs  = "/lib/modules/${KERNEL_VERSION}/wlan-ng/prism2_cs${KERNEL_OBJECT_SUFFIX}"
FILES_wlan-ng-modules-pci = "/lib/modules/${KERNEL_VERSION}/wlan-ng/prism2_pci${KERNEL_OBJECT_SUFFIX} \
			     /lib/modules/${KERNEL_VERSION}/wlan-ng/prism2_plx${KERNEL_OBJECT_SUFFIX}"
RDEPENDS_wlan-ng-modules-usb = "wlan-ng-modules-p80211"
RDEPENDS_wlan-ng-modules-cs  = "wlan-ng-modules-p80211"
RDEPENDS_wlan-ng-modules-pci = "wlan-ng-modules-p80211"