summaryrefslogtreecommitdiff
path: root/recipes-connectivity/hostapd/hostapd_%.bbappend
blob: 7851129ff0891fee381edfe692df27164122dda9 (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
38
39
40
SRC_URI += "file://cfg80211.conf"

do_install_append() {
	install -d ${D}{sysconfdir}/modprobe.d
	install -m 644 -D ${WORKDIR}/cfg80211.conf ${D}${sysconfdir}/modprobe.d/cfg80211.conf
}


# -p option is striplevel
SRC_URI += " file://cfg80211.conf \
           file://WiFi-SSID \
           file://setchan \
           "

do_install() {
    install -d ${D}${sbindir} ${D}${sysconfdir}/init.d
    install -m 0644 ${S}/hostapd.conf ${D}${sysconfdir}
    install -m 0755 ${S}/hostapd ${D}${sbindir}
    install -m 0755 ${S}/hostapd_cli ${D}${sbindir}
    install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/hostapd
    
    install -m 644 -D ${WORKDIR}/cfg80211.conf ${D}${sysconfdir}/modprobe.d/cfg80211.conf
    install -d ${D}/usr/share/hostap-daemon
    install -m 0444 ${WORKDIR}/WiFi-SSID ${D}/usr/share/hostap-daemon/WiFi-SSID.patch
    install -d ${D}/usr/local/bin
    install -m 0744 ${WORKDIR}/setchan ${D}/usr/local/bin
}

PACKAGES =+ "${PN}-extra"
FILES_${PN}-extra = "/usr/local/bin/* /usr/share/hostap-daemon/WiFi-SSID.patch"

pkg_postinst_${PN}-bt-name() {
	cd /$D
	patch -Np1 < $D/usr/share/hostap-daemon/WiFi-SSID.patch
}

pkg_prerm_${PN}-bt-name() {
	cd /$D
	patch -Rp1 < $D/usr/share/hostap-daemon/WiFi-SSID.patch
}