Advertisement
Guest User

Untitled

a guest
Oct 9th, 2022
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 16.38 KB | Source Code | 0 0
  1. # Based partially on (wongsyrone/hbl0307106015) versions
  2. include $(TOPDIR)/rules.mk
  3.  
  4. PKG_NAME:=samba
  5. PKG_VERSION:=4.17.0
  6. PKG_RELEASE:=$(AUTORELEASE)
  7.  
  8. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  9. PKG_SOURCE_URL:= \
  10.         https://ftp.gwdg.de/pub/samba/stable/ \
  11.         https://ftp.heanet.ie/mirrors/ftp.samba.org/stable/ \
  12.         https://ftp.riken.jp/net/samba/samba/stable/ \
  13.         http://www.nic.funet.fi/index/samba/pub/samba/stable/ \
  14.         http://samba.mirror.bit.nl/samba/ftp/stable/ \
  15.         https://download.samba.org/pub/samba/stable/
  16. PKG_HASH:=04868ecda82fcbeda7b8bf519a2461a64d55c6e70efc6f6053b2fbba55f1823a
  17.  
  18. PKG_LICENSE:=GPL-3.0-only
  19. PKG_LICENSE_FILES:=COPYING
  20. PKG_CPE_ID:=cpe:/a:samba:samba
  21.  
  22. # samba4=(asn1_compile,compile_et) rpcsvc-proto=(rpcgen)
  23. HOST_BUILD_DEPENDS:=python3/host rpcsvc-proto/host perl/host perl-parse-yapp/host
  24. PKG_BUILD_DEPENDS:=samba4/host libtasn1/host perl/host
  25.  
  26. PKG_CONFIG_DEPENDS:= \
  27.     CONFIG_SAMBA4_SERVER_NETBIOS \
  28.     CONFIG_SAMBA4_SERVER_AVAHI \
  29.     CONFIG_SAMBA4_SERVER_VFS \
  30.     CONFIG_SAMBA4_SERVER_VFSX \
  31.     CONFIG_SAMBA4_SERVER_AD_DC \
  32.     CONFIG_PACKAGE_kmod-fs-btrfs \
  33.     CONFIG_PACKAGE_kmod-fs-xfs \
  34.     CONFIG_KERNEL_IO_URING
  35.  
  36. PYTHON3_PKG_BUILD:=0
  37.  
  38. include $(INCLUDE_DIR)/package.mk
  39. include $(INCLUDE_DIR)/host-build.mk
  40. include $(INCLUDE_DIR)/kernel.mk
  41. include $(INCLUDE_DIR)/version.mk
  42. include ../../lang/python/python3-host.mk
  43. include ../../lang/python/python3-package.mk
  44. include ../../lang/perl/perlver.mk
  45.  
  46. define Package/samba4/Default
  47.   SECTION:=net
  48.   CATEGORY:=Network
  49.   TITLE:=Samba $(PKG_VERSION)
  50.   URL:=https://www.samba.org/
  51. endef
  52.  
  53. define Package/samba4/Default/description
  54.   The Samba software suite is a collection of programs that implements the
  55.   SMB/CIFS protocol for UNIX systems, allowing you to serve files and printers.
  56.  
  57.   Samba 4 implements up-to protocol version SMB v3.1.1 (Win10), supports mDNS via AVAHI and a AD-DC setup via krb5.
  58.   NOTE: No cluster and printer support.
  59. endef
  60.  
  61. define Package/samba4-libs
  62.   $(call Package/samba4/Default)
  63.   TITLE+= libs
  64.   DEPENDS:= +libtirpc +libreadline +libpopt +libcap +zlib +libgnutls +libtasn1 +libuuid +libopenssl +libpthread +KERNEL_IO_URING:liburing \
  65.     +PACKAGE_libpam:libpam \
  66.     +SAMBA4_SERVER_VFS:attr \
  67.     +SAMBA4_SERVER_AVAHI:libavahi-client \
  68.     +SAMBA4_SERVER_AD_DC:python3-cryptodome +SAMBA4_SERVER_AD_DC:python3-markdown +SAMBA4_SERVER_AD_DC:python3-dns +SAMBA4_SERVER_AD_DC:libopenldap +SAMBA4_SERVER_AD_DC:jansson +SAMBA4_SERVER_AD_DC:libarchive +SAMBA4_SERVER_AD_DC:acl +SAMBA4_SERVER_AD_DC:attr
  69. endef
  70.  
  71. define Package/samba4-server
  72.   $(call Package/samba4/Default)
  73.   TITLE+= server
  74.   DEPENDS:= +samba4-libs
  75.   CONFLICTS:=samba36-server
  76. endef
  77.  
  78. define Package/samba4-server/description
  79.   installs: smbd (nmbd) smbpasswd pdbedit testparm (nmblookup) (smbcacls sharesec)
  80.             (samba samba-tool ntlm_auth samba-gpupdate samba_dnsupdate samba_kcc samba_spnupdate samba_upgradedns samba_downgrade_db)
  81.  
  82.   This provides the basic fileserver service and is the minimum needed to serve file shares.
  83.   HINT: https://fitzcarraldoblog.wordpress.com/2016/10/17/a-correct-method-of-configuring-samba-for-browsing-smb-shares-in-a-home-network/
  84. endef
  85.  
  86. define Package/samba4-server/config
  87.   source "$(SOURCE)/Config.in"
  88. endef
  89.  
  90. define Package/samba4-client
  91.   $(call Package/samba4/Default)
  92.   TITLE+= client
  93.   DEPENDS:= +samba4-libs
  94. endef
  95.  
  96. define Package/samba4-client/description
  97.   installs: cifsdd smbclient smbget
  98.  
  99.   The smbclient program implements a simple ftp-like client for accessing SMB shares
  100. endef
  101.  
  102. define Package/samba4-admin
  103.   $(call Package/samba4/Default)
  104.   TITLE+= admin tools
  105.   DEPENDS:= +samba4-libs
  106. endef
  107.  
  108. define Package/samba4-admin/description
  109.   installs: net smbcontrol profiles rpcclient dbwrap_tool eventlogadm
  110.             ldbadd ldbdel ldbedit ldbmodify ldbrename ldbsearch
  111.             tdbbackup tdbdump tdbrestore tdbtool
  112.  
  113.   Administration tools collection
  114. endef
  115.  
  116. define Package/samba4-utils
  117.   $(call Package/samba4/Default)
  118.   TITLE+= utils
  119.   DEPENDS:= +samba4-libs
  120. endef
  121.  
  122. define Package/samba4-utils/description
  123.   installs: smbstatus smbtree mvxattr smbtar smbcquotas
  124.  
  125.   Utilities collection
  126. endef
  127.  
  128. TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections
  129. TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
  130. # dont mess with sambas private rpath!
  131. RSTRIP:=:
  132.  
  133. CONFIGURE_VARS += \
  134.     CPP="$(TARGET_CROSS)cpp" \
  135.     XSLTPROC=false \
  136.     WAF_NO_PREFORK=1
  137.  
  138. CONFIGURE_CMD = ./buildtools/bin/waf
  139. HOST_CONFIGURE_CMD = ./buildtools/bin/waf
  140.  
  141. # Strip options that WAF configure script does not recognize
  142. CONFIGURE_ARGS:=$(filter-out    \
  143.     --target=%          \
  144.     --host=%            \
  145.     --build=%           \
  146.     --program-prefix=%  \
  147.     --program-suffix=%  \
  148.     --disable-nls       \
  149.     --disable-ipv6      \
  150.     , $(CONFIGURE_ARGS))
  151.  
  152. HOST_CONFIGURE_ARGS:=$(filter-out   \
  153.     --target=%          \
  154.     --host=%            \
  155.     --build=%           \
  156.     --program-prefix=%  \
  157.     --program-suffix=%  \
  158.     --disable-nls       \
  159.     --disable-ipv6      \
  160.     , $(HOST_CONFIGURE_ARGS))
  161.  
  162. # Waf needs the "configure" argument
  163. CONFIGURE_ARGS:=configure $(CONFIGURE_ARGS)
  164. HOST_CONFIGURE_ARGS:=configure $(HOST_CONFIGURE_ARGS)
  165.  
  166. CONFIGURE_ARGS += \
  167.         --hostcc="$(HOSTCC)" \
  168.         --cross-compile \
  169.         --cross-answers=cross-answers.txt \
  170.         --disable-cups \
  171.         --disable-iprint \
  172.         --disable-cephfs \
  173.         --disable-fault-handling \
  174.         --disable-glusterfs \
  175.         --disable-spotlight \
  176.         --enable-fhs \
  177.         --without-automount \
  178.         --without-iconv \
  179.         --without-lttng \
  180.         --without-pam \
  181.         --without-systemd \
  182.         --without-utmp \
  183.         --without-dmapi \
  184.         --without-fam \
  185.         --without-gettext \
  186.         --without-regedit \
  187.         --without-gpgme
  188.  
  189. HOST_CONFIGURE_ARGS += \
  190.         --hostcc="$(HOSTCC)" \
  191.         --disable-cups \
  192.         --disable-iprint \
  193.         --disable-cephfs \
  194.         --disable-fault-handling \
  195.         --disable-glusterfs \
  196.         --disable-spotlight \
  197.         --disable-rpath \
  198.         --disable-rpath-install \
  199.         --disable-rpath-private-install \
  200.         --enable-fhs \
  201.         --without-automount \
  202.         --without-iconv \
  203.         --without-lttng \
  204.         --without-pam \
  205.         --without-systemd \
  206.         --without-utmp \
  207.         --without-dmapi \
  208.         --without-fam \
  209.         --without-gettext \
  210.         --without-regedit \
  211.         --without-gpgme
  212.  
  213. HOST_CONFIGURE_ARGS += --disable-avahi --without-quotas --without-acl-support --without-winbind \
  214.     --without-ad-dc --without-json --without-libarchive --disable-python --nopyc --nopyo \
  215.     --without-ads --without-ldap --without-ldb-lmdb
  216.  
  217. # Optional AES-NI support - https://lists.samba.org/archive/samba-technical/2017-September/122738.html
  218. # Support for Nettle wasn't comitted
  219. ifdef CONFIG_TARGET_x86_64
  220.     CONFIGURE_ARGS += --accel-aes=intelaesni
  221. else
  222.     CONFIGURE_ARGS += --accel-aes=none
  223. endif
  224.  
  225. CONFIGURE_ARGS += \
  226.         --with-lockdir=/var/lock \
  227.         --with-logfilebase=/var/log \
  228.         --with-piddir=/var/run \
  229.         --with-privatedir=/etc/samba
  230.  
  231. # features
  232. ifeq ($(CONFIG_SAMBA4_SERVER_VFS),y)
  233.     CONFIGURE_ARGS += --with-quotas
  234. else
  235.     CONFIGURE_ARGS += --without-quotas
  236. endif
  237. ifeq ($(CONFIG_SAMBA4_SERVER_AVAHI),y)
  238.     CONFIGURE_ARGS += --enable-avahi
  239. else
  240.     CONFIGURE_ARGS += --disable-avahi
  241. endif
  242.  
  243. ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
  244.     CONFIGURE_ARGS += --without-winbind --without-ldb-lmdb --with-acl-support
  245. else
  246.     CONFIGURE_ARGS += --without-winbind --without-ads --without-ldap --without-ldb-lmdb --without-ad-dc \
  247.         --without-json --without-libarchive --disable-python --nopyc --nopyo --without-acl-support
  248. endif
  249.  
  250. SAMBA4_PDB_MODULES :=pdb_smbpasswd,pdb_tdbsam,
  251. SAMBA4_AUTH_MODULES :=auth_builtin,auth_sam,auth_unix,
  252. SAMBA4_VFS_MODULES :=vfs_default,
  253. SAMBA4_VFS_MODULES_SHARED :=auth_script,
  254. # always build if kernel supports io_uring
  255. ifdef CONFIG_KERNEL_IO_URING
  256.     SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_io_uring,
  257. endif
  258. ifeq ($(CONFIG_SAMBA4_SERVER_VFS),y)
  259.     SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_fruit,vfs_shadow_copy2,vfs_recycle,vfs_fake_perms,vfs_readonly,vfs_cap,vfs_offline,vfs_crossrename,vfs_catia,vfs_streams_xattr,vfs_xattr_tdb,vfs_default_quota,vfs_widelinks,
  260. ifdef CONFIG_PACKAGE_kmod-fs-btrfs
  261.     SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_btrfs,
  262. endif
  263. endif
  264. ifeq ($(CONFIG_SAMBA4_SERVER_VFSX),y)
  265.     SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_virusfilter,vfs_shell_snap,vfs_commit,vfs_worm,vfs_netatalk,vfs_dirsort,vfs_fileid,
  266. ifdef CONFIG_PACKAGE_kmod-fs-xfs
  267.     SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_linux_xfs_sgid,
  268. endif
  269. endif
  270. ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
  271.     SAMBA4_PDB_MODULES :=$(SAMBA4_PDB_MODULES)pdb_samba_dsdb,pdb_ldapsam,
  272.     SAMBA4_AUTH_MODULES :=$(SAMBA4_AUTH_MODULES)auth_samba4,
  273.     SAMBA4_VFS_MODULES :=$(SAMBA4_VFS_MODULES)vfs_posixacl,
  274.     SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_audit,vfs_extd_audit,vfs_full_audit,vfs_acl_xattr,vfs_acl_tdb,
  275.     # vfs_zfsacl needs https://github.com/zfsonlinux/zfs/tree/master/include/sys/zfs_acl.h
  276.     # vfs_nfs4acl_xattr needs https://github.com/notriddle/libdrpc/blob/master/rpc/xdr.h
  277. endif
  278.  
  279. SAMBA4_MODULES :=${SAMBA4_VFS_MODULES}${SAMBA4_AUTH_MODULES}${SAMBA4_PDB_MODULES}
  280. SAMBA4_MODULES_SHARDED :=${SAMBA4_VFS_MODULES_SHARED}
  281.  
  282. CONFIGURE_ARGS += \
  283.         --with-static-modules=$(SAMBA4_MODULES)!DEFAULT,!FORCED \
  284.         --with-shared-modules=$(SAMBA4_MODULES_SHARDED)!DEFAULT,!FORCED
  285.  
  286. HOST_CONFIGURE_ARGS += \
  287.         --with-static-modules=!DEFAULT,!FORCED \
  288.         --with-shared-modules=!DEFAULT,!FORCED
  289.  
  290. # lib bundling
  291. PY_VER:=$(PYTHON3_VERSION_MAJOR)$(PYTHON3_VERSION_MINOR)
  292. # NOTE: bundle + make private, we want to avoid version configuration (build, link) conflicts
  293. HOST_CONFIGURE_ARGS += --builtin-libraries=replace --nonshared-binary=asn1_compile,compile_et
  294. SYSTEM_PRIVATE_BUNDLED_LIBS:=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka,replace,com_err
  295. SYSTEM_BUNDLED_LIBS:=
  296. PYTHON_BUNDLED_LIBS:=pytalloc-util.cpython-$(PY_VER),pyldb-util.cpython-$(PY_VER)
  297. # CONFIGURE_ARGS += --builtin-libraries=talloc,tevent,tevent-util,texpect,tdb,ldb,tdr,cmocka,com_err
  298. ifdef CONFIG_KERNEL_IO_URING
  299.     SYSTEM_BUNDLED_LIBS:=,uring
  300. endif
  301. ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
  302.     CONFIGURE_ARGS += --bundled-libraries=NONE,$(SYSTEM_PRIVATE_BUNDLED_LIBS)$(SYSTEM_BUNDLED_LIBS),$(PYTHON_BUNDLED_LIBS)
  303. else
  304.     CONFIGURE_ARGS += --bundled-libraries=NONE,$(SYSTEM_PRIVATE_BUNDLED_LIBS)$(SYSTEM_BUNDLED_LIBS)
  305. endif
  306. CONFIGURE_ARGS += --private-libraries=$(SYSTEM_PRIVATE_BUNDLED_LIBS)
  307.  
  308. export COMPILE_ET=$(STAGING_DIR_HOSTPKG)/bin/compile_et_samba
  309. export ASN1_COMPILE=$(STAGING_DIR_HOSTPKG)/bin/asn1_compile_samba
  310. export PYTHONHASHSEED=1
  311.  
  312. # make sure we use the hostpkg build toolset and we need to find host 'yapp'
  313. HOST_CONFIGURE_VARS+= \
  314.     PATH="$(STAGING_DIR_HOSTPKG)/bin:$(STAGING_DIR_HOSTPKG)/usr/bin:$(PATH)"
  315. CONFIGURE_VARS += \
  316.     PATH="$(STAGING_DIR_HOSTPKG)/bin:$(STAGING_DIR_HOSTPKG)/usr/bin:$(PATH)"
  317.  
  318. # we need hostpkg bin and target config
  319. ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
  320.     CONFIGURE_VARS += \
  321.         PYTHON_CONFIG="$(STAGING_DIR)/host/bin/$(PYTHON3)-config"
  322. endif
  323.  
  324. # we dont need GnuTLS for the host helpers
  325. define Host/Prepare
  326.     $(call Host/Prepare/Default)
  327.     $(SED) 's,mandatory=True,mandatory=False,g' $(HOST_BUILD_DIR)/wscript_configure_system_gnutls
  328.     $(SED) 's,gnutls_version =.*,gnutls_version = gnutls_min_required_version,g' $(HOST_BUILD_DIR)/wscript_configure_system_gnutls
  329.     $(SED) 's,gnutls_version_str.*,gnutls_version_str = "3.7.7",g' $(HOST_BUILD_DIR)/wscript_configure_system_gnutls
  330.     $(SED) 's,(gnutls_version > .*,(parse_version(gnutls_version) > parse_version("3.6.10")):,g' $(HOST_BUILD_DIR)/wscript_configure_system_gnutls
  331.     $(SED) 's,(gnutls_version < .*,(parse_version(gnutls_version) < parse_version("3.5.2")):,g' $(HOST_BUILD_DIR)/wscript_configure_system_gnutls
  332. endef
  333. define Host/Compile
  334.     (cd $(HOST_BUILD_DIR); \
  335.         ./buildtools/bin/waf build \
  336.         --targets=asn1_compile,compile_et \
  337.     )
  338. endef
  339.  
  340. define Host/Install
  341.     $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
  342.     # add host tools suffix, prevent conflicts with krb5
  343.     $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/asn1_compile $(STAGING_DIR_HOSTPKG)/bin/asn1_compile_samba
  344.     $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/compile_et $(STAGING_DIR_HOSTPKG)/bin/compile_et_samba
  345. endef
  346.  
  347. define Build/Prepare
  348.     $(Build/Prepare/Default)
  349. ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),)
  350.     # un-bundle dnspython
  351.     $(SED) '/"dns.resolver":/d' $(PKG_BUILD_DIR)/third_party/wscript
  352.     # unbundle iso8601
  353.     $(SED) '/"iso8601":/d' $(PKG_BUILD_DIR)/third_party/wscript
  354. endif
  355. ifeq ($(CONFIG_HOST_OS_MACOS),y)
  356.     $(SED) "/^VERSION=/i sys.platform='linux'" $(PKG_BUILD_DIR)/buildtools/bin/waf
  357. endif
  358. endef
  359.  
  360. define Build/Configure
  361.     $(CP) ./waf-cross-answers/$(ARCH).txt $(PKG_BUILD_DIR)/cross-answers.txt
  362.     echo 'Checking uname sysname type: "$(VERSION_DIST)"' >> $(PKG_BUILD_DIR)/cross-answers.txt
  363.     echo 'Checking uname machine type: "$(ARCH)"' >> $(PKG_BUILD_DIR)/cross-answers.txt
  364.     echo 'Checking uname release type: "$(LINUX_VERSION)"' >> $(PKG_BUILD_DIR)/cross-answers.txt
  365.     echo 'Checking uname version type: "$(VERSION_DIST) Linux-$(LINUX_VERSION) $(shell date +%Y-%m-%d)"' >> $(PKG_BUILD_DIR)/cross-answers.txt
  366.     # NOTE: special answers for freeBSD/CircleCI
  367.     echo 'checking for clnt_create(): OK' >> $(PKG_BUILD_DIR)/cross-answers.txt
  368.     $(call Build/Configure/Default)
  369. endef
  370.  
  371. # Build via "waf install", avoid the make wrapper. (Samba logic is 'waf install' = build + install)
  372. define Build/Compile
  373.     (cd $(PKG_BUILD_DIR); \
  374.         ./buildtools/bin/waf install \
  375.         --jobs=$(shell nproc) \
  376.         --destdir="$(PKG_INSTALL_DIR)" \
  377.     )
  378. endef
  379.  
  380. # No default install see above
  381. define Build/Install
  382. endef
  383.  
  384. define Package/samba4-libs/install
  385.     $(INSTALL_DIR) $(1)/usr/lib
  386.     $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  387.     # rpath-install
  388.     $(CP) $(PKG_INSTALL_DIR)/usr/lib/samba $(1)/usr/lib/
  389. endef
  390.  
  391. define Package/samba4-client/install
  392.     $(INSTALL_DIR) $(1)/usr/bin
  393.     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{cifsdd,smbclient,smbget} $(1)/usr/bin/
  394. endef
  395.  
  396. define Package/samba4-admin/install
  397.     $(INSTALL_DIR) $(1)/usr/bin
  398.     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{net,smbcontrol,profiles,rpcclient,dbwrap_tool} $(1)/usr/bin/
  399.     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{ldbadd,ldbdel,ldbedit,ldbmodify,ldbrename,ldbsearch} $(1)/usr/bin/
  400.     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{tdbbackup,tdbdump,tdbrestore,tdbtool} $(1)/usr/bin/
  401.     $(INSTALL_DIR) $(1)/usr/sbin
  402.     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/eventlogadm $(1)/usr/sbin/
  403. endef
  404.  
  405. define Package/samba4-utils/install
  406.     $(INSTALL_DIR) $(1)/usr/bin
  407.     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{smbstatus,smbtree,mvxattr,smbtar} $(1)/usr/bin/
  408. ifeq ($(CONFIG_SAMBA4_SERVER_VFS),y)
  409.     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/smbcquotas $(1)/usr/bin/
  410. endif
  411. endef
  412.  
  413. define Package/samba4-server/install
  414.     $(INSTALL_DIR) $(1)/usr/bin
  415.     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{smbpasswd,pdbedit,testparm} $(1)/usr/bin/
  416.     $(INSTALL_DIR) $(1)/usr/sbin
  417.     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/smbd $(1)/usr/sbin/
  418. ifeq ($(CONFIG_SAMBA4_SERVER_NETBIOS),y)
  419.     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/nmbd $(1)/usr/sbin/
  420.     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nmblookup $(1)/usr/bin/
  421. endif
  422. ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
  423.     $(INSTALL_DIR) $(1)/usr/lib
  424.     $(CP) $(PKG_INSTALL_DIR)/usr/lib/$(PYTHON3) $(1)/usr/lib/
  425.     $(INSTALL_DIR) $(1)/usr/share/
  426.     $(CP) $(PKG_INSTALL_DIR)/usr/share/samba $(1)/usr/share/
  427.     # fix wrong hardcoded python3 location
  428.     $(SED) '1s,^#!/.*python3.*,#!/usr/bin/python3,' $(PKG_INSTALL_DIR)/usr/bin/samba-tool
  429.     $(SED) '1s,^#!/.*python3.*,#!/usr/bin/python3,' $(PKG_INSTALL_DIR)/usr/sbin/{samba-gpupdate,samba_dnsupdate,samba_kcc,samba_spnupdate,samba_upgradedns,samba_downgrade_db}
  430.     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{samba-tool,ntlm_auth,oLschema2ldif} $(1)/usr/bin/
  431.     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{sharesec,smbcacls} $(1)/usr/bin/
  432.     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{samba,samba-gpupdate,samba_dnsupdate,samba_kcc,samba_spnupdate,samba_upgradedns,samba_downgrade_db} $(1)/usr/sbin/
  433. endif
  434.     $(INSTALL_DIR) $(1)/etc/config $(1)/etc/samba $(1)/etc/init.d
  435.     $(INSTALL_CONF) ./files/samba.config $(1)/etc/config/samba4
  436.     $(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/samba
  437.     $(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba4
  438. endef
  439.  
  440. define Package/samba4-server/conffiles
  441. /etc/config/samba4
  442. /etc/samba/smb.conf.template
  443. /etc/samba/smb.conf
  444. /etc/samba/smbpasswd
  445. /etc/samba/secrets.tdb
  446. /etc/samba/passdb.tdb
  447. /etc/samba/lmhosts
  448. /etc/nsswitch.conf
  449. /etc/krb5.conf
  450. endef
  451.  
  452. $(eval $(call HostBuild))
  453. $(eval $(call BuildPackage,samba4-libs))
  454. $(eval $(call BuildPackage,samba4-server))
  455. $(eval $(call BuildPackage,samba4-client))
  456. $(eval $(call BuildPackage,samba4-admin))
  457. $(eval $(call BuildPackage,samba4-utils))
  458.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement