2 # Copyright (C) 2006-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
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=http
://hostap.epitest.fi
/releases
/
16 PKG_SOURCE_SUBDIR
:=hostapd-
$(PKG_VERSION
)
17 PKG_SOURCE_VERSION
:=$(PKG_REV
)
18 PKG_MD5SUM
:=83630d11fa66ade9091f1b304fccd74c
19 PKG_BUILD_DEPENDS
:=PACKAGE_kmod-madwifi
:madwifi PACKAGE_kmod-mac80211
:mac80211 PACKAGE_kmod-mac80211
:libnl
21 include $(INCLUDE_DIR
)/package.mk
24 CONFIG_PACKAGE_kmod-ath9k \
25 CONFIG_PACKAGE_kmod-mac80211 \
26 CONFIG_PACKAGE_kmod-madwifi \
27 CONFIG_PACKAGE_hostapd \
28 CONFIG_PACKAGE_hostapd-mini
30 STAMP_CONFIGURED
:=$(STAMP_CONFIGURED
)_
$(call confvar
,$(PKG_CONFDEPS
))
33 CONFIG_DRIVER_NL80211
=$(CONFIG_PACKAGE_kmod-mac80211
) \
34 CONFIG_DRIVER_MADWIFI
=$(CONFIG_PACKAGE_kmod-madwifi
) \
35 CONFIG_IEEE80211N
=$(CONFIG_PACKAGE_kmod-ath9k
)
37 define Package
/hostapd
/Default
40 TITLE
:=IEEE
802.1x Authenticator
41 URL
:=http
://hostap.epitest.fi
/
42 DEPENDS
:=@
!TARGET_avr32 @
!TARGET_etrax
45 define Package
/hostapd
46 $(call Package
/hostapd
/Default
)
48 DEPENDS
+= +PACKAGE_hostapd
:libopenssl
51 #define Package/hostapd/conffiles
55 define Package
/hostapd
/description
56 This package contains a full featured IEEE
802.1x
/WPA
/EAP
/RADIUS
60 define Package
/hostapd-mini
61 $(call Package
/hostapd
/Default
)
62 TITLE
+= (WPA-PSK only
)
65 #define Package/hostapd-mini/conffiles
69 define Package
/hostapd-mini
/description
70 This package contains a minimal IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator
74 define Package
/hostapd-utils
75 $(call Package
/hostapd
/Default
)
77 DEPENDS
:=@PACKAGE_hostapd||PACKAGE_hostapd-mini
80 define Package
/hostapd-utils
/description
81 This package contains a command line utility to control the
82 IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator.
85 define Build
/ConfigureTarget
86 rm -rf
$(PKG_BUILD_DIR
)/hostapd.
$(1)
87 mkdir
-p
$(PKG_BUILD_DIR
)/hostapd.
$(1)
89 $(PKG_BUILD_DIR
)/hostapd \
90 $(PKG_BUILD_DIR
)/src \
91 $(PKG_BUILD_DIR
)/hostapd.
$(1)/
92 $(CP
) .
/files
/$(1).config
$(PKG_BUILD_DIR
)/hostapd.
$(1)/hostapd
/.config
95 define Build
/CompileTarget
96 CFLAGS
="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/madwifi -I$(STAGING_DIR)/usr/include/mac80211 -I$(STAGING_DIR)/usr/include/libnl $(TARGET_CPPFLAGS)" \
97 $(MAKE
) -C
$(PKG_BUILD_DIR
)/hostapd.
$(1)/hostapd \
98 $(TARGET_CONFIGURE_OPTS
) \
100 LIBS
="$(TARGET_LDFLAGS) \
101 $(if $(CONFIG_PACKAGE_kmod-mac80211),-lm $(STAGING_DIR)/usr/lib/libnl.a) \
102 $(if $(findstring default,$(1)),-lssl -lcrypto)" \
104 $(CP
) $(PKG_BUILD_DIR
)/hostapd.
$(1)/hostapd
/hostapd_cli
$(PKG_BUILD_DIR
)/
107 define Package
/InstallTemplate
108 $(INSTALL_DIR
) $$(1)/lib
/wifi
109 $(INSTALL_DATA
) .
/files
/hostapd.sh
$$(1)/lib
/wifi
/hostapd.sh
110 $(INSTALL_DIR
) $$(1)/usr
/sbin
111 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hostapd.
$(2)/hostapd
/hostapd
$$(1)/usr
/sbin
/
112 # config is managed through uci
113 # $(INSTALL_DIR) $$(1)/etc
114 # $(INSTALL_CONF) $(PKG_BUILD_DIR)/hostapd.$(2)/hostapd/hostapd.conf $$(1)/etc/hostapd.conf
117 define Package
/Template
118 ifneq ($(CONFIG_PACKAGE_
$(1)),)
119 define Build
/Configure
/$(2)
120 $(call Build
/ConfigureTarget
,$(2))
122 define Build
/Compile
/$(2)
123 $(call Build
/CompileTarget
,$(2))
125 define Package
/$(1)/install
126 $(call Package
/InstallTemplate
,$(1),$(2))
131 define Build
/Configure
132 rm -f
$(PKG_BUILD_DIR
)/.configured
*
133 $(call Build
/Configure
/default
)
134 $(call Build
/Configure
/mini
)
138 $(call Build
/Compile
/default
)
139 $(call Build
/Compile
/mini
)
143 rm -rf
$(PKG_BUILD_DIR
)_default
144 rm -rf
$(PKG_BUILD_DIR
)_mini
147 define Package
/hostapd-utils
/install
148 $(INSTALL_DIR
) $(1)/usr
/sbin
149 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hostapd_cli
$(1)/usr
/sbin
/
152 $(eval
$(call Package
/Template
,hostapd
,default
))
153 $(eval
$(call Package
/Template
,hostapd-mini
,mini
))
155 $(eval
$(call BuildPackage
,hostapd
))
156 $(eval
$(call BuildPackage
,hostapd-mini
))
157 $(eval
$(call BuildPackage
,hostapd-utils
))