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
19 PKG_BUILD_DEPENDS
:=madwifi
21 include $(INCLUDE_DIR
)/package.mk
23 define Package
/hostapd
/Default
26 TITLE
:=IEEE
802.1x Authenticator
27 URL
:=http
://hostap.epitest.fi
/
30 define Package
/hostapd
31 $(call Package
/hostapd
/Default
)
35 This package contains a full featured IEEE
802.1x
/WPA
/EAP
/RADIUS
\\\
39 define Package
/hostapd
/conffiles
43 define Package
/hostapd-mini
44 $(call Package
/hostapd
/Default
)
45 TITLE
+= (WPA-PSK only
)
47 This package contains a minimal IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator
\\\
51 define Package
/hostapd-mini
/conffiles
55 define Package
/hostapd-utils
56 $(call Package
/hostapd
/Default
)
57 DEPENDS
:=@PACKAGE_hostapd||PACKAGE_hostapd-mini
60 This package contains a command line utility to control the
\\\
61 IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator.
64 define Build
/ConfigureTarget
65 $(CP
) $(PKG_BUILD_DIR
) $(PKG_BUILD_DIR
)_
$(1)
66 $(CP
) .
/files
/$(1).config
$(PKG_BUILD_DIR
)_
$(1)/.config
69 define Build
/CompileTarget
70 $(MAKE
) -C
$(PKG_BUILD_DIR
)_
$(1) \
71 $(TARGET_CONFIGURE_OPTS
) \
72 OPTFLAGS
="$(TARGET_CFLAGS)" \
73 CPPFLAGS
="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/madwifi" \
74 LDFLAGS
="$(TARGET_LDFLAGS)" \
76 $(CP
) $(PKG_BUILD_DIR
)_
$(1)/hostapd_cli
$(PKG_BUILD_DIR
)/
79 define Package
/InstallTemplate
80 if
[ \
! -f
"$(PKG_BUILD_DIR)_$(2)/hostapd" ]; then \
81 rm -f
$(PKG_BUILD_DIR
)/.built
; \
82 $(MAKE
) $(PKG_BUILD_DIR
)/.built
; \
84 $(INSTALL_DIR
) $$(1)/lib
/wifi
85 $(INSTALL_DATA
) .
/files
/hostapd.sh
$$(1)/lib
/wifi
/hostapd.sh
86 $(INSTALL_DIR
) $$(1)/etc
87 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)_
$(2)/madwifi.conf
$$(1)/etc
/hostapd.conf
88 $(INSTALL_DIR
) $$(1)/usr
/sbin
89 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)_
$(2)/hostapd
$$(1)/usr
/sbin
/
92 define Package
/Template
93 ifneq ($(CONFIG_PACKAGE_
$(1)),)
94 define Build
/Configure
/$(2)
95 $(call Build
/ConfigureTarget
,$(2))
97 define Build
/Compile
/$(2)
98 $(call Build
/CompileTarget
,$(2))
100 define Package
/$(1)/install
101 $(call Package
/InstallTemplate
,$(1),$(2))
106 define Build
/Configure
107 $(call Build
/Configure
/default
)
108 $(call Build
/Configure
/mini
)
112 $(call Build
/Compile
/default
)
113 $(call Build
/Compile
/mini
)
117 rm -rf
$(PKG_BUILD_DIR
)_default
118 rm -rf
$(PKG_BUILD_DIR
)_mini
121 define Package
/hostapd-utils
/install
122 $(INSTALL_DIR
) $(1)/usr
/sbin
123 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/hostapd_cli
$(1)/usr
/sbin
/
126 $(eval
$(call Package
/Template
,hostapd
,default
))
127 $(eval
$(call Package
/Template
,hostapd-mini
,mini
))
129 $(eval
$(call BuildPackage
,hostapd
))
130 $(eval
$(call BuildPackage
,hostapd-mini
))
131 $(eval
$(call BuildPackage
,hostapd-utils
))