2 # Copyright (C) 2006 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_MD5SUM
:=d5113247dc6ee17106e6bc7cb89aa507
20 PKG_BUILD_DEPENDS
:=madwifi
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/hostapd
/Default
27 TITLE
:=IEEE
802.1x Authenticator
28 URL
:=http
://hostap.epitest.fi
/
31 define Package
/hostapd
32 $(call Package
/hostapd
/Default
)
36 This package contains a full featured IEEE
802.1x
/WPA
/EAP
/RADIUS
\\\
40 define Package
/hostapd
/conffiles
44 define Package
/hostapd-mini
45 $(call Package
/hostapd
/Default
)
46 TITLE
+= (WPA-PSK only
)
48 This package contains a minimal IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator
\\\
52 define Package
/hostapd-mini
/conffiles
56 define Package
/hostapd-utils
57 $(call Package
/hostapd
/Default
)
58 DEPENDS
:=@PACKAGE_hostapd||PACKAGE_hostapd-mini
61 This package contains a command line utility to control the
\\\
62 IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator.
65 define Build
/ConfigureTarget
66 $(CP
) $(PKG_BUILD_DIR
) $(PKG_BUILD_DIR
)_
$(1)
67 $(CP
) .
/files
/$(1).config
$(PKG_BUILD_DIR
)_
$(1)/.config
70 define Build
/CompileTarget
71 $(MAKE
) -C
$(PKG_BUILD_DIR
)_
$(1) \
72 $(TARGET_CONFIGURE_OPTS
) \
73 OPTFLAGS
="$(TARGET_CFLAGS)" \
74 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/madwifi" \
75 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
77 $(CP
) $(PKG_BUILD_DIR
)_
$(1)/hostapd_cli
$(PKG_BUILD_DIR
)/
80 define Package
/InstallTemplate
81 if
[ \
! -f
"$(PKG_BUILD_DIR)_$(2)/hostapd" ]; then \
82 rm -f
$(PKG_BUILD_DIR
)/.built
; \
83 $(MAKE
) $(PKG_BUILD_DIR
)/.built
; \
85 $(INSTALL_DIR
) $$(1)/etc
86 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)_
$(2)/madwifi.conf
$$(1)/etc
/hostapd.conf
87 $(INSTALL_DIR
) $$(1)/usr
/sbin
88 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)_
$(2)/hostapd
$$(1)/usr
/sbin
/
91 define Package
/Template
92 ifneq ($(CONFIG_PACKAGE_
$(1)),)
93 define Build
/Configure
/$(2)
94 $(call Build
/ConfigureTarget
,$(2))
96 define Build
/Compile
/$(2)
97 $(call Build
/CompileTarget
,$(2))
99 define Package
/$(1)/install
100 $(call Package
/InstallTemplate
,$(1),$(2))
105 define Build
/Configure
106 $(call Build
/Configure
/default
)
107 $(call Build
/Configure
/mini
)
111 $(call Build
/Compile
/default
)
112 $(call Build
/Compile
/mini
)
116 rm -rf
$(PKG_BUILD_DIR
)_default
117 rm -rf
$(PKG_BUILD_DIR
)_mini
120 define Package
/hostapd-utils
/install
121 $(INSTALL_DIR
) $(1)/usr
/sbin
122 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hostapd_cli
$(1)/usr
/sbin
/
125 $(eval
$(call Package
/Template
,hostapd
,default
))
126 $(eval
$(call Package
/Template
,hostapd-mini
,mini
))
128 $(eval
$(call BuildPackage
,hostapd
))
129 $(eval
$(call BuildPackage
,hostapd-mini
))
130 $(eval
$(call BuildPackage
,hostapd-utils
))