hostapd: cleanup package definition

Move common variables and/or values to the package (variant) default.
Add additional values in variant packages if necessary. Remove further
duplicates by introducing new templates.

Remove the ANY_[HOSTAPD|SUPPLICANT_PROVIDERS]_PROVIDERS. The are the
same as the variables without the any prefix. No need to maintain both
variables.

Signed-off-by: Mathias Kresin <dev@kresin.me>
This commit is contained in:
Mathias Kresin 2018-07-10 21:17:33 +02:00
parent 9d5a246930
commit 8af8ceb1c8

View file

@ -45,8 +45,6 @@ EAPOL_TEST_PROVIDERS:=eapol-test eapol-test-openssl eapol-test-wolfssl
SUPPLICANT_PROVIDERS:=$(WPAD_PROVIDERS) $(SUPPLICANT_ONLY_PROVIDERS) SUPPLICANT_PROVIDERS:=$(WPAD_PROVIDERS) $(SUPPLICANT_ONLY_PROVIDERS)
HOSTAPD_PROVIDERS:=$(WPAD_PROVIDERS) $(HOSTAPD_ONLY_PROVIDERS) HOSTAPD_PROVIDERS:=$(WPAD_PROVIDERS) $(HOSTAPD_ONLY_PROVIDERS)
ANY_SUPPLICANT_PROVIDERS:=$(WPAD_PROVIDERS) $(SUPPLICANT_ONLY_PROVIDERS)
ANY_HOSTAPD_PROVIDERS:=$(WPAD_PROVIDERS) $(HOSTAPD_ONLY_PROVIDERS)
ANY_PROVIDERS:=$(WPAD_PROVIDERS) $(SUPPLICANT_ONLY_PROVIDERS) $(HOSTAPD_ONLY_PROVIDERS) ANY_PROVIDERS:=$(WPAD_PROVIDERS) $(SUPPLICANT_ONLY_PROVIDERS) $(HOSTAPD_ONLY_PROVIDERS)
LOCAL_TYPE=$(strip \ LOCAL_TYPE=$(strip \
@ -147,12 +145,14 @@ endif
DRV_DEPENDS:=+PACKAGE_kmod-cfg80211:libnl-tiny DRV_DEPENDS:=+PACKAGE_kmod-cfg80211:libnl-tiny
define Package/hostapd/Default define Package/hostapd/Default
SECTION:=net SECTION:=net
CATEGORY:=Network CATEGORY:=Network
TITLE:=IEEE 802.1x Authenticator TITLE:=IEEE 802.1x Authenticator
URL:=http://hostap.epitest.fi/ URL:=http://hostap.epitest.fi/
DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
PROVIDES:=hostapd
endef endef
define Package/hostapd define Package/hostapd
@ -161,30 +161,29 @@ $(call Package/hostapd/Default)
VARIANT:=full-internal VARIANT:=full-internal
endef endef
define Package/hostapd/description
This package contains a full featured IEEE 802.1x/WPA/EAP/RADIUS
Authenticator.
endef
define Package/hostapd-openssl define Package/hostapd-openssl
$(call Package/hostapd/Default) $(call Package/hostapd/Default)
TITLE+= (full) TITLE+= (full)
VARIANT:=full-openssl VARIANT:=full-openssl
DEPENDS+=+libopenssl DEPENDS+=+libopenssl
CONFLICTS:=$(filter-out hostapd-openssl ,$(HOSTAPD_ONLY_PROVIDERS)) CONFLICTS:=$(filter-out hostapd-openssl ,$(HOSTAPD_ONLY_PROVIDERS))
PROVIDES:=hostapd
endef endef
Package/hostapd-openssl/description = $(Package/hostapd/description)
define Package/hostapd-wolfssl define Package/hostapd-wolfssl
$(call Package/hostapd/Default) $(call Package/hostapd/Default)
TITLE+= (full) TITLE+= (full)
VARIANT:=full-wolfssl VARIANT:=full-wolfssl
DEPENDS+=+libwolfssl DEPENDS+=+libwolfssl
CONFLICTS:=$(filter-out hostapd-openssl ,$(filter-out hostapd-wolfssl ,$(HOSTAPD_ONLY_PROVIDERS))) CONFLICTS:=$(filter-out hostapd-openssl ,$(filter-out hostapd-wolfssl ,$(HOSTAPD_ONLY_PROVIDERS)))
PROVIDES:=hostapd
endef endef
define Package/hostapd/description
This package contains a full featured IEEE 802.1x/WPA/EAP/RADIUS
Authenticator.
endef
Package/hostapd-openssl/description = $(Package/hostapd/description)
Package/hostapd-wolfssl/description = $(Package/hostapd/description) Package/hostapd-wolfssl/description = $(Package/hostapd/description)
define Package/hostapd-mini define Package/hostapd-mini
@ -192,18 +191,18 @@ $(call Package/hostapd/Default)
TITLE+= (WPA-PSK only) TITLE+= (WPA-PSK only)
VARIANT:=mini VARIANT:=mini
CONFLICTS:=$(filter-out hostapd-wolfssl ,$(filter-out hostapd-openssl ,$(filter-out hostapd-mini ,$(HOSTAPD_ONLY_PROVIDERS)))) CONFLICTS:=$(filter-out hostapd-wolfssl ,$(filter-out hostapd-openssl ,$(filter-out hostapd-mini ,$(HOSTAPD_ONLY_PROVIDERS))))
PROVIDES:=hostapd
endef endef
define Package/hostapd-mini/description define Package/hostapd-mini/description
This package contains a minimal IEEE 802.1x/WPA Authenticator (WPA-PSK only). This package contains a minimal IEEE 802.1x/WPA Authenticator (WPA-PSK only).
endef endef
define Package/hostapd-utils define Package/hostapd-utils
$(call Package/hostapd/Default) SECTION:=net
TITLE+= (utils) CATEGORY:=Network
DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(ANY_HOSTAPD_PROVIDERS),PACKAGE_$(pkg))) TITLE:=IEEE 802.1x Authenticator (utils)
URL:=http://hostap.epitest.fi/
DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(HOSTAPD_PROVIDERS),PACKAGE_$(pkg)))
endef endef
define Package/hostapd-utils/description define Package/hostapd-utils/description
@ -211,6 +210,7 @@ define Package/hostapd-utils/description
IEEE 802.1x/WPA/EAP/RADIUS Authenticator. IEEE 802.1x/WPA/EAP/RADIUS Authenticator.
endef endef
define Package/wpad/Default define Package/wpad/Default
SECTION:=net SECTION:=net
CATEGORY:=Network CATEGORY:=Network
@ -234,6 +234,11 @@ $(call Package/wpad/Default)
)))))) ))))))
endef endef
define Package/wpad/description
This package contains a full featured IEEE 802.1x/WPA/EAP/RADIUS
Authenticator and Supplicant
endef
define Package/wpad-openssl define Package/wpad-openssl
$(call Package/wpad/Default) $(call Package/wpad/Default)
TITLE+= (full) TITLE+= (full)
@ -245,6 +250,8 @@ $(call Package/wpad/Default)
$(ANY_PROVIDERS)))) $(ANY_PROVIDERS))))
endef endef
Package/wpad-openssl/description = $(Package/wpad/description)
define Package/wpad-wolfssl define Package/wpad-wolfssl
$(call Package/wpad/Default) $(call Package/wpad/Default)
TITLE+= (full) TITLE+= (full)
@ -257,12 +264,6 @@ $(call Package/wpad/Default)
$(ANY_PROVIDERS))))) $(ANY_PROVIDERS)))))
endef endef
define Package/wpad/description
This package contains a full featured IEEE 802.1x/WPA/EAP/RADIUS
Authenticator and Supplicant
endef
Package/wpad-openssl/description = $(Package/wpad/description)
Package/wpad-wolfssl/description = $(Package/wpad/description) Package/wpad-wolfssl/description = $(Package/wpad/description)
define Package/wpad-mini define Package/wpad-mini
@ -276,21 +277,10 @@ define Package/wpad-mini/description
This package contains a minimal IEEE 802.1x/WPA Authenticator and Supplicant (WPA-PSK only). This package contains a minimal IEEE 802.1x/WPA Authenticator and Supplicant (WPA-PSK only).
endef endef
define Package/wpad-mesh-openssl define Package/wpad-mesh
$(call Package/wpad/Default) $(call Package/wpad/Default)
TITLE+= (with 802.11s mesh and SAE support) TITLE+= (with 802.11s mesh and SAE support)
DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN) +libopenssl DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN)
VARIANT:=wpad-mesh-openssl
CONFLICTS:=$(filter-out wpad-mesh-openssl ,$(ANY_PROVIDERS))
PROVIDES+=wpa-supplicant-mesh wpad-mesh
endef
define Package/wpad-mesh-wolfssl
$(call Package/wpad/Default)
TITLE+= (with 802.11s mesh and SAE support)
DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN) +libwolfssl
VARIANT:=wpad-mesh-wolfssl
CONFLICTS:=$(filter-out wpad-mesh-openssl ,$(filter-out wpad-mesh-wolfssl ,$(ANY_PROVIDERS)))
PROVIDES+=wpa-supplicant-mesh wpad-mesh PROVIDES+=wpa-supplicant-mesh wpad-mesh
endef endef
@ -298,15 +288,32 @@ define Package/wpad-mesh/description
This package contains a minimal IEEE 802.1x/WPA Authenticator and Supplicant (with 802.11s mesh and SAE support). This package contains a minimal IEEE 802.1x/WPA Authenticator and Supplicant (with 802.11s mesh and SAE support).
endef endef
define Package/wpad-mesh-openssl
$(call Package/wpad-mesh)
DEPENDS+=+libopenssl
VARIANT:=wpad-mesh-openssl
CONFLICTS:=$(filter-out wpad-mesh-openssl ,$(ANY_PROVIDERS))
endef
Package/wpad-mesh-openssl/description = $(Package/wpad-mesh/description) Package/wpad-mesh-openssl/description = $(Package/wpad-mesh/description)
define Package/wpad-mesh-wolfssl
$(call Package/wpad-mesh)
DEPENDS+=+libwolfssl
VARIANT:=wpad-mesh-wolfssl
CONFLICTS:=$(filter-out wpad-mesh-openssl ,$(filter-out wpad-mesh-wolfssl ,$(ANY_PROVIDERS)))
endef
Package/wpad-mesh-wolfssl/description = $(Package/wpad-mesh/description) Package/wpad-mesh-wolfssl/description = $(Package/wpad-mesh/description)
define Package/wpa-supplicant/Default define Package/wpa-supplicant/Default
SECTION:=net SECTION:=net
CATEGORY:=Network CATEGORY:=Network
TITLE:=WPA Supplicant TITLE:=WPA Supplicant
URL:=http://hostap.epitest.fi/wpa_supplicant/ URL:=http://hostap.epitest.fi/wpa_supplicant/
DEPENDS:=$(DRV_DEPENDS) DEPENDS:=$(DRV_DEPENDS)
PROVIDES:=wpa-supplicant
endef endef
define Package/wpa-supplicant define Package/wpa-supplicant
@ -325,7 +332,6 @@ define Package/wpa-supplicant-openssl
)))) ))))
VARIANT:=supplicant-full-openssl VARIANT:=supplicant-full-openssl
DEPENDS+=+libopenssl DEPENDS+=+libopenssl
PROVIDES:=wpa-supplicant
endef endef
define Package/wpa-supplicant-wolfssl define Package/wpa-supplicant-wolfssl
@ -338,7 +344,6 @@ define Package/wpa-supplicant-wolfssl
)))) ))))
VARIANT:=supplicant-full-wolfssl VARIANT:=supplicant-full-wolfssl
DEPENDS+=+libwolfssl DEPENDS+=+libwolfssl
PROVIDES:=wpa-supplicant
endef endef
define Package/wpa-supplicant/config define Package/wpa-supplicant/config
@ -346,9 +351,9 @@ define Package/wpa-supplicant/config
endef endef
define Package/wpa-supplicant-p2p define Package/wpa-supplicant-p2p
$(Package/wpa-supplicant) $(Package/wpa-supplicant/Default)
TITLE:=WPA Supplicant (with Wi-Fi P2P support) TITLE+= (with Wi-Fi P2P support)
DEPENDS:=$(DRV_DEPENDS) @PACKAGE_kmod-cfg80211 DEPENDS+=@PACKAGE_kmod-cfg80211
CONFLICTS:=$(filter-out wpa-supplicant-openssl ,\ CONFLICTS:=$(filter-out wpa-supplicant-openssl ,\
$(filter-out wpa-supplicant-wolfssl ,\ $(filter-out wpa-supplicant-wolfssl ,\
$(filter-out wpa-supplicant-p2p ,\ $(filter-out wpa-supplicant-p2p ,\
@ -357,14 +362,13 @@ define Package/wpa-supplicant-p2p
$(SUPPLICANT_ONLY_PROVIDERS)\ $(SUPPLICANT_ONLY_PROVIDERS)\
))))) )))))
VARIANT:=supplicant-p2p-internal VARIANT:=supplicant-p2p-internal
PROVIDES:=wpa-supplicant
endef endef
define Package/wpa-supplicant-mesh/Default define Package/wpa-supplicant-mesh/Default
$(Package/wpa-supplicant/Default) $(Package/wpa-supplicant/Default)
TITLE:=WPA Supplicant (with 802.11s and SAE) TITLE+= (with 802.11s and SAE)
DEPENDS:=$(DRV_DEPENDS) @PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN) DEPENDS+=@PACKAGE_kmod-cfg80211 @(!TARGET_uml||BROKEN)
PROVIDES:=wpa-supplicant wpa-supplicant-mesh PROVIDES+=wpa-supplicant-mesh
endef endef
define Package/wpa-supplicant-mesh-openssl define Package/wpa-supplicant-mesh-openssl
@ -383,16 +387,14 @@ endef
define Package/wpa-supplicant-mini define Package/wpa-supplicant-mini
$(Package/wpa-supplicant/Default) $(Package/wpa-supplicant/Default)
TITLE:=WPA Supplicant (minimal version) TITLE+= (minimal version)
DEPENDS:=$(DRV_DEPENDS)
VARIANT:=supplicant-mini VARIANT:=supplicant-mini
PROVIDES:=wpa-supplicant
endef endef
define Package/wpa-cli define Package/wpa-cli
SECTION:=net SECTION:=net
CATEGORY:=Network CATEGORY:=Network
DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(ANY_SUPPLICANT_PROVIDERS),PACKAGE_$(pkg))) DEPENDS:=@$(subst $(space),||,$(foreach pkg,$(SUPPLICANT_PROVIDERS),PACKAGE_$(pkg)))
TITLE:=WPA Supplicant command line control utility TITLE:=WPA Supplicant command line control utility
endef endef