diff --git a/package/avahi/Config.in b/package/avahi/Config.in index 5e303d044e..95b01bfe92 100644 --- a/package/avahi/Config.in +++ b/package/avahi/Config.in @@ -42,6 +42,13 @@ config BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY Enable the libdns_sd (Bonjour) compatibility library support for legacy applications. +config BR2_PACKAGE_AVAHI_DEFAULT_SERVICES + bool "install default service definitions" + depends on BR2_PACKAGE_AVAHI_DAEMON + help + Install the SSH/SFTP service definitions included with the + Avahi daemon by default. + endif comment "avahi needs a toolchain w/ threads" diff --git a/package/avahi/avahi.mk b/package/avahi/avahi.mk index 9de6ebc4d2..13e2106014 100644 --- a/package/avahi/avahi.mk +++ b/package/avahi/avahi.mk @@ -193,4 +193,13 @@ endef AVAHI_POST_INSTALL_STAGING_HOOKS += AVAHI_STAGING_INSTALL_LIBDNSSD_LINK endif +ifeq ($(BR2_PACKAGE_AVAHI_DEFAULT_SERVICES),) +define AVAHI_REMOVE_DEFAULT_SERVICES + $(foreach service,ssh sftp-ssh, \ + $(RM) -f $(TARGET_DIR)/etc/avahi/services/$(service).service + ) +endef +AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_REMOVE_DEFAULT_SERVICES +endif + $(eval $(autotools-package))