Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 1 | SUMMARY = "User space daemon for extended IEEE 802.11 management" |
| 2 | HOMEPAGE = "http://w1.fi/hostapd/" |
| 3 | SECTION = "kernel/userland" |
| 4 | LICENSE = "BSD-3-Clause" |
| 5 | LIC_FILES_CHKSUM = "file://hostapd/README;md5=c905478466c90f1cefc0df987c40e172" |
| 6 | |
| 7 | DEPENDS = "libnl openssl" |
| 8 | |
| 9 | SRC_URI = " \ |
| 10 | http://w1.fi/releases/hostapd-${PV}.tar.gz \ |
| 11 | file://defconfig \ |
| 12 | file://init \ |
| 13 | file://hostapd.service \ |
| 14 | " |
| 15 | |
| 16 | |
| 17 | SRC_URI[sha256sum] = "206e7c799b678572c2e3d12030238784bc4a9f82323b0156b4c9466f1498915d" |
| 18 | |
| 19 | S = "${WORKDIR}/hostapd-${PV}" |
| 20 | B = "${WORKDIR}/hostapd-${PV}/hostapd" |
| 21 | |
| 22 | inherit update-rc.d systemd pkgconfig features_check |
| 23 | |
| 24 | CONFLICT_DISTRO_FEATURES = "openssl-no-weak-ciphers" |
| 25 | |
| 26 | INITSCRIPT_NAME = "hostapd" |
| 27 | |
| 28 | SYSTEMD_SERVICE:${PN} = "hostapd.service" |
| 29 | SYSTEMD_AUTO_ENABLE:${PN} = "disable" |
| 30 | |
| 31 | do_configure:append() { |
| 32 | install -m 0644 ${WORKDIR}/defconfig ${B}/.config |
| 33 | } |
| 34 | |
| 35 | do_compile() { |
| 36 | export CFLAGS="-MMD -O2 -Wall -g" |
| 37 | export EXTRA_CFLAGS="${CFLAGS}" |
| 38 | make V=1 |
| 39 | } |
| 40 | |
| 41 | do_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 | |
| 51 | CONFFILES:${PN} += "${sysconfdir}/hostapd.conf" |