1# 2# Copyright (C) 2007-2014 OpenWrt.org 3# 4# This is free software, licensed under the GNU General Public License v2. 5# See /LICENSE for more information. 6# 7 8include $(TOPDIR)/rules.mk 9 10PKG_NAME:=samba 11PKG_VERSION:=3.6.25 12PKG_RELEASE:=6 13 14PKG_SOURCE_URL:=https://download.samba.org/pub/samba \ 15 https://download.samba.org/pub/samba/stable 16PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 17PKG_MD5SUM:=76da2fa64edd94a0188531e7ecb27c4e 18 19PKG_LICENSE:=GPL-3.0 20PKG_LICENSE_FILES:=COPYING 21 22PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name> 23 24PKG_BUILD_PARALLEL:=1 25 26include $(INCLUDE_DIR)/package.mk 27 28MAKE_PATH:=source3 29CONFIGURE_PATH:=source3 30 31PKG_BUILD_BIN:=$(PKG_BUILD_DIR)/$(MAKE_PATH)/bin 32 33define Package/samba36-server 34 SECTION:=net 35 CATEGORY:=Network 36 TITLE:=Samba 3.6 SMB/CIFS server 37 URL:=https://www.samba.org/ 38 DEPENDS:=+USE_GLIBC:librt $(ICONV_DEPENDS) 39endef 40 41define Package/samba36-client 42 SECTION:=net 43 CATEGORY:=Network 44 TITLE:=Samba 3.6 SMB/CIFS client 45 URL:=https://www.samba.org/ 46 DEPENDS:=+libreadline +libncurses 47endef 48 49define Package/samba36-server/config 50 config PACKAGE_SAMBA_MAX_DEBUG_LEVEL 51 int "Maximum level of compiled-in debug messages" 52 depends on PACKAGE_samba36-server || PACKAGE_samba36-client 53 default -1 54 55endef 56 57define Package/samba36-server/description 58 The Samba software suite is a collection of programs that implements the 59 SMB protocol for UNIX systems, allowing you to serve files and printers to 60 Windows, NT, OS/2 and DOS clients. This protocol is sometimes also referred 61 to as the LanManager or Netbios protocol. 62endef 63 64TARGET_CFLAGS += -DMAX_DEBUG_LEVEL=$(CONFIG_PACKAGE_SAMBA_MAX_DEBUG_LEVEL) -D__location__=\\\"\\\" -ffunction-sections -fdata-sections 65TARGET_LDFLAGS += -Wl,--gc-sections 66 67CONFIGURE_VARS += \ 68 ac_cv_lib_attr_getxattr=no \ 69 ac_cv_search_getxattr=no \ 70 ac_cv_file__proc_sys_kernel_core_pattern=yes \ 71 libreplace_cv_HAVE_C99_VSNPRINTF=yes \ 72 libreplace_cv_HAVE_GETADDRINFO=yes \ 73 libreplace_cv_HAVE_IFACE_IFCONF=yes \ 74 LINUX_LFS_SUPPORT=yes \ 75 samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \ 76 samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \ 77 samba_cv_HAVE_IFACE_IFCONF=yes \ 78 samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \ 79 samba_cv_HAVE_SECURE_MKSTEMP=yes \ 80 samba_cv_HAVE_WRFILE_KEYTAB=no \ 81 samba_cv_USE_SETREUID=yes \ 82 samba_cv_USE_SETRESUID=yes \ 83 samba_cv_have_setreuid=yes \ 84 samba_cv_have_setresuid=yes \ 85 ac_cv_header_zlib_h=no \ 86 samba_cv_zlib_1_2_3=no \ 87 ac_cv_path_PYTHON="" \ 88 ac_cv_path_PYTHON_CONFIG="" 89 90CONFIGURE_ARGS += \ 91 --exec-prefix=/usr \ 92 --prefix=/ \ 93 --disable-avahi \ 94 --disable-cups \ 95 --disable-pie \ 96 --disable-relro \ 97 --disable-static \ 98 --disable-swat \ 99 --disable-shared-libs \ 100 --with-libiconv="$(ICONV_PREFIX)" \ 101 --with-codepagedir=/etc/samba \ 102 --with-configdir=/etc/samba \ 103 --with-included-iniparser \ 104 --with-included-popt \ 105 --with-lockdir=/var/lock \ 106 --with-logfilebase=/var/log \ 107 --with-nmbdsocketdir=/var/nmbd \ 108 --with-piddir=/var/run \ 109 --with-privatedir=/etc/samba \ 110 --with-sendfile-support \ 111 --without-acl-support \ 112 --without-cluster-support \ 113 --without-ads \ 114 --without-krb5 \ 115 --without-ldap \ 116 --without-pam \ 117 --without-winbind \ 118 --without-libtdb \ 119 --without-libtalloc \ 120 --without-libnetapi \ 121 --without-libsmbclient \ 122 --without-libsmbsharemodes \ 123 --without-libtevent \ 124 --without-libaddns \ 125 --with-shared-modules=pdb_tdbsam,pdb_wbc_sam,idmap_nss,nss_info_template,auth_winbind,auth_wbc,auth_domain 126 127MAKE_FLAGS += DYNEXP= PICFLAG= MODULES= 128 129define Package/samba36-server/conffiles 130/etc/config/samba 131/etc/samba/smb.conf.template 132/etc/samba/smbpasswd 133endef 134 135define Package/samba36-server/install 136 $(INSTALL_DIR) $(1)/etc/config 137 $(INSTALL_CONF) ./files/samba.config $(1)/etc/config/samba 138 $(INSTALL_DIR) $(1)/etc/samba 139 $(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/samba 140 $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/lowcase.dat $(1)/etc/samba 141 $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/upcase.dat $(1)/etc/samba 142 $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/valid.dat $(1)/etc/samba 143 $(INSTALL_DIR) $(1)/etc/init.d 144 $(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba 145 $(INSTALL_DIR) $(1)/usr/sbin 146 $(INSTALL_BIN) $(PKG_BUILD_BIN)/samba_multicall $(1)/usr/sbin 147 $(LN) samba_multicall $(1)/usr/sbin/smbd 148 $(LN) samba_multicall $(1)/usr/sbin/nmbd 149 $(LN) samba_multicall $(1)/usr/sbin/smbpasswd 150endef 151 152define Package/samba36-client/install 153 $(INSTALL_DIR) $(1)/usr/sbin 154 $(INSTALL_BIN) $(PKG_BUILD_BIN)/smbclient $(1)/usr/sbin 155 $(INSTALL_BIN) $(PKG_BUILD_BIN)/nmblookup $(1)/usr/sbin 156endef 157 158$(eval $(call BuildPackage,samba36-client)) 159$(eval $(call BuildPackage,samba36-server)) 160 161