Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into...
[openembedded.git] / recipes / hostap / hostap-daemon_0.6.9.bb
1 DESCRIPTION = "User space daemon for extended IEEE 802.11 management"
2 HOMEPAGE = "http://hostap.epitest.fi"
3 SECTION = "kernel/userland"
4 PRIORITY = "optional"
5 LICENSE = "GPL"
6 DEPENDS = "libnl openssl ${@base_contains("COMBINED_FEATURES", "pci", "madwifi-ng", "",d)}"
7 PR = "r0"
8
9 DEFAULT_PREFERENCE = "-1"
10
11 #we introduce MY_ARCH to get 'armv5te' as arch instead of the misleading 'arm' on armv5te builds
12 MY_ARCH := "${PACKAGE_ARCH}"
13 PACKAGE_ARCH = "${@base_contains('COMBINED_FEATURES', 'pci', '${MACHINE_ARCH}', '${MY_ARCH}', d)}"
14
15 SRC_URI = "http://hostap.epitest.fi/releases/hostapd-${PV}.tar.gz \
16         file://defconfig \
17         file://init"
18
19 S = "${WORKDIR}/hostapd-${PV}/hostapd"
20
21 export HAS_PCI = "${@base_contains('COMBINED_FEATURES', 'pci', 1, 0,d)}"
22
23 inherit update-rc.d
24 INITSCRIPT_NAME=hostapd
25
26 do_configure() {
27         install -m 0644 ${WORKDIR}/defconfig ${S}/.config
28         if [ "x$HAS_PCI" = "x1" ] ; then
29                 echo "CONFIG_DRIVER_MADWIFI=y" >> .config
30                 echo "CFLAGS += -I${STAGING_INCDIR}/madwifi-ng" >> .config
31         fi
32 }
33
34 do_compile() {
35         make
36 }
37
38 do_install() {
39         install -d ${D}${sbindir} ${D}${sysconfdir}/init.d
40         install -m 0644 ${S}/hostapd.conf ${D}${sysconfdir}
41         install -m 0755 ${S}/hostapd ${D}${sbindir}
42         install -m 0755 ${S}/hostapd_cli ${D}${sbindir}
43         install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/hostapd
44 }
45