2020-01-26 15:32:53 +00:00
i n c l u d e $( TOPDIR ) / r u l e s . m k
PKG_NAME := ksmbd-tools
2021-02-03 22:45:06 +00:00
PKG_VERSION := 3.3.4
PKG_RELEASE := 1
2020-01-26 15:32:53 +00:00
PKG_SOURCE := $( PKG_NAME) -$( PKG_VERSION) .tar.gz
2020-06-01 03:03:55 +00:00
PKG_SOURCE_URL := https://codeload.github.com/cifsd-team/ksmbd-tools/tar.gz/$( PKG_VERSION) ?
2021-02-03 22:45:06 +00:00
PKG_HASH := f7065da4008292bcaf43b15190715b4f224919f7d60f18b79b836eab6ee6d43b
2020-01-26 15:32:53 +00:00
PKG_MAINTAINER := Andy Walsh <andy.walsh44+github@gmail.com>
PKG_LICENSE := GPL-2.0-or-later
PKG_LICENSE_FILES := COPYING
PKG_FIXUP := autoreconf
2020-02-09 22:25:56 +00:00
PKG_REMOVE_FILES := autogen.sh
2020-01-26 15:32:53 +00:00
PKG_INSTALL := 1
PKG_BUILD_PARALLEL := 1
PKG_BUILD_DEPENDS := glib2
i n c l u d e $( INCLUDE_DIR ) / p a c k a g e . m k
i n c l u d e $( INCLUDE_DIR ) / n l s . m k
2020-02-09 22:25:56 +00:00
TAR_OPTIONS += --strip-components 1
TAR_CMD = $( HOST_TAR) -C $( 1) $( TAR_OPTIONS)
2020-01-26 15:32:53 +00:00
d e f i n e P a c k a g e / k s m b d - t o o l s / D e f a u l t
SECTION:= net
CATEGORY:= Network
SUBMENU:= Filesystem
TITLE:= Kernel SMB
2020-02-09 22:25:56 +00:00
URL:= https://github.com/cifsd-team/cifsd-tools
2020-01-26 15:32:53 +00:00
DEPENDS:= $( ICONV_DEPENDS) $( INTL_DEPENDS)
e n d e f
d e f i n e P a c k a g e / k s m b d - t o o l s / D e f a u l t / d e s c r i p t i o n
Userspace tools to manage the SMB kernel fileserver ( ksmbd.ko) .
The config file location is /etc/ksmbd/smb.conf
e n d e f
d e f i n e P a c k a g e / k s m b d - s e r v e r
$( call Package/ksmbd-tools/Default)
TITLE += server
DEPENDS += +kmod-fs-ksmbd +libnl-core +libnl-genl
e n d e f
d e f i n e P a c k a g e / k s m b d - s e r v e r / d e s c r i p t i o n
2020-02-09 22:25:56 +00:00
installs: ksmbd.mountd
2020-01-26 15:32:53 +00:00
This provides the basic fileserver service and is the minimum needed to serve 'guest only' file shares or use a existing user database file ksmbdpwd.db.
e n d e f
d e f i n e P a c k a g e / k s m b d - s e r v e r / c o n f i g
select PACKAGE_wsdd2
e n d e f
d e f i n e P a c k a g e / k s m b d - u t i l s
$( call Package/ksmbd-tools/Default)
TITLE += user management-util
e n d e f
d e f i n e P a c k a g e / k s m b d - u t i l s / d e s c r i p t i o n
2020-02-09 22:25:56 +00:00
installs: ksmbd.adduser ( ksmbd.addshare)
2020-01-26 15:32:53 +00:00
Tool needed to create the ksmbdpwd.db, to manage per user share passwords.
NOTE: Not needed for 'guest only' shares.
e n d e f
d e f i n e P a c k a g e / k s m b d - u t i l s / c o n f i g
config KSMBD_UTILS_SHAREADD
2020-02-09 22:25:56 +00:00
bool "Add ksmbd.addshare util"
2020-01-26 15:32:53 +00:00
depends on PACKAGE_ksmbd-utils
help
2020-02-09 22:25:56 +00:00
Add the ksmbd.addshare tool, to directly manipulate the /etc/ksmbd/smb.conf.
2020-01-26 15:32:53 +00:00
default n
e n d e f
2020-01-29 20:57:25 +00:00
d e f i n e P a c k a g e / k s m b d - a v a h i - s e r v i c e
$( call Package/ksmbd-tools/Default)
TITLE += ( Avahi service)
2020-02-09 22:25:56 +00:00
DEPENDS:= +avahi-daemon
2020-01-29 20:57:25 +00:00
e n d e f
d e f i n e P a c k a g e / k s m b d - a v a h i - s e r v i c e / d e s c r i p t i o n
installs: smb.service
This package contains the service definition for announcing the
Ksmbd ( smb/445) Daemon service via mDNS/DNS-SD.
e n d e f
2020-01-26 15:32:53 +00:00
CONFIGURE_ARGS += \
--disable-shared \
--enable-static
CONFIGURE_VARS += GLIB_LIBS = " $( STAGING_DIR) /usr/lib/libglib-2.0.a "
TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
2021-01-09 04:16:36 +00:00
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed -liconv $( if $( INTL_FULL) ,-lintl) $( if $( CONFIG_USE_GLIBC) ,-lpthread)
2020-01-26 15:32:53 +00:00
d e f i n e P a c k a g e / k s m b d - s e r v e r / i n s t a l l
$( INSTALL_DIR) $( 1) /usr/sbin
2020-02-09 22:25:56 +00:00
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/sbin/ksmbd.mountd $( 1) /usr/sbin/
2020-01-26 15:32:53 +00:00
$( INSTALL_DIR) $( 1) /etc/config $( 1) /etc/ksmbd $( 1) /etc/init.d
$( INSTALL_CONF) ./files/ksmbd.config $( 1) /etc/config/ksmbd
$( INSTALL_DATA) ./files/smb.conf.template $( 1) /etc/ksmbd/
$( INSTALL_BIN) ./files/ksmbd.init $( 1) /etc/init.d/ksmbd
# copy examples until we have a wiki page
$( INSTALL_DATA) ./files/ksmbd.config.example $( 1) /etc/ksmbd/
$( INSTALL_DATA) $( PKG_BUILD_DIR) /Documentation/configuration.txt $( 1) /etc/ksmbd/
e n d e f
d e f i n e P a c k a g e / k s m b d - u t i l s / i n s t a l l
$( INSTALL_DIR) $( 1) /usr/sbin
2020-02-09 22:25:56 +00:00
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/sbin/ksmbd.adduser $( 1) /usr/sbin/
2020-01-26 15:32:53 +00:00
i f e q ( $( CONFIG_KSMBD_UTILS_SHAREADD ) , y )
2020-02-09 22:25:56 +00:00
$( INSTALL_BIN) $( PKG_INSTALL_DIR) /usr/sbin/ksmbd.addshare $( 1) /usr/sbin/
2020-01-26 15:32:53 +00:00
e n d i f
e n d e f
2020-01-29 20:57:25 +00:00
d e f i n e P a c k a g e / k s m b d - a v a h i - s e r v i c e / i n s t a l l
$( INSTALL_DIR) $( 1) /etc/avahi/services
$( INSTALL_DATA) ./files/smb.service $( 1) /etc/avahi/services/
e n d e f
2020-01-26 15:32:53 +00:00
d e f i n e P a c k a g e / k s m b d - s e r v e r / c o n f f i l e s
/ e t c / c o n f i g / k s m b d
/ e t c / k s m b d / s m b . c o n f . t e m p l a t e
/ e t c / k s m b d / s m b . c o n f
/ e t c / k s m b d / k s m b d p w d . d b
e n d e f
2020-01-29 20:57:25 +00:00
d e f i n e P a c k a g e / k s m b d - a v a h i - s e r v i c e / c o n f f i l e s
/ e t c / a v a h i / s e r v i c e s / s m b . s e r v i c e
e n d e f
2020-01-26 15:32:53 +00:00
$( eval $ ( call BuildPackage ,ksmbd -server ) )
$( eval $ ( call BuildPackage ,ksmbd -utils ) )
2020-01-29 20:57:25 +00:00
$( eval $ ( call BuildPackage ,ksmbd -avahi -service ) )