blob: dbdc5c1bdf453b7512754789b3feeafd0fe7dc86 [file] [log] [blame]
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00001SUMMARY = "User space daemon for extended IEEE 802.11 management"
2HOMEPAGE = "http://w1.fi/hostapd/"
3SECTION = "kernel/userland"
4LICENSE = "BSD-3-Clause"
5LIC_FILES_CHKSUM = "file://hostapd/README;md5=c905478466c90f1cefc0df987c40e172"
6
7DEPENDS = "libnl openssl"
8
9SRC_URI = " \
10 http://w1.fi/releases/hostapd-${PV}.tar.gz \
11 file://defconfig \
12 file://init \
13 file://hostapd.service \
14"
15
16
17SRC_URI[sha256sum] = "206e7c799b678572c2e3d12030238784bc4a9f82323b0156b4c9466f1498915d"
18
19S = "${WORKDIR}/hostapd-${PV}"
20B = "${WORKDIR}/hostapd-${PV}/hostapd"
21
22inherit update-rc.d systemd pkgconfig features_check
23
24CONFLICT_DISTRO_FEATURES = "openssl-no-weak-ciphers"
25
26INITSCRIPT_NAME = "hostapd"
27
28SYSTEMD_SERVICE:${PN} = "hostapd.service"
29SYSTEMD_AUTO_ENABLE:${PN} = "disable"
30
31do_configure:append() {
32 install -m 0644 ${WORKDIR}/defconfig ${B}/.config
33}
34
35do_compile() {
36 export CFLAGS="-MMD -O2 -Wall -g"
37 export EXTRA_CFLAGS="${CFLAGS}"
38 make V=1
39}
40
41do_install() {
42 install -d ${D}${sbindir} ${D}${sysconfdir}/init.d ${D}${systemd_unitdir}/system/
43 install -m 0644 ${B}/hostapd.conf ${D}${sysconfdir}
44 install -m 0755 ${B}/hostapd ${D}${sbindir}
45 install -m 0755 ${B}/hostapd_cli ${D}${sbindir}
46 install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/hostapd
47 install -m 0644 ${WORKDIR}/hostapd.service ${D}${systemd_unitdir}/system/
48 sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/hostapd.service
49}
50
51CONFFILES:${PN} += "${sysconfdir}/hostapd.conf"