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
:=4e3134e8b0d86e831230f8c620fd81bb
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/hostapd
/Default
29 TITLE
:=IEEE
802.1x Authenticator
30 URL
:=http
://hostap.epitest.fi
/
33 define Package
/hostapd
34 $(call Package
/hostapd
/Default
)
38 This package contains a full featured IEEE
802.1x
/WPA
/EAP
/RADIUS
\\\
42 define Package
/hostapd
/conffiles
46 define Package
/hostapd-mini
47 $(call Package
/hostapd
/Default
)
48 TITLE
+= (WPA-PSK only
)
50 This package contains a minimal IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator
\\\
54 define Package
/hostapd-mini
/conffiles
58 define Package
/hostapd-utils
59 $(call Package
/hostapd
/Default
)
60 DEPENDS
:=@PACKAGE_hostapd||PACKAGE_hostapd-mini
63 This package contains a command line utility to control the
\\\
64 IEEE
802.1x
/WPA
/EAP
/RADIUS Authenticator.
67 define Build
/ConfigureTarget
68 $(CP
) $(PKG_BUILD_DIR
) $(PKG_BUILD_DIR
)_
$(1)
69 $(CP
) .
/files
/$(1).config
$(PKG_BUILD_DIR
)_
$(1)/.config
72 define Build
/CompileTarget
73 $(MAKE
) -C
$(PKG_BUILD_DIR
)_
$(1) \
74 $(TARGET_CONFIGURE_OPTS
) \
75 OPTFLAGS
="$(TARGET_CFLAGS)" \
76 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/madwifi" \
77 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
79 $(CP
) $(PKG_BUILD_DIR
)_
$(1)/hostapd_cli
$(PKG_BUILD_DIR
)/
82 define Package
/InstallTemplate
83 if
[ \
! -f
"$(PKG_BUILD_DIR)_$(2)/hostapd" ]; then \
84 rm -f
$(PKG_BUILD_DIR
)/.built
; \
85 $(MAKE
) $(PKG_BUILD_DIR
)/.built
; \
87 install -m0755
-d
$$(1)/etc
88 install -m0600
$(PKG_BUILD_DIR
)_
$(2)/madwifi.conf
$$(1)/etc
/hostapd.conf
89 install -m0755
-d
$$(1)/usr
/sbin
90 install -m0755
$(PKG_BUILD_DIR
)_
$(2)/hostapd
$$(1)/usr
/sbin
/
93 define Package
/Template
94 ifneq ($(CONFIG_PACKAGE_
$(1)),)
95 define Build
/Configure
/$(2)
96 $(call Build
/ConfigureTarget
,$(2))
98 define Build
/Compile
/$(2)
99 $(call Build
/CompileTarget
,$(2))
101 define Package
/$(1)/install
102 $(call Package
/InstallTemplate
,$(1),$(2))
107 define Build
/Configure
108 $(call Build
/Configure
/default
)
109 $(call Build
/Configure
/mini
)
113 $(call Build
/Compile
/default
)
114 $(call Build
/Compile
/mini
)
118 rm -rf
$(PKG_BUILD_DIR
)_default
119 rm -rf
$(PKG_BUILD_DIR
)_mini
122 define Package
/hostapd-utils
/install
123 install -m0755
-d
$(1)/usr
/sbin
124 install -m0755
$(PKG_BUILD_DIR
)/hostapd_cli
$(1)/usr
/sbin
/
127 $(eval
$(call Package
/Template
,hostapd
,default
))
128 $(eval
$(call Package
/Template
,hostapd-mini
,mini
))
130 $(eval
$(call BuildPackage
,hostapd
))
131 $(eval
$(call BuildPackage
,hostapd-mini
))
132 $(eval
$(call BuildPackage
,hostapd-utils
))