2 # Copyright (C) 2008-2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
10 PKG_NAME
:=wpa_supplicant
13 PKG_MD5SUM
:=0efb8fcedf0a8acf6f423dfdb0658fdd
15 PKG_SOURCE_URL
:=http
://hostap.epitest.fi
/releases
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
19 PACKAGE_kmod-madwifi
:madwifi \
21 PKG_CONFIG_DEPENDS
:= \
22 CONFIG_PACKAGE_kmod-madwifi \
23 CONFIG_WPA_SUPPLICANT_NO_TIMESTAMP_CHECK \
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/wpa-supplicant
31 DEPENDS
:=$(if
$(CONFIG_WPA_SUPPLICANT_OPENSSL
),+libopenssl
)
32 URL
:=http
://hostap.epitest.fi
/wpa_supplicant
/
35 define Package
/wpa-supplicant
/Description
39 define Package
/wpa-supplicant
/config
40 source
"$(SOURCE)/Config.in"
43 define Package
/wpa-cli
46 DEPENDS
:=wpa-supplicant
47 TITLE
:=WPA Supplicant command line interface
50 define Package
/wpa-cli
/Description
51 WPA Supplicant control utility
54 CONFIG
=$(firstword $(wildcard .
/files
/config.
$(BOARD
) .
/files
/config.
$(ARCH
) .
/config
))
55 TARGET_CFLAGS
+= -I
$(STAGING_DIR
)/usr
/include/madwifi
$(if
$(CONFIG_WPA_SUPPLICANT_NO_TIMESTAMP_CHECK
),-DNO_TIMESTAMP_CHECK
)
57 define Build
/Configure
58 cp
$(CONFIG
) $(PKG_BUILD_DIR
)/wpa_supplicant
/.config
59 $(if
$(CONFIG_PACKAGE_kmod-madwifi
),,$(SED
) 's,^CONFIG_DRIVER_MADWIFI,#CONFIG_DRIVER_MADWIFI,g' $(PKG_BUILD_DIR
)/wpa_supplicant
/.config
)
60 $(if
$(CONFIG_WPA_SUPPLICANT_OPENSSL
),$(SED
) 's|^CONFIG_TLS.*|CONFIG_TLS=openssl|g' $(PKG_BUILD_DIR
)/wpa_supplicant
/.config
)
64 rm -rf
$(PKG_INSTALL_DIR
)
65 mkdir
-p
$(PKG_INSTALL_DIR
)
66 CFLAGS
="$(TARGET_CFLAGS)" \
67 $(MAKE
) -C
$(PKG_BUILD_DIR
)/wpa_supplicant \
70 CPPFLAGS
="$(TARGET_CPPFLAGS)" \
71 LDFLAGS
="$(TARGET_LDFLAGS)" \
75 define Package
/wpa-supplicant
/install
76 $(INSTALL_DIR
) $(1)/usr
/sbin
78 $(PKG_BUILD_DIR
)/wpa_supplicant
/wpa_supplicant \
79 $(PKG_BUILD_DIR
)/wpa_supplicant
/wpa_passphrase \
81 $(INSTALL_DIR
) $(1)/lib
/wifi
82 $(INSTALL_DATA
) .
/files
/wpa_supplicant.sh
$(1)/lib
/wifi
/wpa_supplicant.sh
85 define Package
/wpa-cli
/install
86 $(INSTALL_DIR
) $(1)/usr
/sbin
87 $(CP
) $(PKG_BUILD_DIR
)/wpa_supplicant
/wpa_cli
$(1)/usr
/sbin
/
90 $(eval
$(call BuildPackage
,wpa-supplicant
))
91 $(eval
$(call BuildPackage
,wpa-cli
))