2 # Copyright (C) 2007-2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE_URL:=http://ftp.samba.org/pub/samba \
15 http://ftp.samba.org/pub/samba/stable
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_MD5SUM:=76da2fa64edd94a0188531e7ecb27c4e
20 PKG_LICENSE_FILES:=COPYING
22 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
26 include $(INCLUDE_DIR)/package.mk
29 CONFIGURE_PATH:=source3
31 PKG_BUILD_BIN:=$(PKG_BUILD_DIR)/$(MAKE_PATH)/bin
33 define Package/samba36-server
36 TITLE:=Samba 3.6 SMB/CIFS server
37 URL:=http://www.samba.org/
38 DEPENDS:=+USE_GLIBC:librt
41 define Package/samba36-client
44 TITLE:=Samba 3.6 SMB/CIFS client
45 URL:=http://www.samba.org/
46 DEPENDS:=+libreadline +libncurses
49 define 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
57 define 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.
64 TARGET_CFLAGS += -DMAX_DEBUG_LEVEL=$(CONFIG_PACKAGE_SAMBA_MAX_DEBUG_LEVEL) -D__location__=\\\"\\\" -ffunction-sections -fdata-sections
65 TARGET_LDFLAGS += -Wl,--gc-sections
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
97 --disable-shared-libs \
98 --with-codepagedir=/etc/samba \
99 --with-configdir=/etc/samba \
100 --with-included-iniparser \
101 --with-included-popt \
102 --with-lockdir=/var/lock \
103 --with-logfilebase=/var/log \
104 --with-nmbdsocketdir=/var/nmbd \
105 --with-piddir=/var/run \
106 --with-privatedir=/etc/samba \
107 --with-sendfile-support \
108 --without-acl-support \
109 --without-cluster-support \
116 --without-libtalloc \
117 --without-libnetapi \
118 --without-libsmbclient \
119 --without-libsmbsharemodes \
120 --without-libtevent \
122 --with-shared-modules=pdb_tdbsam,pdb_wbc_sam,idmap_nss,nss_info_template,auth_winbind,auth_wbc,auth_domain
124 MAKE_FLAGS += DYNEXP= PICFLAG= MODULES=
126 define Package/samba36-server/conffiles
128 /etc/samba/smb.conf.template
131 define Package/samba36-server/install
132 $(INSTALL_DIR) $(1)/etc/config
133 $(INSTALL_CONF) ./files/samba.config $(1)/etc/config/samba
134 $(INSTALL_DIR) $(1)/etc/samba
135 $(INSTALL_DATA) ./files/smb.conf.template $(1)/etc/samba
136 $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/lowcase.dat $(1)/etc/samba
137 $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/upcase.dat $(1)/etc/samba
138 $(INSTALL_DATA) $(PKG_BUILD_DIR)/codepages/valid.dat $(1)/etc/samba
139 $(INSTALL_DIR) $(1)/etc/init.d
140 $(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba
141 $(INSTALL_DIR) $(1)/usr/sbin
142 $(INSTALL_BIN) $(PKG_BUILD_BIN)/samba_multicall $(1)/usr/sbin
143 $(LN) samba_multicall $(1)/usr/sbin/smbd
144 $(LN) samba_multicall $(1)/usr/sbin/nmbd
145 $(LN) samba_multicall $(1)/usr/sbin/smbpasswd
148 define Package/samba36-client/install
149 $(INSTALL_DIR) $(1)/usr/sbin
150 $(INSTALL_BIN) $(PKG_BUILD_BIN)/smbclient $(1)/usr/sbin
151 $(INSTALL_BIN) $(PKG_BUILD_BIN)/nmblookup $(1)/usr/sbin
154 $(eval $(call BuildPackage,samba36-client))
155 $(eval $(call BuildPackage,samba36-server))