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
21 PACKAGE_kmod-madwifi
:madwifi \
22 PACKAGE_kmod-mac80211
:mac80211 \
24 PKG_CONFIG_DEPENDS
:= \
25 CONFIG_PACKAGE_kmod-ath9k \
26 CONFIG_PACKAGE_kmod-mac80211 \
27 CONFIG_PACKAGE_kmod-madwifi \
28 CONFIG_PACKAGE_hostapd \
29 CONFIG_PACKAGE_hostapd-mini \
30 CONFIG_PACKAGE_kmod-hostap
32 include $(INCLUDE_DIR
)/package.mk
35 CONFIG_DRIVER_NL80211
=$(CONFIG_PACKAGE_kmod-mac80211
) \
36 CONFIG_DRIVER_MADWIFI
=$(CONFIG_PACKAGE_kmod-madwifi
) \
37 CONFIG_DRIVER_HOSTAP
=$(CONFIG_PACKAGE_kmod-hostap
) \
38 CONFIG_IEEE80211N
=$(CONFIG_PACKAGE_kmod-ath9k
)
40 define Package
/hostapd
/Default
43 TITLE
:=IEEE
802.1x Authenticator
44 URL
:=http
://hostap.epitest.fi
/
45 DEPENDS
:=@
!TARGET_avr32 @
!TARGET_etrax
+PACKAGE_kmod-mac80211
:libnl-tiny
48 define Package
/hostapd
49 $(call Package
/hostapd
/Default
)
51 DEPENDS
+= +PACKAGE_hostapd
:libopenssl
54 #define Package/hostapd/conffiles
58 define Package
/hostapd
/description
59 This package contains a full featured IEEE
802.1x
/WPA
/EAP
/RADIUS
63 define Package
/hostapd-mini
64 $(call Package
/hostapd
/Default
)
65 TITLE
+= (WPA-PSK only
)
68 #define Package/hostapd-mini/conffiles
72 define Package
/hostapd-mini
/description
73 This package contains a minimal IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator
77 define Package
/hostapd-utils
78 $(call Package
/hostapd
/Default
)
80 DEPENDS
:=@PACKAGE_hostapd||PACKAGE_hostapd-mini
83 define Package
/hostapd-utils
/description
84 This package contains a command line utility to control the
85 IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator.
88 define Build
/ConfigureTarget
89 rm -rf
$(PKG_BUILD_DIR
)/hostapd.
$(1)
90 mkdir
-p
$(PKG_BUILD_DIR
)/hostapd.
$(1)
92 $(PKG_BUILD_DIR
)/hostapd \
93 $(PKG_BUILD_DIR
)/src \
94 $(PKG_BUILD_DIR
)/hostapd.
$(1)/
95 $(CP
) .
/files
/$(1).config
$(PKG_BUILD_DIR
)/hostapd.
$(1)/hostapd
/.config
99 -I
$(STAGING_DIR
)/usr
/include/libnl-tiny \
100 -I
$(PKG_BUILD_DIR
)/src
/crypto \
102 -I
$(STAGING_DIR
)/usr
/include/madwifi \
103 -I
$(STAGING_DIR
)/usr
/include/mac80211 \
107 define Build
/CompileTarget
108 CFLAGS
="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
109 $(MAKE
) -C
$(PKG_BUILD_DIR
)/hostapd.
$(1)/hostapd \
110 $(TARGET_CONFIGURE_OPTS
) \
112 LIBS
="$(TARGET_LDFLAGS) \
113 $(if $(CONFIG_PACKAGE_kmod-mac80211),-lm -lnl-tiny) \
114 $(if $(findstring default,$(1)),-lssl -lcrypto)" \
116 $(CP
) $(PKG_BUILD_DIR
)/hostapd.
$(1)/hostapd
/hostapd_cli
$(PKG_BUILD_DIR
)/
119 define Package
/InstallTemplate
120 $(INSTALL_DIR
) $$(1)/lib
/wifi
121 $(INSTALL_DATA
) .
/files
/hostapd.sh
$$(1)/lib
/wifi
/hostapd.sh
122 $(INSTALL_DIR
) $$(1)/usr
/sbin
123 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hostapd.
$(2)/hostapd
/hostapd
$$(1)/usr
/sbin
/
124 # config is managed through uci
125 # $(INSTALL_DIR) $$(1)/etc
126 # $(INSTALL_CONF) $(PKG_BUILD_DIR)/hostapd.$(2)/hostapd/hostapd.conf $$(1)/etc/hostapd.conf
129 define Package
/Template
130 ifneq ($(CONFIG_PACKAGE_
$(1)),)
131 define Build
/Configure
/$(2)
132 $(call Build
/ConfigureTarget
,$(2))
134 define Build
/Compile
/$(2)
135 $(call Build
/CompileTarget
,$(2))
137 define Package
/$(1)/install
138 $(call Package
/InstallTemplate
,$(1),$(2))
143 define Build
/Configure
144 rm -f
$(PKG_BUILD_DIR
)/.configured
*
145 $(call Build
/Configure
/default
)
146 $(call Build
/Configure
/mini
)
150 $(call Build
/Compile
/default
)
151 $(call Build
/Compile
/mini
)
155 rm -rf
$(PKG_BUILD_DIR
)_default
156 rm -rf
$(PKG_BUILD_DIR
)_mini
159 define Package
/hostapd-utils
/install
160 $(INSTALL_DIR
) $(1)/usr
/sbin
161 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hostapd_cli
$(1)/usr
/sbin
/
164 $(eval
$(call Package
/Template
,hostapd
,default
))
165 $(eval
$(call Package
/Template
,hostapd-mini
,mini
))
167 $(eval
$(call BuildPackage
,hostapd
))
168 $(eval
$(call BuildPackage
,hostapd-mini
))
169 $(eval
$(call BuildPackage
,hostapd-utils
))