use pidfiles for hostapd/wpa_supplicant instead of killing all processes when bringin...
[openwrt.git] / package / wpa_supplicant / Makefile
1 #
2 # Copyright (C) 2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=wpa_supplicant
12 PKG_VERSION:=0.6.3
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=b51b2975f21006f85f7297f3fb1acde1
15
16 PKG_SOURCE_URL:=http://hostap.epitest.fi/releases
17 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18
19 PKG_BUILD_DEPENDS:=madwifi
20
21 include $(INCLUDE_DIR)/package.mk
22 STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(call confvar,CONFIG_PACKAGE_kmod-madwifi CONFIG_WPA_SUPPLICANT_NO_TIMESTAMP_CHECK)
23
24 define Package/wpa-supplicant
25 SECTION:=net
26 CATEGORY:=Network
27 TITLE:=WPA Supplicant
28 DEPENDS:=$(if $(CONFIG_WPA_SUPPLICANT_OPENSSL),+libopenssl)
29 URL:=http://hostap.epitest.fi/wpa_supplicant/
30 endef
31
32 define Package/wpa-supplicant/Description
33 WPA Supplicant
34 endef
35
36 define Package/wpa-supplicant/config
37 source "$(SOURCE)/Config.in"
38 endef
39
40 define Package/wpa-cli
41 SECTION:=net
42 CATEGORY:=Network
43 DEPENDS:=wpa-supplicant
44 TITLE:=WPA Supplicant command line interface
45 endef
46
47 define Package/wpa-cli/Description
48 WPA Supplicant control utility
49 endef
50
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)
53
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)
58 endef
59
60 define Build/Compile
61 rm -rf $(PKG_INSTALL_DIR)
62 mkdir -p $(PKG_INSTALL_DIR)
63 CFLAGS="$(TARGET_CFLAGS)" \
64 $(MAKE) -C $(PKG_BUILD_DIR)/wpa_supplicant \
65 CC="$(TARGET_CC)" \
66 KERNEL=$(LINUX_DIR) \
67 CPPFLAGS="$(TARGET_CPPFLAGS)" \
68 LDFLAGS="$(TARGET_LDFLAGS)" \
69 all
70 endef
71
72 define Package/wpa-supplicant/install
73 $(INSTALL_DIR) $(1)/usr/sbin
74 $(CP) \
75 $(PKG_BUILD_DIR)/wpa_supplicant/wpa_supplicant \
76 $(PKG_BUILD_DIR)/wpa_supplicant/wpa_passphrase \
77 $(1)/usr/sbin/
78 $(INSTALL_DIR) $(1)/lib/wifi
79 $(INSTALL_DATA) ./files/wpa_supplicant.sh $(1)/lib/wifi/wpa_supplicant.sh
80 endef
81
82 define Package/wpa-cli/install
83 $(INSTALL_DIR) $(1)/usr/sbin
84 $(CP) $(PKG_BUILD_DIR)/wpa_supplicant/wpa_cli $(1)/usr/sbin/
85 endef
86
87 $(eval $(call BuildPackage,wpa-supplicant))
88 $(eval $(call BuildPackage,wpa-cli))
This page took 0.044879 seconds and 5 git commands to generate.