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 \
31 include $(INCLUDE_DIR
)/package.mk
34 CONFIG_DRIVER_NL80211
=$(CONFIG_PACKAGE_kmod-mac80211
) \
35 CONFIG_DRIVER_MADWIFI
=$(CONFIG_PACKAGE_kmod-madwifi
) \
36 CONFIG_IEEE80211N
=$(CONFIG_PACKAGE_kmod-ath9k
)
38 define Package
/hostapd
/Default
41 TITLE
:=IEEE
802.1x Authenticator
42 URL
:=http
://hostap.epitest.fi
/
43 DEPENDS
:=@
!TARGET_avr32 @
!TARGET_etrax
+PACKAGE_kmod-mac80211
:libnl-tiny
46 define Package
/hostapd
47 $(call Package
/hostapd
/Default
)
49 DEPENDS
+= +PACKAGE_hostapd
:libopenssl
52 #define Package/hostapd/conffiles
56 define Package
/hostapd
/description
57 This package contains a full featured IEEE
802.1x
/WPA
/EAP
/RADIUS
61 define Package
/hostapd-mini
62 $(call Package
/hostapd
/Default
)
63 TITLE
+= (WPA-PSK only
)
66 #define Package/hostapd-mini/conffiles
70 define Package
/hostapd-mini
/description
71 This package contains a minimal IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator
75 define Package
/hostapd-utils
76 $(call Package
/hostapd
/Default
)
78 DEPENDS
:=@PACKAGE_hostapd||PACKAGE_hostapd-mini
81 define Package
/hostapd-utils
/description
82 This package contains a command line utility to control the
83 IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator.
86 define Build
/ConfigureTarget
87 rm -rf
$(PKG_BUILD_DIR
)/hostapd.
$(1)
88 mkdir
-p
$(PKG_BUILD_DIR
)/hostapd.
$(1)
90 $(PKG_BUILD_DIR
)/hostapd \
91 $(PKG_BUILD_DIR
)/src \
92 $(PKG_BUILD_DIR
)/hostapd.
$(1)/
93 $(CP
) .
/files
/$(1).config
$(PKG_BUILD_DIR
)/hostapd.
$(1)/hostapd
/.config
97 -I
$(STAGING_DIR
)/usr
/include/libnl-tiny \
98 -I
$(PKG_BUILD_DIR
)/src
/crypto \
100 -I
$(STAGING_DIR
)/usr
/include/madwifi \
101 -I
$(STAGING_DIR
)/usr
/include/mac80211 \
105 define Build
/CompileTarget
106 CFLAGS
="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
107 $(MAKE
) -C
$(PKG_BUILD_DIR
)/hostapd.
$(1)/hostapd \
108 $(TARGET_CONFIGURE_OPTS
) \
110 LIBS
="$(TARGET_LDFLAGS) \
111 $(if $(CONFIG_PACKAGE_kmod-mac80211),-lm -lnl-tiny) \
112 $(if $(findstring default,$(1)),-lssl -lcrypto)" \
114 $(CP
) $(PKG_BUILD_DIR
)/hostapd.
$(1)/hostapd
/hostapd_cli
$(PKG_BUILD_DIR
)/
117 define Package
/InstallTemplate
118 $(INSTALL_DIR
) $$(1)/lib
/wifi
119 $(INSTALL_DATA
) .
/files
/hostapd.sh
$$(1)/lib
/wifi
/hostapd.sh
120 $(INSTALL_DIR
) $$(1)/usr
/sbin
121 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hostapd.
$(2)/hostapd
/hostapd
$$(1)/usr
/sbin
/
122 # config is managed through uci
123 # $(INSTALL_DIR) $$(1)/etc
124 # $(INSTALL_CONF) $(PKG_BUILD_DIR)/hostapd.$(2)/hostapd/hostapd.conf $$(1)/etc/hostapd.conf
127 define Package
/Template
128 ifneq ($(CONFIG_PACKAGE_
$(1)),)
129 define Build
/Configure
/$(2)
130 $(call Build
/ConfigureTarget
,$(2))
132 define Build
/Compile
/$(2)
133 $(call Build
/CompileTarget
,$(2))
135 define Package
/$(1)/install
136 $(call Package
/InstallTemplate
,$(1),$(2))
141 define Build
/Configure
142 rm -f
$(PKG_BUILD_DIR
)/.configured
*
143 $(call Build
/Configure
/default
)
144 $(call Build
/Configure
/mini
)
148 $(call Build
/Compile
/default
)
149 $(call Build
/Compile
/mini
)
153 rm -rf
$(PKG_BUILD_DIR
)_default
154 rm -rf
$(PKG_BUILD_DIR
)_mini
157 define Package
/hostapd-utils
/install
158 $(INSTALL_DIR
) $(1)/usr
/sbin
159 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hostapd_cli
$(1)/usr
/sbin
/
162 $(eval
$(call Package
/Template
,hostapd
,default
))
163 $(eval
$(call Package
/Template
,hostapd-mini
,mini
))
165 $(eval
$(call BuildPackage
,hostapd
))
166 $(eval
$(call BuildPackage
,hostapd-mini
))
167 $(eval
$(call BuildPackage
,hostapd-utils
))