developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 1 | SUMMARY = "Client for Wi-Fi Protected Access (WPA)" |
| 2 | DESCRIPTION = "wpa_supplicant is a WPA Supplicant for Linux, BSD, Mac OS X, and Windows with support for WPA and WPA2 (IEEE 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in the client stations. It implements key negotiation with a WPA Authenticator and it controls the roaming and IEEE 802.11 authentication/association of the wlan driver." |
| 3 | HOMEPAGE = "http://w1.fi/wpa_supplicant/" |
| 4 | BUGTRACKER = "http://w1.fi/security/" |
| 5 | SECTION = "network" |
| 6 | LICENSE = "BSD-3-Clause" |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 7 | LIC_FILES_CHKSUM = "file://hostapd/README;md5=0e430ef1be3d6eebf257cf493fc7661d" |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 8 | |
developer | 1a17367 | 2023-12-21 14:49:33 +0800 | [diff] [blame] | 9 | DEPENDS = "dbus libnl-tiny ubus ucode udebug" |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 10 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" |
| 11 | FILESEXTRAPATHS_prepend := "${THISDIR}/files/patches-${PV}:" |
| 12 | |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 13 | SRCREV ?= "7e0e69cfeac300414ef0492bc76a2aa164443249" |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 14 | SRC_URI = "git://w1.fi/hostap.git;protocol=https;branch=main \ |
| 15 | file://wpa-supplicant.sh \ |
| 16 | file://wpa_supplicant.conf \ |
| 17 | file://wpa_supplicant.conf-sane \ |
| 18 | file://99_wpa_supplicant \ |
| 19 | file://wpa_supplicant-full.config \ |
developer | f0fd705 | 2023-08-14 20:23:42 +0800 | [diff] [blame] | 20 | file://src-${PV} \ |
| 21 | file://002-rdkb-add-ucode-support.patch;apply=no \ |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 22 | file://003-fix_wpa_supplicant_build_issue.patch;apply=no \ |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 23 | " |
| 24 | require files/patches-${PV}/patches.inc |
| 25 | |
| 26 | S = "${WORKDIR}/git" |
| 27 | |
| 28 | inherit pkgconfig systemd |
| 29 | |
| 30 | PACKAGECONFIG ?= "openssl" |
| 31 | PACKAGECONFIG[openssl] = ",,openssl" |
| 32 | |
| 33 | CVE_PRODUCT = "wpa_supplicant" |
| 34 | |
| 35 | EXTRA_OEMAKE = "'LIBDIR=${libdir}' 'INCDIR=${includedir}' 'BINDIR=${sbindir}'" |
| 36 | |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 37 | do_filogic_patches() { |
| 38 | cd ${S} |
| 39 | if [ ! -e patch_applied ]; then |
developer | f0fd705 | 2023-08-14 20:23:42 +0800 | [diff] [blame] | 40 | patch -p1 < ${WORKDIR}/002-rdkb-add-ucode-support.patch |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 41 | patch -p1 < ${WORKDIR}/003-fix_wpa_supplicant_build_issue.patch |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 42 | touch patch_applied |
| 43 | fi |
| 44 | } |
| 45 | |
| 46 | addtask filogic_patches after do_patch before do_compile |
| 47 | |
| 48 | do_configure () { |
| 49 | ${MAKE} -C wpa_supplicant clean |
| 50 | |
| 51 | # For rebuild |
| 52 | rm -f wpa_supplicant/*.d wpa_supplicant/dbus/*.d |
| 53 | } |
| 54 | |
| 55 | do_configure_append () { |
| 56 | # from Openwrt defconfig |
| 57 | install -m 0644 ${WORKDIR}/wpa_supplicant-full.config wpa_supplicant/.config |
| 58 | |
| 59 | # RDKB |
| 60 | echo "CONFIG_BUILD_WPA_CLIENT_SO=y" >> wpa_supplicant/.config |
developer | 4697a31 | 2023-11-30 15:52:52 +0800 | [diff] [blame] | 61 | echo "CFLAGS +=-I${STAGING_INCDIR}/libnl-tiny -D_GNU_SOURCE" >> wpa_supplicant/.config |
| 62 | echo "DRV_CFLAGS +=-I${STAGING_INCDIR}/libnl-tiny" >> wpa_supplicant/.config |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 63 | # mtk add |
| 64 | echo "CONFIG_MBO=y" >> wpa_supplicant/.config |
| 65 | echo "CONFIG_WPS_UPNP=y" >> wpa_supplicant/.config |
| 66 | echo "CONFIG_DPP=y" >> wpa_supplicant/.config |
| 67 | echo "CONFIG_DPP2=y" >> wpa_supplicant/.config |
| 68 | echo "CONFIG_DPP3=y" >> wpa_supplicant/.config |
| 69 | |
| 70 | # OpenWRT hostapd Makefile add |
| 71 | echo "CONFIG_ACS=y" >> wpa_supplicant/.config |
| 72 | echo "CONFIG_IEEE80211AX=y" >> wpa_supplicant/.config |
| 73 | echo "CONFIG_TLS=openssl" >> wpa_supplicant/.config |
| 74 | echo "CONFIG_SAE=y" >> wpa_supplicant/.config |
| 75 | echo "CONFIG_OWE=y" >> wpa_supplicant/.config |
| 76 | echo "CONFIG_SUITEB192=y" >> wpa_supplicant/.config |
| 77 | echo "CONFIG_WEP=y" >> wpa_supplicant/.config |
| 78 | echo "CONFIG_AP=y" >> wpa_supplicant/.config |
| 79 | echo "CONFIG_MESH=y" >> wpa_supplicant/.config |
developer | da18a74 | 2023-04-06 13:44:00 +0800 | [diff] [blame] | 80 | echo "CONFIG_IEEE80211BE=y" >> wpa_supplicant/.config |
developer | f0fd705 | 2023-08-14 20:23:42 +0800 | [diff] [blame] | 81 | echo "CONFIG_IEEE80211AC=y" >> wpa_supplicant/.config |
developer | da18a74 | 2023-04-06 13:44:00 +0800 | [diff] [blame] | 82 | echo "CONFIG_HE_OVERRIDES=y" >> wpa_supplicant/.config |
| 83 | echo "CONFIG_EHT_OVERRIDES=y" >> wpa_supplicant/.config |
developer | f0fd705 | 2023-08-14 20:23:42 +0800 | [diff] [blame] | 84 | echo "CONFIG_UCODE=y" >> wpa_supplicant/.config |
developer | 4697a31 | 2023-11-30 15:52:52 +0800 | [diff] [blame] | 85 | echo "CONFIG_LIBNL20=y" >> wpa_supplicant/.config |
| 86 | echo "CONFIG_LIBNL_TINY=y" >> wpa_supplicant/.config |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 87 | echo "CONFIG_TESTING_OPTIONS=y" >> wpa_supplicant/.config |
| 88 | echo "CONFIG_SAE_PK=y" >> wpa_supplicant/.config |
| 89 | echo "CONFIG_HS20=y" >> wpa_supplicant/.config |
| 90 | echo "CONFIG_HE_OVERRIDES=y" >> wpa_supplicant/.config |
| 91 | echo "CONFIG_EHT_OVERRIDES=y" >> wpa_supplicant/.config |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 92 | } |
| 93 | |
| 94 | do_compile () { |
| 95 | oe_runmake -C wpa_supplicant |
| 96 | oe_runmake -C wpa_supplicant libwpa_client.a |
| 97 | } |
| 98 | |
| 99 | do_install () { |
| 100 | oe_runmake -C wpa_supplicant DESTDIR="${D}" install |
| 101 | |
| 102 | install -d ${D}${docdir}/wpa_supplicant |
| 103 | install -m 644 wpa_supplicant/README ${WORKDIR}/wpa_supplicant.conf ${D}${docdir}/wpa_supplicant |
| 104 | |
| 105 | install -d ${D}${sysconfdir} |
| 106 | install -m 600 ${WORKDIR}/wpa_supplicant.conf-sane ${D}${sysconfdir}/wpa_supplicant.conf |
| 107 | |
| 108 | install -d ${D}${sysconfdir}/network/if-pre-up.d/ |
| 109 | install -d ${D}${sysconfdir}/network/if-post-down.d/ |
| 110 | install -d ${D}${sysconfdir}/network/if-down.d/ |
| 111 | install -m 755 ${WORKDIR}/wpa-supplicant.sh ${D}${sysconfdir}/network/if-pre-up.d/wpa-supplicant |
| 112 | ln -sf ../if-pre-up.d/wpa-supplicant ${D}${sysconfdir}/network/if-post-down.d/wpa-supplicant |
| 113 | |
| 114 | install -d ${D}/${sysconfdir}/dbus-1/system.d |
| 115 | install -m 644 ${S}/wpa_supplicant/dbus/dbus-wpa_supplicant.conf ${D}/${sysconfdir}/dbus-1/system.d |
| 116 | install -d ${D}/${datadir}/dbus-1/system-services |
| 117 | install -m 644 ${S}/wpa_supplicant/dbus/*.service ${D}/${datadir}/dbus-1/system-services |
| 118 | |
| 119 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 120 | install -d ${D}/${systemd_system_unitdir} |
| 121 | install -m 644 ${S}/wpa_supplicant/systemd/*.service ${D}/${systemd_system_unitdir} |
| 122 | fi |
| 123 | |
| 124 | install -d ${D}/etc/default/volatiles |
| 125 | install -m 0644 ${WORKDIR}/99_wpa_supplicant ${D}/etc/default/volatiles |
| 126 | |
| 127 | install -d ${D}${includedir} |
| 128 | install -m 0644 ${S}/src/common/wpa_ctrl.h ${D}${includedir} |
| 129 | |
| 130 | install -d ${D}${libdir} |
| 131 | install -m 0644 ${S}/wpa_supplicant/libwpa_client.so ${D}${libdir} |
| 132 | } |
| 133 | |
| 134 | pkg_postinst:${PN} () { |
| 135 | # If we're offline, we don't need to do this. |
| 136 | if [ "x$D" = "x" ]; then |
| 137 | killall -q -HUP dbus-daemon || true |
| 138 | fi |
| 139 | } |
| 140 | |
| 141 | PACKAGE_BEFORE_PN += "${PN}-passphrase ${PN}-cli" |
| 142 | PACKAGES =+ "${PN}-lib" |
| 143 | PACKAGES += "${PN}-plugins" |
| 144 | ALLOW_EMPTY:${PN}-plugins = "1" |
| 145 | |
| 146 | PACKAGES_DYNAMIC += "^${PN}-plugin-.*$" |
| 147 | NOAUTOPACKAGEDEBUG = "1" |
| 148 | |
| 149 | FILES:${PN}-passphrase = "${sbindir}/wpa_passphrase" |
| 150 | FILES:${PN}-cli = "${sbindir}/wpa_cli" |
developer | f0fd705 | 2023-08-14 20:23:42 +0800 | [diff] [blame] | 151 | FILES:${PN} += "${datadir}/dbus-1/system-services/* ${systemd_system_unitdir}/* ${datadir}/hostap/*" |
developer | f2e3f56 | 2022-12-26 19:41:22 +0800 | [diff] [blame] | 152 | FILES:${PN}-dbg += "${sbindir}/.debug ${libdir}/.debug" |
| 153 | |
| 154 | CONFFILES:${PN} += "${sysconfdir}/wpa_supplicant.conf" |
| 155 | |
| 156 | RRECOMMENDS:${PN} = "${PN}-passphrase ${PN}-cli ${PN}-plugins" |
| 157 | |
| 158 | SYSTEMD_SERVICE:${PN} = "wpa_supplicant.service" |
| 159 | SYSTEMD_AUTO_ENABLE = "disable" |
| 160 | |
| 161 | # move from cmf |
| 162 | FILES_SOLIBSDEV = "" |
| 163 | FILES_${PN} += "${libdir}/libwpa_client.so" |
| 164 | |