]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/wlags-modules/wlags-modules_718.inc
at76c503a-modules: make it compile cleanly against current hh kernels.
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / wlags-modules / wlags-modules_718.inc
1 DESCRIPTION = "A driver from Agera (a card manufacturer) for wireless LAN cards based on Hermes cards."
2 HOMEPAGE = "http://www.agere.com/mobility/wireless_lan_drivers.html"
3 SECTION = "kernel/modules"
4 PRIORITY = "optional"
5 MAINTAINER = "Holger Schurig"
6 DEPENDS = "virtual/kernel"
7 LICENSE = "BSD"
8 PR = "r1"
9
10 TARFILE = "wl_lkm_${PV}_release.tar.gz"
11
12
13 #
14 # The original wlags tar file is a bit messy:
15 # * it doesn't contain it's own subdirectory
16 # * the files are formatted for Windows/DOS (with CR/LF)
17 # * they assume that the pcmcia-cs source code is there
18 # * they don't use the kernel makefile approach
19 #
20 # Because of this, I create the IPK in a little unusual way:
21 # * I "flatten" the structure to be able to use the kernel makefile concept
22 # * the patches I have are for the flattened structure
23 # * then I do the usual compile/install/package dance
24 #
25
26 SRC_URI = "http://www.agere.com/mobility/docs/${TARFILE} \
27         file://Makefile \
28         file://includes.patch \
29         file://kernel-pcmcia.patch \
30         file://bugs.patch \
31         file://fixes.patch \
32         file://wlags_h${COMPILE_HERMES}.conf"
33 S = "${WORKDIR}/${PN}"
34
35 do_configure() {
36         cp ../{hcf,firmware,include/hcf,include/wireless}/*.h .
37         cp ../{hcf,firmware,wireless}/*.c .
38         cp ../etc/wlags49.conf .
39         perl -pi -e 'r:\r::g' *.h *.c
40
41         patch -p1 <${WORKDIR}/includes.patch
42         patch -p1 <${WORKDIR}/kernel-pcmcia.patch
43         patch -p1 <${WORKDIR}/bugs.patch
44         patch -p1 <${WORKDIR}/fixes.patch
45         cp ${WORKDIR}/Makefile .
46 }
47
48
49 do_compile() {
50         unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
51         make -C ${STAGING_KERNEL_DIR} \
52                 modules \
53                 SUBDIRS="${S}" \
54                 CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
55                 COMPILE_HERMES=${COMPILE_HERMES}
56 }
57
58
59 do_install() {
60         install -d ${D}${sysconfdir}/pcmcia
61         install -m 0644 ${WORKDIR}/wlags_h${COMPILE_HERMES}.conf ${D}${sysconfdir}/pcmcia/
62
63         install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/net/wireless
64         ls
65         install -m 0644 wlags49_h${COMPILE_HERMES}_cs${KERNEL_OBJECT_SUFFIX} ${D}${base_libdir}/modules/${KERNEL_VERSION}/net/wireless
66 }
67
68 FILES = "/lib/modules/${KERNEL_VERSION}/net/wireless/*${KERNEL_OBJECT_SUFFIX} /${sysconfdir}"