wpa_supplicant: convert recipe to bbappend

wpa_supplicant v2.0 was not available in Danny so we needed the whole
recipe, but it was updated in Dylan, so now we just need the bbappend.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2013-11-19 14:51:31 +01:00
parent 6545748379
commit 1ee0e7b503
9 changed files with 19 additions and 137 deletions

View File

@ -18,6 +18,8 @@ RDEPENDS_${PN} = "\
crda \
wireless-tools \
wpa-supplicant \
wpa-supplicant-cli \
wpa-supplicant-passphrase \
${WIRELESS_MODULE} \
"

View File

@ -1,56 +0,0 @@
# Copyright (C) 2013 Digi International.
DESCRIPTION = "A Client for Wi-Fi Protected Access (WPA)."
HOMEPAGE = "http://hostap.epitest.fi/wpa_supplicant/"
BUGTRACKER = "http://hostap.epitest.fi/bugz/"
SECTION = "network"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://../COPYING;md5=ab87f20cd7e8c0d0a6539b34d3791d0e \
file://../README;md5=5cb758942d25f6f61fd4ac388fd446fa \
file://wpa_supplicant.c;beginline=1;endline=12;md5=cba4fa09fa364da845ca546f21008909"
DEPENDS = "libnl openssl"
INC_PR = "r0"
SRC_URI = "http://hostap.epitest.fi/releases/wpa_supplicant-${PV}.tar.gz \
file://defconfig \
file://wpa_supplicant.conf \
file://wpa-supplicant.sh \
file://99_wpa_supplicant"
S = "${WORKDIR}/wpa_supplicant-${PV}/wpa_supplicant"
do_configure () {
echo "CFLAGS +=\"-I${STAGING_INCDIR}/libnl3\"" >> ${WORKDIR}/defconfig
install -m 0644 ${WORKDIR}/defconfig .config
}
export EXTRA_CFLAGS = "${CFLAGS}"
export BINDIR = "${sbindir}"
do_compile () {
unset CFLAGS CPPFLAGS CXXFLAGS
oe_runmake
}
do_install () {
install -d ${D}${sbindir}
install -m 0755 wpa_supplicant ${D}${sbindir}
install -m 0755 wpa_cli ${D}${sbindir}
install -d ${D}${bindir}
install -m 0755 wpa_passphrase ${D}${bindir}
install -d ${D}${sysconfdir}
install -m 0600 ${WORKDIR}/wpa_supplicant.conf ${D}${sysconfdir}/wpa_supplicant.conf
install -d ${D}${sysconfdir}/network/if-pre-up.d/
install -d ${D}${sysconfdir}/network/if-post-down.d/
install -d ${D}${sysconfdir}/network/if-down.d/
install -m 0755 ${WORKDIR}/wpa-supplicant.sh ${D}${sysconfdir}/network/if-pre-up.d/wpa-supplicant
cd ${D}${sysconfdir}/network/ && ln -sf ../if-pre-up.d/wpa-supplicant if-post-down.d/wpa-supplicant
install -d ${D}/etc/default/volatiles
install -m 0644 ${WORKDIR}/99_wpa_supplicant ${D}/etc/default/volatiles
}

View File

@ -1 +0,0 @@
d root root 0700 /var/run/wpa_supplicant none

View File

@ -1,74 +0,0 @@
#!/bin/sh
WPA_SUP_BIN="/usr/sbin/wpa_supplicant"
WPA_SUP_PNAME="wpa_supplicant"
WPA_SUP_PIDFILE="/var/run/wpa_supplicant.$IFACE.pid"
WPA_SUP_OPTIONS="-B -P $WPA_SUP_PIDFILE -i $IFACE"
VERBOSITY=0
if [ -s "$IF_WPA_CONF" ]; then
WPA_SUP_CONF="-c $IF_WPA_CONF"
else
exit 0
fi
if [ ! -x "$WPA_SUP_BIN" ]; then
if [ "$VERBOSITY" = "1" ]; then
echo "$WPA_SUP_PNAME: binaries not executable or missing from $WPA_SUP_BIN"
fi
exit 1
fi
if [ "$MODE" = "start" ] ; then
# driver type of interface, defaults to wext when undefined
if [ -s "/etc/wpa_supplicant/driver.$IFACE" ]; then
IF_WPA_DRIVER=$(cat "/etc/wpa_supplicant/driver.$IFACE")
elif [ -z "$IF_WPA_DRIVER" ]; then
if [ "$VERBOSITY" = "1" ]; then
echo "$WPA_SUP_PNAME: wpa-driver not provided, using \"wext\""
fi
IF_WPA_DRIVER="wext"
fi
# if we have passed the criteria, start wpa_supplicant
if [ -n "$WPA_SUP_CONF" ]; then
if [ "$VERBOSITY" = "1" ]; then
echo "$WPA_SUP_PNAME: $WPA_SUP_BIN $WPA_SUP_OPTIONS $WPA_SUP_CONF -D $IF_WPA_DRIVER"
fi
start-stop-daemon --start --quiet \
--name $WPA_SUP_PNAME --startas $WPA_SUP_BIN --pidfile $WPA_SUP_PIDFILE \
-- $WPA_SUP_OPTIONS $WPA_SUP_CONF -D $IF_WPA_DRIVER
fi
# if the interface socket exists, then wpa_supplicant was invoked successfully
if [ -S "$WPA_COMMON_CTRL_IFACE/$IFACE" ]; then
if [ "$VERBOSITY" = "1" ]; then
echo "$WPA_SUP_PNAME: ctrl_interface socket located at $WPA_COMMON_CTRL_IFACE/$IFACE"
fi
exit 0
fi
elif [ "$MODE" = "stop" ]; then
if [ -f "$WPA_SUP_PIDFILE" ]; then
if [ "$VERBOSITY" = "1" ]; then
echo "$WPA_SUP_PNAME: terminating $WPA_SUP_PNAME daemon"
fi
start-stop-daemon --stop --quiet \
--name $WPA_SUP_PNAME --pidfile $WPA_SUP_PIDFILE
if [ -S "$WPA_COMMON_CTRL_IFACE/$IFACE" ]; then
rm -f $WPA_COMMON_CTRL_IFACE/$IFACE
fi
if [ -f "$WPA_SUP_PIDFILE" ]; then
rm -f $WPA_SUP_PIDFILE
fi
fi
fi
exit 0

View File

@ -1,6 +0,0 @@
require wpa-supplicant-2.0.inc
PR = "${DISTRO}.${INC_PR}.0"
SRC_URI[md5sum] = "3be2ebfdcced52e00eda0afe2889839d"
SRC_URI[sha256sum] = "2c115609fbb5223d51381084a5c944455a8afcda81d584173ff55ba233379e09"

View File

@ -0,0 +1,17 @@
# Copyright (C) 2013 Digi International.
PRINC := "${@int(PRINC) + 1}"
PR_append = "+${DISTRO}"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
# We use OPENSSL for TLS implementation
DEPENDS := "${@oe_filter_out('gnutls', DEPENDS, d)}"
DEPENDS += "openssl"
SRC_URI += "file://defconfig"
do_configure () {
install -m 0755 ${WORKDIR}/defconfig wpa_supplicant/.config
echo "CFLAGS +=\"-I${STAGING_INCDIR}/libnl3\"" >> wpa_supplicant/.config
}