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
14 PKG_MD5SUM
:=4e3134e8b0d86e831230f8c620fd81bb
17 PKG_SOURCE_URL
:=http
://hostap.epitest.fi
/releases
/
18 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
21 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/hostapd
29 TITLE
:=IEEE
802.1x Authenticator
30 DESCRIPTION
:=IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator
31 URL
:=http
://hostap.epitest.fi
/
34 define Package
/hostapd
/conffiles
38 define Package
/hostapd-mini
39 $(call Package
/hostapd
)
40 TITLE
:=IEEE
802.1x Authenticator
(WPA-PSK only
)
42 DESCRIPTION
:=IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator
(WPA-PSK only
)
45 define Package
/hostapd-mini
/conffiles
49 define Package
/hostapd-utils
50 $(call Package
/hostapd
)
51 DEPENDS
:=@PACKAGE_hostapd||PACKAGE_hostapd-mini
52 TITLE
:=IEEE
802.1x Authenticator
(utils
)
53 DESCRIPTION
:=IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator
(command line utils
)
56 define Build
/ConfigureTarget
57 $(CP
) $(PKG_BUILD_DIR
) $(PKG_BUILD_DIR
)_
$(1)
58 $(CP
) .
/files
/$(1).config
$(PKG_BUILD_DIR
)_
$(1)/.config
61 define Build
/CompileTarget
62 $(MAKE
) -C
$(PKG_BUILD_DIR
)_
$(1) \
63 $(TARGET_CONFIGURE_OPTS
) \
64 OPTFLAGS
="$(TARGET_CFLAGS)" \
65 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/madwifi" \
66 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
68 $(CP
) $(PKG_BUILD_DIR
)_
$(1)/hostapd_cli
$(PKG_BUILD_DIR
)/
71 define Package
/InstallTemplate
72 if
[ \
! -f
"$(PKG_BUILD_DIR)_$(2)/hostapd" ]; then \
73 rm -f
$(PKG_BUILD_DIR
)/.built
; \
74 $(MAKE
) $(PKG_BUILD_DIR
)/.built
; \
76 install -m0755
-d
$$(1)/etc
77 install -m0600
$(PKG_BUILD_DIR
)_
$(2)/madwifi.conf
$$(1)/etc
/hostapd.conf
78 install -m0755
-d
$$(1)/usr
/sbin
79 install -m0755
$(PKG_BUILD_DIR
)_
$(2)/hostapd
$$(1)/usr
/sbin
/
82 define Package
/Template
83 ifneq ($(CONFIG_PACKAGE_
$(1)),)
84 define Build
/Configure
/$(2)
85 $(call Build
/ConfigureTarget
,$(2))
87 define Build
/Compile
/$(2)
88 $(call Build
/CompileTarget
,$(2))
90 define Package
/$(1)/install
91 $(call Package
/InstallTemplate
,$(1),$(2))
96 define Build
/Configure
97 $(call Build
/Configure
/default
)
98 $(call Build
/Configure
/mini
)
102 $(call Build
/Compile
/default
)
103 $(call Build
/Compile
/mini
)
107 rm -rf
$(PKG_BUILD_DIR
)_default
108 rm -rf
$(PKG_BUILD_DIR
)_mini
111 define Package
/hostapd-utils
/install
112 install -m0755
-d
$(1)/usr
/sbin
113 install -m0755
$(PKG_BUILD_DIR
)/hostapd_cli
$(1)/usr
/sbin
/
116 $(eval
$(call Package
/Template
,hostapd
,default
))
117 $(eval
$(call Package
/Template
,hostapd-mini
,mini
))
119 $(eval
$(call BuildPackage
,hostapd
))
120 $(eval
$(call BuildPackage
,hostapd-mini
))
121 $(eval
$(call BuildPackage
,hostapd-utils
))