wpa-supplicant: add options to enable the new DBus interface
authorSven Neumann <s.neumann@raumfeld.com>
Mon, 17 Dec 2012 21:52:46 +0000 (21:52 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 14 Jan 2013 19:46:21 +0000 (20:46 +0100)
Allow to configure the DBus interfaces that the wpa_supplicant
binary should support (old or new or both). Also allow to
enable introspection support on the new DBus interface.

Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
 (build-test with all features enabled)
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/wpa_supplicant/Config.in
package/wpa_supplicant/wpa_supplicant.mk

index d7cefe3cb60978596aca76684fb93f79b9293cb5..8b0b366936f6e4730bc8deb35271565607f03a51 100644 (file)
@@ -30,6 +30,25 @@ config BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT
          (optionally, with WPS); this links in parts of hostapd functionality
          into wpa_supplicant.
 
+config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_OLD
+       bool "Enable support for old DBus control interface"
+       depends on BR2_PACKAGE_DBUS
+       help
+         Enable support for old DBus control interface
+         (fi.epitest.hostap.WPASupplicant).
+
+config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW
+       bool "Enable support for new DBus control interface"
+       depends on BR2_PACKAGE_DBUS
+       help
+         Enable support for new DBus control interface (fi.w1.wpa_supplicant1).
+
+config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_INTROSPECTION
+       bool "Introspection support"
+       depends on BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW
+       help
+         Add introspection support for new DBus control interface.
+
 config BR2_PACKAGE_WPA_SUPPLICANT_WPS
        bool "Enable support for WPS"
        help
index 3830d6549e196055288e60e73e7878b6baac23e4..02ca125604b72701663cffc02759990ff6a13037 100644 (file)
@@ -10,7 +10,8 @@ WPA_SUPPLICANT_LICENSE = GPLv2/BSD-3c
 WPA_SUPPLICANT_LICENSE_FILES = README
 WPA_SUPPLICANT_CONFIG = $(WPA_SUPPLICANT_DIR)/wpa_supplicant/.config
 WPA_SUPPLICANT_SUBDIR = wpa_supplicant
-WPA_SUPPLICANT_DBUS_SERVICE = fi.epitest.hostap.WPASupplicant
+WPA_SUPPLICANT_DBUS_OLD_SERVICE = fi.epitest.hostap.WPASupplicant
+WPA_SUPPLICANT_DBUS_NEW_SERVICE = fi.w1.wpa_supplicant1
 WPA_SUPPLICANT_CFLAGS = $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/libnl3/
 WPA_SUPPLICANT_LDFLAGS = $(TARGET_LDFLAGS)
 
@@ -77,9 +78,41 @@ ifeq ($(BR2_PACKAGE_DBUS),y)
        WPA_SUPPLICANT_MAKE_ENV = \
                PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \
                PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig"
-define WPA_SUPPLICANT_DBUS_CONFIG
+
+ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_OLD),y)
+define WPA_SUPPLICANT_DBUS_OLD_CONFIG
        $(SED) 's/\(#\)\(CONFIG_CTRL_IFACE_DBUS=\)/\2/' $(WPA_SUPPLICANT_CONFIG)
 endef
+define WPA_SUPPLICANT_INSTALL_DBUS_OLD
+       $(INSTALL) -D \
+         $(@D)/wpa_supplicant/dbus/$(WPA_SUPPLICANT_DBUS_OLD_SERVICE).service \
+         $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_OLD_SERVICE).service
+endef
+endif
+
+ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW),y)
+define WPA_SUPPLICANT_DBUS_NEW_CONFIG
+       $(SED) 's/\(#\)\(CONFIG_CTRL_IFACE_DBUS_NEW=\)/\2/' $(WPA_SUPPLICANT_CONFIG)
+endef
+define WPA_SUPPLICANT_INSTALL_DBUS_NEW
+       $(INSTALL) -D \
+         $(@D)/wpa_supplicant/dbus/$(WPA_SUPPLICANT_DBUS_NEW_SERVICE).service \
+         $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_NEW_SERVICE).service
+endef
+endif
+
+ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_INTROSPECTION),y)
+define WPA_SUPPLICANT_DBUS_INTROSPECTION_CONFIG
+       $(SED) 's/\(#\)\(CONFIG_CTRL_IFACE_DBUS_INTRO=\)/\2/' $(WPA_SUPPLICANT_CONFIG)
+endef
+endif
+
+define WPA_SUPPLICANT_DBUS_CONFIG
+       $(WPA_SUPPLICANT_DBUS_OLD_CONFIG)
+       $(WPA_SUPPLICANT_DBUS_NEW_CONFIG)
+       $(WPA_SUPPLICANT_DBUS_INTROSPECTION_CONFIG)
+endef
+
 endif
 
 define WPA_SUPPLICANT_CONFIGURE_CMDS
@@ -124,9 +157,8 @@ define WPA_SUPPLICANT_INSTALL_DBUS
        $(INSTALL) -D \
          $(@D)/wpa_supplicant/dbus/dbus-wpa_supplicant.conf \
          $(TARGET_DIR)/etc/dbus-1/system.d/wpa_supplicant.conf
-       $(INSTALL) -D \
-         $(@D)/wpa_supplicant/dbus/$(WPA_SUPPLICANT_DBUS_SERVICE).service \
-         $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_SERVICE).service
+       $(WPA_SUPPLICANT_INSTALL_DBUS_OLD)
+       $(WPA_SUPPLICANT_INSTALL_DBUS_NEW)
 endef
 endif