summaryrefslogtreecommitdiff
path: root/recipes-connectivity/hostapd-example/hostapd-example.bb
blob: dc0b9db9ffd94401965fec821f596d9f3e318dd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
SUMMARY = "Deployment of example files to run hostapd on Toradex demo images"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

RDEPENDS_${PN} = "hostapd"

S = "${WORKDIR}"

SRC_URI = " \
    file://enable-wifi.service \
    file://hostapd-example.service \
    file://hostapd-example.network \
    file://hostapd-tdx-demo-img.conf \
"

inherit allarch systemd

SYSTEMD_SERVICE_${PN} = "hostapd-example.service"
SYSTEMD_AUTO_ENABLE_${PN} = "disable"

do_install() {
    install -d ${D}${systemd_unitdir}/system/ ${D}${systemd_unitdir}/network/ ${D}${sysconfdir}/
    install -m 0644 enable-wifi.service ${D}${systemd_unitdir}/system/
    install -m 0644 hostapd-example.network ${D}${systemd_unitdir}/network/
    install -m 0644 hostapd-example.service ${D}${systemd_unitdir}/system/
    install -m 0644 hostapd-tdx-demo-img.conf ${D}${sysconfdir}/
    sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/hostapd-example.service
}

FILES_${PN} += " \
    ${systemd_unitdir}/system/* \
    ${systemd_unitdir}/network/hostapd-example.network \
    ${sysconfdir}/hostapd-tdx-demo-img.conf \
"