1 ################################################################################
5 ################################################################################
7 WPA_SUPPLICANT_VERSION
= 2.5
8 WPA_SUPPLICANT_SITE
= http
://hostap.epitest.fi
/releases
9 WPA_SUPPLICANT_LICENSE
= GPLv2
/BSD-3c
10 WPA_SUPPLICANT_LICENSE_FILES
= README
11 WPA_SUPPLICANT_CONFIG
= $(WPA_SUPPLICANT_DIR
)/wpa_supplicant
/.config
12 WPA_SUPPLICANT_SUBDIR
= wpa_supplicant
13 WPA_SUPPLICANT_DBUS_OLD_SERVICE
= fi.epitest.hostap.WPASupplicant
14 WPA_SUPPLICANT_DBUS_NEW_SERVICE
= fi.w1.wpa_supplicant1
15 WPA_SUPPLICANT_CFLAGS
= $(TARGET_CFLAGS
) -I
$(STAGING_DIR
)/usr
/include/libnl3
/
16 WPA_SUPPLICANT_LDFLAGS
= $(TARGET_LDFLAGS
)
18 # install the wpa_client library
19 WPA_SUPPLICANT_INSTALL_STAGING
= YES
21 WPA_SUPPLICANT_CONFIG_EDITS
=
23 WPA_SUPPLICANT_CONFIG_SET
=
25 WPA_SUPPLICANT_CONFIG_ENABLE
= \
29 CONFIG_INTERNAL_LIBTOMMATH \
32 WPA_SUPPLICANT_CONFIG_DISABLE
= \
35 # libnl-3 needs -lm (for rint) and -lpthread if linking statically
36 # And library order matters hence stick -lnl-3 first since it's appended
37 # in the wpa_supplicant Makefiles as in LIBS+=-lnl-3 ... thus failing
38 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_NL80211
),y
)
39 ifeq ($(BR2_STATIC_LIBS
),y
)
40 WPA_SUPPLICANT_LIBS
+= -lnl-3
-lm
-lpthread
42 WPA_SUPPLICANT_DEPENDENCIES
+= host-pkgconf libnl
43 WPA_SUPPLICANT_CONFIG_ENABLE
+= CONFIG_LIBNL32
45 WPA_SUPPLICANT_CONFIG_DISABLE
+= CONFIG_DRIVER_NL80211
48 # Trailing underscore on purpose to not enable CONFIG_EAPOL_TEST
49 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_EAP
),y
)
50 WPA_SUPPLICANT_CONFIG_ENABLE
+= CONFIG_EAP_
52 ifeq ($(BR2_STATIC_LIBS
),y
)
53 WPA_SUPPLICANT_CONFIG_DISABLE
+= CONFIG_EAP_TNC
56 WPA_SUPPLICANT_CONFIG_DISABLE
+= CONFIG_EAP
59 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_HOTSPOT
),y
)
60 WPA_SUPPLICANT_CONFIG_ENABLE
+= CONFIG_HS20 \
64 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT
),y
)
65 WPA_SUPPLICANT_CONFIG_ENABLE
+= \
70 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_WPS
),y
)
71 WPA_SUPPLICANT_CONFIG_ENABLE
+= CONFIG_WPS
74 # Try to use openssl if it's already available
75 ifeq ($(BR2_PACKAGE_OPENSSL
),y
)
76 WPA_SUPPLICANT_DEPENDENCIES
+= openssl
77 WPA_SUPPLICANT_LIBS
+= $(if
$(BR2_STATIC_LIBS
),-lcrypto
-lz
)
78 WPA_SUPPLICANT_CONFIG_EDITS
+= 's/\#\(CONFIG_TLS=openssl\)/\1/'
80 WPA_SUPPLICANT_CONFIG_DISABLE
+= CONFIG_EAP_PWD
81 WPA_SUPPLICANT_CONFIG_EDITS
+= 's/\#\(CONFIG_TLS=\).*/\1internal/'
84 ifeq ($(BR2_PACKAGE_DBUS
),y
)
85 WPA_SUPPLICANT_DEPENDENCIES
+= host-pkgconf dbus
86 WPA_SUPPLICANT_MAKE_ENV
= \
87 PKG_CONFIG_SYSROOT_DIR
="$(STAGING_DIR)" \
88 PKG_CONFIG_PATH
="$(STAGING_DIR)/usr/lib/pkgconfig"
90 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_OLD
),y
)
91 WPA_SUPPLICANT_CONFIG_ENABLE
+= CONFIG_CTRL_IFACE_DBUS
=
92 define WPA_SUPPLICANT_INSTALL_DBUS_OLD
93 $(INSTALL
) -m
0644 -D \
94 $(@D
)/wpa_supplicant
/dbus
/$(WPA_SUPPLICANT_DBUS_OLD_SERVICE
).service \
95 $(TARGET_DIR
)/usr
/share
/dbus-1
/system-services
/$(WPA_SUPPLICANT_DBUS_OLD_SERVICE
).service
99 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW
),y
)
100 WPA_SUPPLICANT_CONFIG_ENABLE
+= CONFIG_CTRL_IFACE_DBUS_NEW
101 define WPA_SUPPLICANT_INSTALL_DBUS_NEW
102 $(INSTALL
) -m
0644 -D \
103 $(@D
)/wpa_supplicant
/dbus
/$(WPA_SUPPLICANT_DBUS_NEW_SERVICE
).service \
104 $(TARGET_DIR
)/usr
/share
/dbus-1
/system-services
/$(WPA_SUPPLICANT_DBUS_NEW_SERVICE
).service
108 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_INTROSPECTION
),y
)
109 WPA_SUPPLICANT_CONFIG_ENABLE
+= CONFIG_CTRL_IFACE_DBUS_INTRO
114 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DEBUG_SYSLOG
),y
)
115 WPA_SUPPLICANT_CONFIG_ENABLE
+= CONFIG_DEBUG_SYSLOG
118 ifeq ($(BR2_PACKAGE_READLINE
),y
)
119 WPA_SUPPLICANT_DEPENDENCIES
+= readline
120 WPA_SUPPLICANT_CONFIG_ENABLE
+= CONFIG_READLINE
123 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_WPA_CLIENT_SO
),y
)
124 WPA_SUPPLICANT_CONFIG_SET
+= CONFIG_BUILD_WPA_CLIENT_SO
125 define WPA_SUPPLICANT_INSTALL_WPA_CLIENT_SO
126 $(INSTALL
) -m
0644 -D
$(@D
)/$(WPA_SUPPLICANT_SUBDIR
)/libwpa_client.so \
127 $(TARGET_DIR
)/usr
/lib
/libwpa_client.so
128 $(INSTALL
) -m
0644 -D
$(@D
)/src
/common
/wpa_ctrl.h \
129 $(TARGET_DIR
)/usr
/include/wpa_ctrl.h
131 define WPA_SUPPLICANT_INSTALL_STAGING_WPA_CLIENT_SO
132 $(INSTALL
) -m
0644 -D
$(@D
)/$(WPA_SUPPLICANT_SUBDIR
)/libwpa_client.so \
133 $(STAGING_DIR
)/usr
/lib
/libwpa_client.so
134 $(INSTALL
) -m
0644 -D
$(@D
)/src
/common
/wpa_ctrl.h \
135 $(STAGING_DIR
)/usr
/include/wpa_ctrl.h
139 define WPA_SUPPLICANT_CONFIGURE_CMDS
140 cp
$(@D
)/wpa_supplicant
/defconfig
$(WPA_SUPPLICANT_CONFIG
)
141 sed
-i
$(patsubst %,-e
's/^#\(%\)/\1/',$(WPA_SUPPLICANT_CONFIG_ENABLE
)) \
142 $(patsubst %,-e
's/^\(%\)/#\1/',$(WPA_SUPPLICANT_CONFIG_DISABLE
)) \
143 $(patsubst %,-e
'1i%=y',$(WPA_SUPPLICANT_CONFIG_SET
)) \
144 $(patsubst %,-e
%,$(WPA_SUPPLICANT_CONFIG_EDITS
)) \
145 $(WPA_SUPPLICANT_CONFIG
)
148 # LIBS for wpa_supplicant, LIBS_c for wpa_cli, LIBS_p for wpa_passphrase
149 define WPA_SUPPLICANT_BUILD_CMDS
150 $(TARGET_MAKE_ENV
) CFLAGS
="$(WPA_SUPPLICANT_CFLAGS)" \
151 LDFLAGS
="$(TARGET_LDFLAGS)" BINDIR
=/usr
/sbin \
152 LIBS
="$(WPA_SUPPLICANT_LIBS)" LIBS_c
="$(WPA_SUPPLICANT_LIBS)" \
153 LIBS_p
="$(WPA_SUPPLICANT_LIBS)" \
154 $(MAKE
) CC
="$(TARGET_CC)" -C
$(@D
)/$(WPA_SUPPLICANT_SUBDIR
)
157 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_CLI
),y
)
158 define WPA_SUPPLICANT_INSTALL_CLI
159 $(INSTALL
) -m
0755 -D
$(@D
)/$(WPA_SUPPLICANT_SUBDIR
)/wpa_cli \
160 $(TARGET_DIR
)/usr
/sbin
/wpa_cli
164 ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE
),y
)
165 define WPA_SUPPLICANT_INSTALL_PASSPHRASE
166 $(INSTALL
) -m
0755 -D
$(@D
)/$(WPA_SUPPLICANT_SUBDIR
)/wpa_passphrase \
167 $(TARGET_DIR
)/usr
/sbin
/wpa_passphrase
171 ifeq ($(BR2_PACKAGE_DBUS
),y
)
172 define WPA_SUPPLICANT_INSTALL_DBUS
173 $(INSTALL
) -m
0644 -D \
174 $(@D
)/wpa_supplicant
/dbus
/dbus-wpa_supplicant.conf \
175 $(TARGET_DIR
)/etc
/dbus-1
/system.d
/wpa_supplicant.conf
176 $(WPA_SUPPLICANT_INSTALL_DBUS_OLD
)
177 $(WPA_SUPPLICANT_INSTALL_DBUS_NEW
)
181 define WPA_SUPPLICANT_INSTALL_STAGING_CMDS
182 $(WPA_SUPPLICANT_INSTALL_STAGING_WPA_CLIENT_SO
)
185 define WPA_SUPPLICANT_INSTALL_TARGET_CMDS
186 $(INSTALL
) -m
0755 -D
$(@D
)/$(WPA_SUPPLICANT_SUBDIR
)/wpa_supplicant \
187 $(TARGET_DIR
)/usr
/sbin
/wpa_supplicant
188 $(INSTALL
) -m
644 -D package
/wpa_supplicant
/wpa_supplicant.conf \
189 $(TARGET_DIR
)/etc
/wpa_supplicant.conf
190 $(WPA_SUPPLICANT_INSTALL_CLI
)
191 $(WPA_SUPPLICANT_INSTALL_PASSPHRASE
)
192 $(WPA_SUPPLICANT_INSTALL_DBUS
)
193 $(WPA_SUPPLICANT_INSTALL_WPA_CLIENT_SO
)
196 define WPA_SUPPLICANT_INSTALL_INIT_SYSTEMD
197 $(INSTALL
) -m
0644 -D
$(@D
)/$(WPA_SUPPLICANT_SUBDIR
)/systemd
/wpa_supplicant.service \
198 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/wpa_supplicant.service
199 $(INSTALL
) -m
0644 -D
$(@D
)/$(WPA_SUPPLICANT_SUBDIR
)/systemd
/wpa_supplicant@.service \
200 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/wpa_supplicant@.service
201 $(INSTALL
) -m
0644 -D
$(@D
)/$(WPA_SUPPLICANT_SUBDIR
)/systemd
/wpa_supplicant-nl80211@.service \
202 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/wpa_supplicant-nl80211@.service
203 $(INSTALL
) -m
0644 -D
$(@D
)/$(WPA_SUPPLICANT_SUBDIR
)/systemd
/wpa_supplicant-wired@.service \
204 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/wpa_supplicant-wired@.service
207 $(eval
$(generic-package
))