diff options
Diffstat (limited to 'meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-2.0.inc')
-rw-r--r-- | meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-2.0.inc | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-2.0.inc b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-2.0.inc new file mode 100644 index 0000000000..89910a0589 --- /dev/null +++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant-2.0.inc | |||
@@ -0,0 +1,84 @@ | |||
1 | DESCRIPTION = "A Client for Wi-Fi Protected Access (WPA)." | ||
2 | HOMEPAGE = "http://hostap.epitest.fi/wpa_supplicant/" | ||
3 | BUGTRACKER = "http://hostap.epitest.fi/bugz/" | ||
4 | SECTION = "network" | ||
5 | LICENSE = "BSD" | ||
6 | LIC_FILES_CHKSUM = "file://../COPYING;md5=ab87f20cd7e8c0d0a6539b34d3791d0e \ | ||
7 | file://../README;md5=5cb758942d25f6f61fd4ac388fd446fa \ | ||
8 | file://wpa_supplicant.c;beginline=1;endline=12;md5=cba4fa09fa364da845ca546f21008909" | ||
9 | DEPENDS = "gnutls dbus libnl" | ||
10 | RRECOMMENDS_${PN} = "wpa-supplicant-passphrase wpa-supplicant-cli" | ||
11 | |||
12 | SRC_URI = "http://hostap.epitest.fi/releases/wpa_supplicant-${PV}.tar.gz \ | ||
13 | file://defconfig-gnutls \ | ||
14 | file://wpa-supplicant.sh \ | ||
15 | file://wpa_supplicant.conf \ | ||
16 | file://wpa_supplicant.conf-sane \ | ||
17 | file://99_wpa_supplicant" | ||
18 | |||
19 | S = "${WORKDIR}/wpa_supplicant-${PV}/wpa_supplicant" | ||
20 | |||
21 | PACKAGES_prepend = "wpa-supplicant-passphrase wpa-supplicant-cli " | ||
22 | FILES_wpa-supplicant-passphrase = "${bindir}/wpa_passphrase" | ||
23 | FILES_wpa-supplicant-cli = "${sbindir}/wpa_cli" | ||
24 | FILES_${PN} += "${datadir}/dbus-1/system-services/* ${systemd_unitdir}/system/*" | ||
25 | CONFFILES_${PN} += "${sysconfdir}/wpa_supplicant.conf" | ||
26 | |||
27 | do_configure () { | ||
28 | echo "CFLAGS +=\"-I${STAGING_INCDIR}/libnl3\"" >> ${WORKDIR}/defconfig-gnutls | ||
29 | install -m 0755 ${WORKDIR}/defconfig-gnutls .config | ||
30 | } | ||
31 | |||
32 | export EXTRA_CFLAGS = "${CFLAGS}" | ||
33 | export BINDIR = "${sbindir}" | ||
34 | |||
35 | do_compile () { | ||
36 | unset CFLAGS CPPFLAGS CXXFLAGS | ||
37 | oe_runmake | ||
38 | } | ||
39 | |||
40 | do_install () { | ||
41 | install -d ${D}${sbindir} | ||
42 | install -m 755 wpa_supplicant ${D}${sbindir} | ||
43 | install -m 755 wpa_cli ${D}${sbindir} | ||
44 | |||
45 | install -d ${D}${bindir} | ||
46 | install -m 755 wpa_passphrase ${D}${bindir} | ||
47 | |||
48 | install -d ${D}${docdir}/wpa_supplicant | ||
49 | install -m 644 README ${WORKDIR}/wpa_supplicant.conf ${D}${docdir}/wpa_supplicant | ||
50 | |||
51 | install -d ${D}${sysconfdir} | ||
52 | install -m 600 ${WORKDIR}/wpa_supplicant.conf-sane ${D}${sysconfdir}/wpa_supplicant.conf | ||
53 | |||
54 | install -d ${D}${sysconfdir}/network/if-pre-up.d/ | ||
55 | install -d ${D}${sysconfdir}/network/if-post-down.d/ | ||
56 | install -d ${D}${sysconfdir}/network/if-down.d/ | ||
57 | install -m 755 ${WORKDIR}/wpa-supplicant.sh ${D}${sysconfdir}/network/if-pre-up.d/wpa-supplicant | ||
58 | cd ${D}${sysconfdir}/network/ && \ | ||
59 | ln -sf ../if-pre-up.d/wpa-supplicant if-post-down.d/wpa-supplicant | ||
60 | |||
61 | install -d ${D}/${sysconfdir}/dbus-1/system.d | ||
62 | install -m 644 ${S}/dbus/dbus-wpa_supplicant.conf ${D}/${sysconfdir}/dbus-1/system.d | ||
63 | install -d ${D}/${datadir}/dbus-1/system-services | ||
64 | install -m 644 ${S}/dbus/*.service ${D}/${datadir}/dbus-1/system-services | ||
65 | |||
66 | install -d ${D}/${systemd_unitdir}/system | ||
67 | install -m 644 ${S}/systemd/wpa_supplicant.service ${D}/${systemd_unitdir}/system | ||
68 | |||
69 | install -d ${D}/etc/default/volatiles | ||
70 | install -m 0644 ${WORKDIR}/99_wpa_supplicant ${D}/etc/default/volatiles | ||
71 | } | ||
72 | |||
73 | pkg_postinst_wpa-supplicant () { | ||
74 | # If we're offline, we don't need to do this. | ||
75 | if [ "x$D" != "x" ]; then | ||
76 | exit 0 | ||
77 | fi | ||
78 | |||
79 | DBUSPID=`pidof dbus-daemon` | ||
80 | |||
81 | if [ "x$DBUSPID" != "x" ]; then | ||
82 | /etc/init.d/dbus-1 reload || true | ||
83 | fi | ||
84 | } | ||