Makefile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ksmbd
  3. PKG_VERSION:=3.4.7
  4. PKG_RELEASE:=1
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://github.com/cifsd-team/ksmbd/releases/download/$(PKG_VERSION)
  7. PKG_HASH:=ed9ecb2232046054bf0c1fef41690890f99d93b1d72b7e7d158746ac9be18c7f
  8. PKG_LICENSE:=GPL-2.0-or-later
  9. PKG_LICENSE_FILES:=COPYING
  10. include $(INCLUDE_DIR)/kernel.mk
  11. include $(INCLUDE_DIR)/package.mk
  12. TAR_OPTIONS+= --strip-components 1
  13. TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
  14. define KernelPackage/fs-ksmbd
  15. SUBMENU:=Filesystems
  16. TITLE:=SMB kernel server support
  17. URL:=https://github.com/cifsd-team/cifsd
  18. FILES:=$(PKG_BUILD_DIR)/ksmbd.ko
  19. DEPENDS:= \
  20. +kmod-nls-base \
  21. +kmod-nls-utf8 \
  22. +kmod-crypto-md4 \
  23. +kmod-crypto-md5 \
  24. +kmod-crypto-hmac \
  25. +kmod-crypto-ecb \
  26. +kmod-crypto-des \
  27. +kmod-crypto-sha256 \
  28. +kmod-crypto-cmac \
  29. +kmod-crypto-sha512 \
  30. +kmod-crypto-aead \
  31. +kmod-crypto-ccm \
  32. +kmod-crypto-gcm \
  33. +kmod-asn1-decoder \
  34. +kmod-oid-registry
  35. endef
  36. # The last two DEPENDS are hacks in order to get CONFIG_ASN1 and CONFIG_OID_REGISTRY
  37. # which it seems can't be selected independently. Some bug in either base or upstream.
  38. define KernelPackage/fs-ksmbd/description
  39. Ksmbd is an In-kernel SMBv(1)2/3 fileserver.
  40. It's an implementation of the SMB protocol in kernel space for sharing files and IPC services over network.
  41. endef
  42. define KernelPackage/fs-ksmbd/config
  43. config KSMBD_SMB_INSECURE_SERVER
  44. bool "Support for insecure SMB1/CIFS and SMB2.0 protocols"
  45. depends on PACKAGE_kmod-fs-ksmbd
  46. help
  47. This enables deprecated insecure protocols dialects: SMB1/CIFS and SMB2.0.
  48. default y
  49. endef
  50. ifeq ($(CONFIG_KSMBD_SMB_INSECURE_SERVER),y)
  51. PKG_EXTRA_KCONFIG:=CONFIG_SMB_INSECURE_SERVER=y
  52. EXTRA_CFLAGS += -DCONFIG_SMB_INSECURE_SERVER=1
  53. endif
  54. define Build/Compile
  55. $(KERNEL_MAKE) M="$(PKG_BUILD_DIR)" \
  56. EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
  57. $(PKG_EXTRA_KCONFIG) \
  58. CONFIG_SMB_SERVER=m \
  59. modules
  60. endef
  61. $(eval $(call KernelPackage,fs-ksmbd))