add an hostapd-mini package with WPA support only, and move hostapd_cli in a
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 1 Apr 2006 14:40:44 +0000 (14:40 +0000)
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 1 Apr 2006 14:40:44 +0000 (14:40 +0000)
separate hostapd-utils package.

git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3564 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/hostapd/Config.in
package/hostapd/Makefile
package/hostapd/files/hostapd-mini.config [new file with mode: 0644]
package/hostapd/files/hostapd.config [moved from package/hostapd/files/config with 100% similarity]
package/hostapd/ipkg/hostapd-mini.conffiles [new file with mode: 0644]
package/hostapd/ipkg/hostapd-mini.control [new file with mode: 0644]
package/hostapd/ipkg/hostapd-utils.control [new file with mode: 0644]
package/hostapd/ipkg/hostapd.control

index db72ff02b293c20e0b39eaf8a8a7ed1b5e1b39f0..7a66d876dd6e3ddf7a14e94dbbd4b7a199736d21 100644 (file)
@@ -1,14 +1,61 @@
+config BR2_COMPILE_HOSTAPD
+       tristate
+       default n
+       depends BR2_PACKAGE_HOSTAPD || BR2_PACKAGE_HOSTAPD_MINI || BR2_PACKAGE_HOSTAPD_UTILS
+       select BR2_PACKAGE_KMOD_MADWIFI
+
 config BR2_PACKAGE_HOSTAPD
        prompt "hostapd........................... An IEEE 802.11 AP, IEEE 802.1x/WPA/WPA2/EAP/RADIUS Authenticator"
        tristate
        default m if CONFIG_DEVEL
-       select BR2_PACKAGE_KMOD_MADWIFI
+       select BR2_COMPILE_HOSTAPD
        select BR2_PACKAGE_LIBOPENSSL
        help
+         
+         hostapd is a user space daemon for access point and 
+         authentication servers. It implements IEEE 802.11 access point 
+         management, IEEE 802.1X/WPA/WPA2/EAP Authenticators, RADIUS 
+         client, EAP server, and RADIUS authentication server.
+         
+         http://hostap.epitest.fi/hostapd/
+       
+         Includes:
+          - hostapd
+
+config BR2_PACKAGE_HOSTAPD_MINI
+       prompt "hostapd-mini...................... An IEEE 802.11 AP, IEEE 802.1x/WPA/WPA2/EAP/RADIUS Authenticator (without EAP TLS/TTLS support)"
+       tristate
+       default m if CONFIG_DEVEL
+       select BR2_COMPILE_HOSTAPD
+       help
+         
+         hostapd is a user space daemon for access point and 
+         authentication servers. It implements IEEE 802.11 access point 
+         management, IEEE 802.1X/WPA/WPA2/EAP Authenticators, RADIUS 
+         client, EAP server, and RADIUS authentication server.
+         
+         http://hostap.epitest.fi/hostapd/
+       
+         Includes:
+          - hostapd (built with WPA support only)
+
+config BR2_PACKAGE_HOSTAPD_UTILS
+       prompt "hostapd-utils..................... An IEEE 802.11 AP, IEEE 802.1x/WPA/WPA2/EAP/RADIUS Authenticator (CLI utility)"
+       tristate
+       default m if CONFIG_DEVEL
+       select BR2_COMPILE_HOSTAPD
+       help
+         
          hostapd is a user space daemon for access point and 
          authentication servers. It implements IEEE 802.11 access point 
          management, IEEE 802.1X/WPA/WPA2/EAP Authenticators, RADIUS 
          client, EAP server, and RADIUS authentication server.
          
          http://hostap.epitest.fi/hostapd/
+       
+         Includes:
+          - hostapd_cli
 
+if (BR2_PACKAGE_HOSTAPD = y) && (BR2_PACKAGE_HOSTAPD_MINI = y)
+       comment "WARNING: both hostapd and hostapd-mini are selected for installation !"
+endif
index f8012569566a059d47234a99771fdf3f91e62e9c..ac45e7f7bcff75279d3838e36977a422621078f9 100644 (file)
@@ -16,31 +16,62 @@ PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
 
 include $(TOPDIR)/package/rules.mk
 
+define PKG_build
+
+ifneq ($(BR2_PACKAGE_$(1)),)
+BUILD_TARGETS += $(PKG_INSTALL_DIR)/$(2)/hostapd
+endif
+
+$(PKG_INSTALL_DIR)/$(2)/hostapd: $(PKG_BUILD_DIR)/.prepared
+       -$(MAKE) -C $(PKG_BUILD_DIR) clean
+       $(CP) ./files/$(2).config $(PKG_BUILD_DIR)/.config
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               $(TARGET_CONFIGURE_OPTS) \
+               OPTFLAGS="$(TARGET_CFLAGS)" \
+               CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/madwifi" \
+               LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
+               hostapd
+       mkdir -p $(PKG_INSTALL_DIR)/$(2)
+       $(CP) $(PKG_BUILD_DIR)/hostapd $(PKG_INSTALL_DIR)/$(2)/
+       touch $$@
+
+$$(IPKG_$(1)): $(PKG_INSTALL_DIR)/$(2)/hostapd
+       install -m0755 -d $$(IDIR_$(1))/etc
+       install -m0600 $(PKG_BUILD_DIR)/madwifi.conf $$(IDIR_$(1))/etc/hostapd.conf
+       install -m0755 -d $$(IDIR_$(1))/usr/sbin
+       install -m0755 $(PKG_INSTALL_DIR)/$(2)/hostapd $$(IDIR_$(1))/usr/sbin/
+       $(RSTRIP) $$(IDIR_$(1))
+       $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
+
+endef
+
 $(eval $(call PKG_template,HOSTAPD,hostapd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,HOSTAPD_MINI,hostapd-mini,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_template,HOSTAPD_UTILS,hostapd-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+
+$(eval $(call PKG_build,HOSTAPD,hostapd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
+$(eval $(call PKG_build,HOSTAPD_MINI,hostapd-mini,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
 
 $(PKG_BUILD_DIR)/.configured:
-       $(CP) ./files/config $(PKG_BUILD_DIR)/.config
+       $(CP) ./files/hostapd.config $(PKG_BUILD_DIR)/.config
        touch $@
 
-$(PKG_BUILD_DIR)/.built:
+$(PKG_BUILD_DIR)/.built: $(BUILD_TARGETS)
        $(MAKE) -C $(PKG_BUILD_DIR) \
                $(TARGET_CONFIGURE_OPTS) \
                OPTFLAGS="$(TARGET_CFLAGS)" \
-               CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/usr/include/madwifi" \
-               LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
-               all
+               CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include/madwifi" \
+               LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
+               hostapd_cli
        touch $@
 
-$(IPKG_HOSTAPD):
-       install -m0755 -d $(IDIR_HOSTAPD)/etc
-       install -m0600 $(PKG_BUILD_DIR)/madwifi.conf $(IDIR_HOSTAPD)/etc/hostapd.conf
-       install -m0755 -d $(IDIR_HOSTAPD)/usr/sbin
-       install -m0755 $(PKG_BUILD_DIR)/hostapd $(IDIR_HOSTAPD)/usr/sbin/
-       install -m0755 $(PKG_BUILD_DIR)/hostapd_cli $(IDIR_HOSTAPD)/usr/sbin/
-       $(RSTRIP) $(IDIR_HOSTAPD)
-       $(IPKG_BUILD) $(IDIR_HOSTAPD) $(PACKAGE_DIR)
+$(IPKG_HOSTAPD_UTILS): $(PKG_BUILD_DIR)/.built
+       install -m0755 -d $(IDIR_HOSTAPD_UTILS)/usr/sbin
+       install -m0755 $(PKG_BUILD_DIR)/hostapd_cli $(IDIR_HOSTAPD_UTILS)/usr/sbin/
+       $(RSTRIP) $(IDIR_HOSTAPD_UTILS)
+       $(IPKG_BUILD) $(IDIR_HOSTAPD_UTILS) $(PACKAGE_DIR)
 
 mostlyclean:
-       make -C $(PKG_BUILD_DIR) clean
-       rm $(PKG_BUILD_DIR)/.built
+       -$(MAKE) -C $(PKG_BUILD_DIR) clean
+       rm -f $(PKG_BUILD_DIR)/.built
 
diff --git a/package/hostapd/files/hostapd-mini.config b/package/hostapd/files/hostapd-mini.config
new file mode 100644 (file)
index 0000000..912bee8
--- /dev/null
@@ -0,0 +1,69 @@
+# Example hostapd build time configuration
+#
+# This file lists the configuration options that are used when building the
+# hostapd binary. All lines starting with # are ignored. Configuration option
+# lines must be commented out complete, if they are not to be included, i.e.,
+# just setting VARIABLE=n is not disabling that variable.
+#
+# This file is included in Makefile, so variables like CFLAGS and LIBS can also
+# be modified from here. In most cass, these lines should use += in order not
+# to override previous values of the variables.
+
+# Driver interface for Host AP driver
+CONFIG_DRIVER_HOSTAP=y
+
+# Driver interface for wired authenticator
+#CONFIG_DRIVER_WIRED=y
+
+# Driver interface for madwifi driver
+CONFIG_DRIVER_MADWIFI=y
+#CFLAGS += -I../head # change to reflect local setup; directory for madwifi src
+
+# Driver interface for Prism54 driver
+#CONFIG_DRIVER_PRISM54=y
+
+# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver)
+#CONFIG_DRIVER_BSD=y
+#CFLAGS += -I/usr/local/include
+#LIBS += -L/usr/local/lib
+
+# IEEE 802.11F/IAPP
+CONFIG_IAPP=y
+
+# WPA2/IEEE 802.11i RSN pre-authentication
+CONFIG_RSN_PREAUTH=y
+
+# Integrated EAP authenticator
+CONFIG_EAP=y
+
+# EAP-MD5 for the integrated EAP authenticator
+#CONFIG_EAP_MD5=y
+
+# EAP-TLS for the integrated EAP authenticator
+#CONFIG_EAP_TLS=y
+
+# EAP-MSCHAPv2 for the integrated EAP authenticator
+#CONFIG_EAP_MSCHAPV2=y
+
+# EAP-PEAP for the integrated EAP authenticator
+#CONFIG_EAP_PEAP=y
+
+# EAP-PSK for the integrated EAP authenticator
+CONFIG_EAP_PSK=y
+
+# EAP-GTC for the integrated EAP authenticator
+#CONFIG_EAP_GTC=y
+
+# EAP-TTLS for the integrated EAP authenticator
+#CONFIG_EAP_TTLS=y
+
+# EAP-SIM for the integrated EAP authenticator
+#CONFIG_EAP_SIM=y
+
+# PKCS#12 (PFX) support (used to read private key and certificate file from
+# a file that usually has extension .p12 or .pfx)
+#CONFIG_PKCS12=y
+
+# RADIUS authentication server. This provides access to the integrated EAP
+# authenticator from external hosts using RADIUS.
+#CONFIG_RADIUS_SERVER=y
diff --git a/package/hostapd/ipkg/hostapd-mini.conffiles b/package/hostapd/ipkg/hostapd-mini.conffiles
new file mode 100644 (file)
index 0000000..f619800
--- /dev/null
@@ -0,0 +1 @@
+/etc/hostapd.conf
diff --git a/package/hostapd/ipkg/hostapd-mini.control b/package/hostapd/ipkg/hostapd-mini.control
new file mode 100644 (file)
index 0000000..5118ba7
--- /dev/null
@@ -0,0 +1,5 @@
+Package: hostapd-mini
+Priority: optional
+Section: net
+Depends: kmod-madwifi
+Description: an IEEE 802.11 AP, IEEE 802.1x/WPA/WPA2/EAP/RADIUS Authenticator (with EAP/PSK only)
diff --git a/package/hostapd/ipkg/hostapd-utils.control b/package/hostapd/ipkg/hostapd-utils.control
new file mode 100644 (file)
index 0000000..5f8d82d
--- /dev/null
@@ -0,0 +1,5 @@
+Package: hostapd-utils
+Priority: optional
+Section: net
+Depends: hostapd
+Description: an IEEE 802.11 AP, IEEE 802.1x/WPA/WPA2/EAP/RADIUS Authenticator (CLI utility)
index 4ee883e6d602a0a010d19c2537b079f2d7225161..cb2dac672b2f9583efc65ed9e088c74c03c91af5 100644 (file)
@@ -2,4 +2,5 @@ Package: hostapd
 Priority: optional
 Section: net
 Depends: kmod-madwifi, libopenssl
+Provides: hostpad
 Description: an IEEE 802.11 AP, IEEE 802.1x/WPA/WPA2/EAP/RADIUS Authenticator