2 # Copyright (C) 2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
11 PKG_NAME
:=wpa_supplicant
14 PKG_MD5SUM
:=b51b2975f21006f85f7297f3fb1acde1
16 PKG_SOURCE_URL
:=http
://hostap.epitest.fi
/releases
17 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
19 PKG_BUILD_DEPENDS
:=madwifi
21 include $(INCLUDE_DIR
)/package.mk
22 STAMP_CONFIGURED
:=$(STAMP_CONFIGURED
)_
$(call confvar
,CONFIG_PACKAGE_kmod-madwifi CONFIG_WPA_SUPPLICANT_NO_TIMESTAMP_CHECK
)
24 define Package
/wpa-supplicant
28 DEPENDS
:=$(if
$(CONFIG_WPA_SUPPLICANT_OPENSSL
),+libopenssl
)
29 URL
:=http
://hostap.epitest.fi
/wpa_supplicant
/
32 define Package
/wpa-supplicant
/Description
36 define Package
/wpa-supplicant
/config
37 source
"$(SOURCE)/Config.in"
40 define Package
/wpa-cli
43 DEPENDS
:=wpa-supplicant
44 TITLE
:=WPA Supplicant command line interface
47 define Package
/wpa-cli
/Description
48 WPA Supplicant control utility
51 CONFIG
=$(firstword $(wildcard .
/files
/config.
$(BOARD
) .
/files
/config.
$(ARCH
) .
/config
))
52 TARGET_CFLAGS
+= -I
$(STAGING_DIR
)/usr
/include/madwifi
$(if
$(CONFIG_WPA_SUPPLICANT_NO_TIMESTAMP_CHECK
),-DNO_TIMESTAMP_CHECK
)
54 define Build
/Configure
55 cp
$(CONFIG
) $(PKG_BUILD_DIR
)/wpa_supplicant
/.config
56 $(if
$(CONFIG_PACKAGE_kmod-madwifi
),,$(SED
) 's,^CONFIG_DRIVER_MADWIFI,#CONFIG_DRIVER_MADWIFI,g' $(PKG_BUILD_DIR
)/wpa_supplicant
/.config
)
57 $(if
$(CONFIG_WPA_SUPPLICANT_OPENSSL
),$(SED
) 's|^CONFIG_TLS.*|CONFIG_TLS=openssl|g' $(PKG_BUILD_DIR
)/wpa_supplicant
/.config
)
61 rm -rf
$(PKG_INSTALL_DIR
)
62 mkdir
-p
$(PKG_INSTALL_DIR
)
63 CFLAGS
="$(TARGET_CFLAGS)" \
64 $(MAKE
) -C
$(PKG_BUILD_DIR
)/wpa_supplicant \
67 CPPFLAGS
="$(TARGET_CPPFLAGS)" \
68 LDFLAGS
="$(TARGET_LDFLAGS)" \
72 define Package
/wpa-supplicant
/install
73 $(INSTALL_DIR
) $(1)/usr
/sbin
75 $(PKG_BUILD_DIR
)/wpa_supplicant
/wpa_supplicant \
76 $(PKG_BUILD_DIR
)/wpa_supplicant
/wpa_passphrase \
78 $(INSTALL_DIR
) $(1)/lib
/wifi
79 $(INSTALL_DATA
) .
/files
/wpa_supplicant.sh
$(1)/lib
/wifi
/wpa_supplicant.sh
82 define Package
/wpa-cli
/install
83 $(INSTALL_DIR
) $(1)/usr
/sbin
84 $(CP
) $(PKG_BUILD_DIR
)/wpa_supplicant
/wpa_cli
$(1)/usr
/sbin
/
87 $(eval
$(call BuildPackage
,wpa-supplicant
))
88 $(eval
$(call BuildPackage
,wpa-cli
))