From 36b0e0bc34ec9e95ed37918348eec31e40e6a4a8 Mon Sep 17 00:00:00 2001 From: Andy Walsh Date: Wed, 29 Jan 2020 21:57:25 +0100 Subject: [PATCH] ksmbd-tools: add avahi service file package * add avahi service file package, so linux clients can discover ksmbd shares Signed-off-by: Andy Walsh --- net/ksmbd-tools/Makefile | 25 ++++++++++++++++++++++++- net/ksmbd-tools/files/smb.service | 9 +++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 net/ksmbd-tools/files/smb.service diff --git a/net/ksmbd-tools/Makefile b/net/ksmbd-tools/Makefile index 5543a7fe1f..320b403a48 100644 --- a/net/ksmbd-tools/Makefile +++ b/net/ksmbd-tools/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ksmbd-tools PKG_VERSION:=3.1.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/cifsd-team/$(PKG_NAME)/archive/$(PKG_VERSION)/ @@ -73,6 +73,19 @@ define Package/ksmbd-utils/config default n endef +define Package/ksmbd-avahi-service + $(call Package/ksmbd-tools/Default) + TITLE+= (Avahi service) + DEPENDS+=+avahi-daemon +endef + +define Package/ksmbd-avahi-service/description + installs: smb.service + + This package contains the service definition for announcing the + Ksmbd (smb/445) Daemon service via mDNS/DNS-SD. +endef + CONFIGURE_ARGS += \ --disable-shared \ --enable-static @@ -102,6 +115,11 @@ ifeq ($(CONFIG_KSMBD_UTILS_SHAREADD),y) endif endef +define Package/ksmbd-avahi-service/install + $(INSTALL_DIR) $(1)/etc/avahi/services + $(INSTALL_DATA) ./files/smb.service $(1)/etc/avahi/services/ +endef + define Package/ksmbd-server/conffiles /etc/config/ksmbd /etc/ksmbd/smb.conf.template @@ -109,5 +127,10 @@ define Package/ksmbd-server/conffiles /etc/ksmbd/ksmbdpwd.db endef +define Package/ksmbd-avahi-service/conffiles +/etc/avahi/services/smb.service +endef + $(eval $(call BuildPackage,ksmbd-server)) $(eval $(call BuildPackage,ksmbd-utils)) +$(eval $(call BuildPackage,ksmbd-avahi-service)) diff --git a/net/ksmbd-tools/files/smb.service b/net/ksmbd-tools/files/smb.service new file mode 100644 index 0000000000..24e6430361 --- /dev/null +++ b/net/ksmbd-tools/files/smb.service @@ -0,0 +1,9 @@ + + + + %h + + _smb._tcp + 445 + + -- 2.30.2