2012-10-10 12:34:29 +00:00
|
|
|
#
|
2014-11-06 19:35:34 +00:00
|
|
|
# Copyright (C) 2007-2014 OpenWrt.org
|
2012-10-10 12:34:29 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=samba
|
2015-02-24 07:21:25 +00:00
|
|
|
PKG_VERSION:=3.6.25
|
2019-01-07 06:24:47 +00:00
|
|
|
PKG_RELEASE:=14
|
2012-10-10 12:34:29 +00:00
|
|
|
|
2017-02-01 21:17:37 +00:00
|
|
|
PKG_SOURCE_URL:=https://download.samba.org/pub/samba \
|
|
|
|
https://download.samba.org/pub/samba/stable
|
2012-10-10 12:34:29 +00:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2016-12-16 16:32:10 +00:00
|
|
|
PKG_HASH:=8f2c8a7f2bd89b0dfd228ed917815852f7c625b2bc0936304ac3ed63aaf83751
|
2012-10-10 12:34:29 +00:00
|
|
|
|
2014-11-03 09:56:44 +00:00
|
|
|
PKG_LICENSE:=GPL-3.0
|
2012-10-19 15:34:28 +00:00
|
|
|
PKG_LICENSE_FILES:=COPYING
|
2017-09-28 02:55:46 +00:00
|
|
|
PKG_CPE_ID:=cpe:/a:samba:samba
|
2012-10-19 15:34:28 +00:00
|
|
|
|
2012-10-17 22:18:30 +00:00
|
|
|
PKG_BUILD_PARALLEL:=1
|
|
|
|
|
2012-10-10 12:34:29 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
MAKE_PATH:=source3
|
|
|
|
CONFIGURE_PATH:=source3
|
|
|
|
|
|
|
|
PKG_BUILD_BIN:=$(PKG_BUILD_DIR)/$(MAKE_PATH)/bin
|
|
|
|
|
2017-03-12 02:09:36 +00:00
|
|
|
define Package/samba/Default
|
2012-10-10 12:34:29 +00:00
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
2017-03-12 02:09:36 +00:00
|
|
|
TITLE:=Samba 3.6 SMB/CIFS
|
2017-02-01 21:17:37 +00:00
|
|
|
URL:=https://www.samba.org/
|
2017-03-12 02:09:36 +00:00
|
|
|
MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/samba36-server
|
|
|
|
$(call Package/samba/Default)
|
|
|
|
TITLE+= server
|
2015-06-14 17:40:52 +00:00
|
|
|
DEPENDS:=+USE_GLIBC:librt $(ICONV_DEPENDS)
|
2012-10-10 12:34:29 +00:00
|
|
|
endef
|
|
|
|
|
2018-12-26 09:51:28 +00:00
|
|
|
define Package/samba36-hotplug
|
|
|
|
$(call Package/samba/Default)
|
|
|
|
TITLE+= hotplug script for auto sharing
|
|
|
|
DEPENDS:=+blockd
|
|
|
|
endef
|
|
|
|
|
2012-10-10 12:34:29 +00:00
|
|
|
define Package/samba36-client
|
2017-03-12 02:09:36 +00:00
|
|
|
$(call Package/samba/Default)
|
|
|
|
TITLE+= client
|
2012-10-10 12:34:29 +00:00
|
|
|
DEPENDS:=+libreadline +libncurses
|
|
|
|
endef
|
|
|
|
|
2017-08-13 18:36:56 +00:00
|
|
|
define Package/samba36-net
|
2017-03-12 02:09:36 +00:00
|
|
|
$(call Package/samba/Default)
|
|
|
|
TITLE+= net commands
|
2017-08-13 18:36:56 +00:00
|
|
|
DEPENDS:=+libreadline +libncurses
|
|
|
|
endef
|
|
|
|
|
2012-10-10 12:34:29 +00:00
|
|
|
define Package/samba36-server/config
|
|
|
|
config PACKAGE_SAMBA_MAX_DEBUG_LEVEL
|
|
|
|
int "Maximum level of compiled-in debug messages"
|
2013-04-17 15:36:41 +00:00
|
|
|
depends on PACKAGE_samba36-server || PACKAGE_samba36-client
|
2012-10-10 12:34:29 +00:00
|
|
|
default -1
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/samba36-server/description
|
|
|
|
The Samba software suite is a collection of programs that implements the
|
|
|
|
SMB protocol for UNIX systems, allowing you to serve files and printers to
|
|
|
|
Windows, NT, OS/2 and DOS clients. This protocol is sometimes also referred
|
|
|
|
to as the LanManager or Netbios protocol.
|
|
|
|
endef
|
|
|
|
|
|
|
|
TARGET_CFLAGS += -DMAX_DEBUG_LEVEL=$(CONFIG_PACKAGE_SAMBA_MAX_DEBUG_LEVEL) -D__location__=\\\"\\\" -ffunction-sections -fdata-sections
|
|
|
|
TARGET_LDFLAGS += -Wl,--gc-sections
|
|
|
|
|
|
|
|
CONFIGURE_VARS += \
|
2014-07-04 09:55:14 +00:00
|
|
|
ac_cv_lib_attr_getxattr=no \
|
|
|
|
ac_cv_search_getxattr=no \
|
2012-10-10 12:34:29 +00:00
|
|
|
ac_cv_file__proc_sys_kernel_core_pattern=yes \
|
|
|
|
libreplace_cv_HAVE_C99_VSNPRINTF=yes \
|
|
|
|
libreplace_cv_HAVE_GETADDRINFO=yes \
|
|
|
|
libreplace_cv_HAVE_IFACE_IFCONF=yes \
|
2019-01-07 06:24:47 +00:00
|
|
|
$(if $(CONFIG_IPV6),,libreplace_cv_HAVE_IPV6=no libreplace_cv_HAVE_IPV6_V6ONLY=no) \
|
2012-10-10 12:34:29 +00:00
|
|
|
LINUX_LFS_SUPPORT=yes \
|
|
|
|
samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \
|
|
|
|
samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \
|
|
|
|
samba_cv_HAVE_IFACE_IFCONF=yes \
|
|
|
|
samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \
|
|
|
|
samba_cv_HAVE_SECURE_MKSTEMP=yes \
|
|
|
|
samba_cv_HAVE_WRFILE_KEYTAB=no \
|
|
|
|
samba_cv_USE_SETREUID=yes \
|
|
|
|
samba_cv_USE_SETRESUID=yes \
|
|
|
|
samba_cv_have_setreuid=yes \
|
|
|
|
samba_cv_have_setresuid=yes \
|
2016-07-21 15:27:27 +00:00
|
|
|
ac_cv_header_libunwind_h=no \
|
2012-10-10 12:34:29 +00:00
|
|
|
ac_cv_header_zlib_h=no \
|
2015-06-14 17:40:52 +00:00
|
|
|
samba_cv_zlib_1_2_3=no \
|
|
|
|
ac_cv_path_PYTHON="" \
|
|
|
|
ac_cv_path_PYTHON_CONFIG=""
|
2012-10-10 12:34:29 +00:00
|
|
|
|
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--prefix=/ \
|
|
|
|
--disable-avahi \
|
|
|
|
--disable-cups \
|
2018-02-21 11:55:31 +00:00
|
|
|
--disable-external-libtalloc \
|
2018-07-01 00:02:52 +00:00
|
|
|
--disable-external-libtdb \
|
|
|
|
--disable-external-libtevent \
|
2012-10-10 12:34:29 +00:00
|
|
|
--disable-pie \
|
|
|
|
--disable-relro \
|
|
|
|
--disable-static \
|
|
|
|
--disable-swat \
|
|
|
|
--disable-shared-libs \
|
2015-06-14 17:40:52 +00:00
|
|
|
--with-libiconv="$(ICONV_PREFIX)" \
|
2012-10-10 12:34:29 +00:00
|
|
|
--with-codepagedir=/etc/samba \
|
|
|
|
--with-configdir=/etc/samba \
|
|
|
|
--with-included-iniparser \
|
|
|
|
--with-included-popt \
|
|
|
|
--with-lockdir=/var/lock \
|
|
|
|
--with-logfilebase=/var/log \
|
|
|
|
--with-nmbdsocketdir=/var/nmbd \
|
|
|
|
--with-piddir=/var/run \
|
|
|
|
--with-privatedir=/etc/samba \
|
|
|
|
--with-sendfile-support \
|
2014-07-04 11:42:57 +00:00
|
|
|
--without-acl-support \
|
2012-10-10 12:34:29 +00:00
|
|
|
--without-cluster-support \
|
|
|
|
--without-ads \
|
|
|
|
--without-krb5 \
|
|
|
|
--without-ldap \
|
|
|
|
--without-pam \
|
|
|
|
--without-winbind \
|
|
|
|
--without-libtdb \
|
|
|
|
--without-libtalloc \
|
|
|
|
--without-libnetapi \
|
|
|
|
--without-libsmbclient \
|
|
|
|
--without-libsmbsharemodes \
|
2014-05-01 21:17:56 +00:00
|
|
|
--without-libtevent \
|
2012-10-10 12:34:29 +00:00
|
|
|
--without-libaddns \
|
|
|
|
--with-shared-modules=pdb_tdbsam,pdb_wbc_sam,idmap_nss,nss_info_template,auth_winbind,auth_wbc,auth_domain
|
|
|
|
|
|
|
|
MAKE_FLAGS += DYNEXP= PICFLAG= MODULES=
|
|
|
|
|
2015-04-01 13:39:23 +00:00
|
|
|
define Package/samba36-server/conffiles
|
|
|
|
/etc/config/samba
|
2015-04-03 19:06:06 +00:00
|
|
|
/etc/samba/smb.conf.template
|
2015-08-15 14:49:06 +00:00
|
|
|
/etc/samba/smbpasswd
|
2015-04-01 13:39:23 +00:00
|
|
|
endef
|
|
|
|
|
2012-10-10 12:34:29 +00:00
|
|
|
define Package/samba36-server/install
|
|
|
|
$(INSTALL_DIR) $(1)/etc/config
|
2015-04-01 16:12:43 +00:00
|
|
|
$(INSTALL_CONF) ./files/samba.config $(1)/etc/config/samba
|
2015-04-01 15:59:14 +00:00
|
|
|
$(INSTALL_DIR) $(1)/etc/samba
|
2018-09-19 19:03:29 +00:00
|
|
|
$(INSTALL_CONF) ./files/smb.conf.template $(1)/etc/samba
|
2012-10-10 12:34:29 +00:00
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/lowcase.dat $(1)/etc/samba
|
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/upcase.dat $(1)/etc/samba
|
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/valid.dat $(1)/etc/samba
|
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
|
|
$(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_BIN)/samba_multicall $(1)/usr/sbin
|
2014-11-06 19:35:34 +00:00
|
|
|
$(LN) samba_multicall $(1)/usr/sbin/smbd
|
|
|
|
$(LN) samba_multicall $(1)/usr/sbin/nmbd
|
|
|
|
$(LN) samba_multicall $(1)/usr/sbin/smbpasswd
|
2012-10-10 12:34:29 +00:00
|
|
|
endef
|
|
|
|
|
2018-12-26 09:51:28 +00:00
|
|
|
define Package/samba36-hotplug/install
|
|
|
|
$(INSTALL_DIR) $(1)/etc/hotplug.d/mount
|
|
|
|
$(INSTALL_CONF) ./files/samba.hotplug $(1)/etc/hotplug.d/mount/60-samba
|
|
|
|
endef
|
|
|
|
|
2012-10-10 12:34:29 +00:00
|
|
|
define Package/samba36-client/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_BIN)/smbclient $(1)/usr/sbin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_BIN)/nmblookup $(1)/usr/sbin
|
|
|
|
endef
|
|
|
|
|
2017-08-13 18:36:56 +00:00
|
|
|
define Package/samba36-net/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_BIN)/net $(1)/usr/sbin
|
|
|
|
endef
|
|
|
|
|
2012-10-10 12:34:29 +00:00
|
|
|
$(eval $(call BuildPackage,samba36-client))
|
|
|
|
$(eval $(call BuildPackage,samba36-server))
|
2018-12-26 09:51:28 +00:00
|
|
|
$(eval $(call BuildPackage,samba36-hotplug))
|
2017-08-13 18:36:56 +00:00
|
|
|
$(eval $(call BuildPackage,samba36-net))
|
2012-10-10 12:34:29 +00:00
|
|
|
|