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.
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=http
://hostap.epitest.fi
/releases
/
17 PKG_SOURCE_SUBDIR
:=hostapd-
$(PKG_VERSION
)
18 PKG_SOURCE_VERSION
:=$(PKG_REV
)
19 PKG_MD5SUM
:=cba36847d38c753731afefe1460f5f90
20 PKG_BUILD_DEPENDS
:=PACKAGE_kmod-madwifi
:madwifi
22 include $(INCLUDE_DIR
)/package.mk
23 STAMP_CONFIGURED
:=$(STAMP_CONFIGURED
)_
$(call confvar
,CONFIG_PACKAGE_kmod-madwifi CONFIG_PACKAGE_hostapd CONFIG_PACKAGE_hostapd-mini
)
25 define Package
/hostapd
/Default
28 TITLE
:=IEEE
802.1x Authenticator
29 URL
:=http
://hostap.epitest.fi
/
30 DEPENDS
:=@
!TARGET_avr32
33 define Package
/hostapd
34 $(call Package
/hostapd
/Default
)
36 DEPENDS
+= +PACKAGE_hostapd
:libopenssl
39 #define Package/hostapd/conffiles
43 define Package
/hostapd
/description
44 This package contains a full featured IEEE
802.1x
/WPA
/EAP
/RADIUS
48 define Package
/hostapd-mini
49 $(call Package
/hostapd
/Default
)
50 TITLE
+= (WPA-PSK only
)
53 #define Package/hostapd-mini/conffiles
57 define Package
/hostapd-mini
/description
58 This package contains a minimal IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator
62 define Package
/hostapd-utils
63 $(call Package
/hostapd
/Default
)
65 DEPENDS
:=@PACKAGE_hostapd||PACKAGE_hostapd-mini
68 define Package
/hostapd-utils
/description
69 This package contains a command line utility to control the
70 IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator.
73 define Build
/ConfigureTarget
74 rm -rf
$(PKG_BUILD_DIR
)/hostapd.
$(1)
75 mkdir
-p
$(PKG_BUILD_DIR
)/hostapd.
$(1)
77 $(PKG_BUILD_DIR
)/hostapd \
78 $(PKG_BUILD_DIR
)/src \
79 $(PKG_BUILD_DIR
)/hostapd.
$(1)/
80 $(CP
) .
/files
/$(1).config
$(PKG_BUILD_DIR
)/hostapd.
$(1)/hostapd
/.config
81 $(if
$(CONFIG_PACKAGE_kmod-madwifi
),,$(SED
) 's,^CONFIG_DRIVER_MADWIFI,#CONFIG_DRIVER_MADWIFI,g' $(PKG_BUILD_DIR
)/hostapd.
$(1)/hostapd
/.config
)
84 define Build
/CompileTarget
85 CFLAGS
="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/madwifi -I$(STAGING_DIR)/usr/include" \
86 $(MAKE
) -C
$(PKG_BUILD_DIR
)/hostapd.
$(1)/hostapd \
87 $(TARGET_CONFIGURE_OPTS
) \
88 LIBS
="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib \
89 $(if $(findstring default,$(1)),-lssl -lcrypto)" \
91 $(CP
) $(PKG_BUILD_DIR
)/hostapd.
$(1)/hostapd
/hostapd_cli
$(PKG_BUILD_DIR
)/
94 define Package
/InstallTemplate
95 $(INSTALL_DIR
) $$(1)/lib
/wifi
96 $(INSTALL_DATA
) .
/files
/hostapd.sh
$$(1)/lib
/wifi
/hostapd.sh
97 $(INSTALL_DIR
) $$(1)/usr
/sbin
98 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hostapd.
$(2)/hostapd
/hostapd
$$(1)/usr
/sbin
/
99 # config is managed through uci
100 # $(INSTALL_DIR) $$(1)/etc
101 # $(INSTALL_CONF) $(PKG_BUILD_DIR)/hostapd.$(2)/hostapd/hostapd.conf $$(1)/etc/hostapd.conf
104 define Package
/Template
105 ifneq ($(CONFIG_PACKAGE_
$(1)),)
106 define Build
/Configure
/$(2)
107 $(call Build
/ConfigureTarget
,$(2))
109 define Build
/Compile
/$(2)
110 $(call Build
/CompileTarget
,$(2))
112 define Package
/$(1)/install
113 $(call Package
/InstallTemplate
,$(1),$(2))
118 define Build
/Configure
119 rm -f
$(PKG_BUILD_DIR
)/.configured
*
120 $(call Build
/Configure
/default
)
121 $(call Build
/Configure
/mini
)
125 $(call Build
/Compile
/default
)
126 $(call Build
/Compile
/mini
)
130 rm -rf
$(PKG_BUILD_DIR
)_default
131 rm -rf
$(PKG_BUILD_DIR
)_mini
134 define Package
/hostapd-utils
/install
135 $(INSTALL_DIR
) $(1)/usr
/sbin
136 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hostapd_cli
$(1)/usr
/sbin
/
139 $(eval
$(call Package
/Template
,hostapd
,default
))
140 $(eval
$(call Package
/Template
,hostapd-mini
,mini
))
142 $(eval
$(call BuildPackage
,hostapd
))
143 $(eval
$(call BuildPackage
,hostapd-mini
))
144 $(eval
$(call BuildPackage
,hostapd-utils
))