2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2007-01-14 07:13:27 +01:00
|
|
|
#
|
|
|
|
# samba
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2011-12-30 16:51:32 +01:00
|
|
|
|
2014-06-23 13:36:52 +02:00
|
|
|
SAMBA_VERSION = 3.6.24
|
2011-12-30 16:51:32 +01:00
|
|
|
SAMBA_SITE = http://ftp.samba.org/pub/samba/stable
|
2011-09-13 10:42:07 +02:00
|
|
|
SAMBA_SUBDIR = source3
|
2009-10-18 19:35:12 +02:00
|
|
|
SAMBA_INSTALL_STAGING = YES
|
2012-08-13 22:02:35 +02:00
|
|
|
SAMBA_LICENSE = GPLv3+
|
|
|
|
SAMBA_LICENSE_FILES = COPYING
|
2009-10-18 19:35:12 +02:00
|
|
|
|
2012-05-11 11:37:36 +02:00
|
|
|
SAMBA_DEPENDENCIES = popt \
|
2009-10-18 19:35:12 +02:00
|
|
|
$(if $(BR2_PACKAGE_SAMBA_RPCCLIENT),readline) \
|
|
|
|
$(if $(BR2_PACKAGE_SAMBA_SMBCLIENT),readline) \
|
|
|
|
$(if $(BR2_PACKAGE_SAMBA_AVAHI),avahi) \
|
|
|
|
$(if $(BR2_PACKAGE_SAMBA_GAMIN),gamin)
|
|
|
|
|
|
|
|
SAMBA_CONF_ENV = \
|
2012-05-11 11:37:36 +02:00
|
|
|
ac_cv_file__proc_sys_kernel_core_pattern=yes \
|
2009-10-18 19:35:12 +02:00
|
|
|
samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \
|
|
|
|
samba_cv_USE_SETREUID=yes \
|
|
|
|
samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \
|
|
|
|
samba_cv_HAVE_IFACE_IFCONF=yes \
|
|
|
|
samba_cv_HAVE_MMAP=yes \
|
|
|
|
samba_cv_HAVE_FCNTL_LOCK=yes \
|
|
|
|
samba_cv_HAVE_SECURE_MKSTEMP=yes \
|
|
|
|
samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \
|
|
|
|
samba_cv_fpie=no \
|
|
|
|
libreplace_cv_HAVE_IPV6=$(if $(BR2_INET_IPV6),yes,no) \
|
|
|
|
$(if $(BR2_PACKAGE_SAMBA_AVAHI),AVAHI_LIBS=-pthread)
|
|
|
|
|
2014-09-27 21:32:44 +02:00
|
|
|
SAMBA_CONF_OPTS = \
|
2009-10-18 19:35:12 +02:00
|
|
|
--localstatedir=/var \
|
|
|
|
--with-piddir=/var/run \
|
|
|
|
--with-lockdir=/var/lock \
|
|
|
|
--with-logfilebase=/var/log \
|
|
|
|
--with-configdir=/etc/samba \
|
|
|
|
--with-privatedir=/etc/samba \
|
|
|
|
\
|
|
|
|
--disable-cups \
|
|
|
|
--enable-shared-libs \
|
|
|
|
--disable-pie \
|
|
|
|
--disable-relro \
|
|
|
|
--disable-dnssd \
|
|
|
|
\
|
|
|
|
$(if $(BR2_PACKAGE_SAMBA_AVAHI),--enable-avahi,--disable-avahi) \
|
|
|
|
$(if $(BR2_PACKAGE_SAMBA_GAMIN),--enable-fam,--disable-fam) \
|
|
|
|
$(if $(BR2_PACKAGE_SAMBA_SWAT),--enable-swat,--disable-swat) \
|
|
|
|
\
|
|
|
|
--without-cluster-support \
|
2012-05-11 11:37:36 +02:00
|
|
|
--without-dnsupdate \
|
2012-11-04 08:34:17 +01:00
|
|
|
--with-sys-quotas \
|
2009-10-18 19:35:12 +02:00
|
|
|
--without-ads \
|
|
|
|
--without-ldap \
|
|
|
|
--with-included-iniparser \
|
|
|
|
\
|
|
|
|
$(if $(BR2_PACKAGE_SAMBA_RPCCLIENT),--with-readline=$(STAGING_DIR)) \
|
|
|
|
$(if $(BR2_PACKAGE_SAMBA_SMBCLIENT),--with-readline=$(STAGING_DIR)) \
|
|
|
|
$(if $(BR2_PACKAGE_SAMBA_WINBINDD),--with-winbind,--without-winbind)
|
|
|
|
|
2014-09-27 21:32:40 +02:00
|
|
|
SAMBA_INSTALL_TARGET_OPTS = \
|
2009-10-18 19:35:12 +02:00
|
|
|
DESTDIR=$(TARGET_DIR) -C $(SAMBA_DIR)/$(SAMBA_SUBDIR) \
|
|
|
|
installlibs installservers installbin installscripts \
|
|
|
|
$(if $(BR2_PACKAGE_SAMBA_SWAT),installswat)
|
|
|
|
|
|
|
|
# binaries to keep
|
|
|
|
SAMBA_BINTARGETS_y = \
|
|
|
|
usr/sbin/smbd \
|
|
|
|
usr/lib/libtalloc.so \
|
|
|
|
usr/lib/libtdb.so
|
|
|
|
|
|
|
|
# binaries to remove
|
|
|
|
SAMBA_BINTARGETS_ = \
|
|
|
|
usr/lib/libnetapi.so* \
|
|
|
|
usr/lib/libsmbsharemodes.so*
|
|
|
|
|
|
|
|
# binaries to keep or remove
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_EVENTLOGADM) += usr/bin/eventlogadm
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_NET) += usr/bin/net
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_NMBD) += usr/sbin/nmbd
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_NMBLOOKUP) += usr/bin/nmblookup
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_NTLM_AUTH) += usr/bin/ntlm_auth
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_PDBEDIT) += usr/bin/pdbedit
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_PROFILES) += usr/bin/profiles
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_RPCCLIENT) += usr/bin/rpcclient
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBCACLS) += usr/bin/smbcacls
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBCLIENT) += usr/bin/smbclient
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBCONTROL) += usr/bin/smbcontrol
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBCQUOTAS) += usr/bin/smbcquotas
|
2011-08-01 23:46:16 +02:00
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBD) += usr/sbin/smbd
|
2009-10-18 19:35:12 +02:00
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBGET) += usr/bin/smbget
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBLDBTOOLS) += usr/bin/ldbadd
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBLDBTOOLS) += usr/bin/ldbdel
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBLDBTOOLS) += usr/bin/ldbedit
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBLDBTOOLS) += usr/bin/ldbmodify
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBLDBTOOLS) += usr/bin/ldbrename
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBLDBTOOLS) += usr/bin/ldbsearch
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBPASSWD) += usr/bin/smbpasswd
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBSHARESEC) += usr/bin/sharesec
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBSPOOL) += usr/bin/smbspool
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBSTATUS) += usr/bin/smbstatus
|
2012-08-13 22:02:35 +02:00
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBTA_UTIL) += usr/bin/smbta-util
|
2009-10-18 19:35:12 +02:00
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBTREE) += usr/bin/smbtree
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SWAT) += usr/sbin/swat
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_TDB) += usr/bin/tdbbackup
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_TDB) += usr/bin/tdbdump
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_TDB) += usr/bin/tdbtool
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_TESTPARM) += usr/bin/testparm
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_WINBINDD) += usr/sbin/winbindd
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_WBINFO) += usr/bin/wbinfo
|
|
|
|
|
|
|
|
# libraries to keep or remove
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_WINBINDD) += usr/lib/libwbclient.so*
|
|
|
|
SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_LIBSMBCLIENT) += usr/lib/libsmbclient.so*
|
|
|
|
|
|
|
|
# non-binaries to remove
|
|
|
|
SAMBA_TXTTARGETS_ = \
|
|
|
|
usr/include/libsmbclient.h \
|
|
|
|
usr/include/netapi.h \
|
|
|
|
usr/include/smb_share_modes.h \
|
|
|
|
usr/include/talloc.h \
|
|
|
|
usr/include/tdb.h \
|
|
|
|
usr/include/wbclient.h
|
|
|
|
|
|
|
|
# non-binaries to keep or remove
|
|
|
|
SAMBA_TXTTARGETS_$(BR2_PACKAGE_SAMBA_FINDSMB) += usr/bin/findsmb
|
|
|
|
SAMBA_TXTTARGETS_$(BR2_PACKAGE_SAMBA_SMBTAR) += usr/bin/smbtar
|
|
|
|
|
2010-09-01 17:20:28 +02:00
|
|
|
define SAMBA_REMOVE_UNNEEDED_BINARIES
|
2009-10-18 19:35:12 +02:00
|
|
|
rm -f $(addprefix $(TARGET_DIR)/, $(SAMBA_BINTARGETS_))
|
|
|
|
rm -f $(addprefix $(TARGET_DIR)/, $(SAMBA_TXTTARGETS_))
|
2010-09-01 17:20:28 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_REMOVE_UNNEEDED_BINARIES
|
|
|
|
|
|
|
|
define SAMBA_REMOVE_SWAT_DOCUMENTATION
|
2010-07-29 13:41:46 +02:00
|
|
|
# Remove the documentation
|
|
|
|
rm -rf $(TARGET_DIR)/usr/swat/help/manpages
|
|
|
|
rm -rf $(TARGET_DIR)/usr/swat/help/Samba3*
|
|
|
|
rm -rf $(TARGET_DIR)/usr/swat/using_samba/
|
|
|
|
# Removing the welcome.html file will make swat default to
|
|
|
|
# welcome-no-samba-doc.html
|
|
|
|
rm -rf $(TARGET_DIR)/usr/swat/help/welcome.html
|
2010-09-01 17:20:28 +02:00
|
|
|
endef
|
|
|
|
|
2012-05-11 11:37:36 +02:00
|
|
|
# --with-libiconv="" is to avoid detecting host libiconv and build failure
|
|
|
|
ifeq ($(BR2_PACKAGE_SAMBA_LIBICONV),y)
|
|
|
|
SAMBA_DEPENDENCIES += libiconv
|
2014-09-27 21:32:44 +02:00
|
|
|
SAMBA_CONF_OPTS += --with-libiconv=$(STAGING_DIR)
|
2012-05-11 11:37:36 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
SAMBA_CONF_OPTS += --with-libiconv=""
|
2012-05-11 11:37:36 +02:00
|
|
|
endif
|
|
|
|
|
2013-05-04 04:06:45 +02:00
|
|
|
# Compiled debug messages by level
|
2014-09-27 21:32:44 +02:00
|
|
|
SAMBA_CONF_OPTS += CFLAGS="$(TARGET_CFLAGS) -DMAX_DEBUG_LEVEL=$(BR2_PACKAGE_SAMBA_MAX_DEBUGLEVEL)"
|
2013-05-04 04:06:45 +02:00
|
|
|
|
2010-09-01 17:20:28 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SAMBA_SWAT),y)
|
|
|
|
SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_REMOVE_SWAT_DOCUMENTATION
|
2010-07-29 13:41:46 +02:00
|
|
|
endif
|
2010-09-01 17:20:28 +02:00
|
|
|
|
|
|
|
define SAMBA_INSTALL_INITSCRIPTS_CONFIG
|
2009-10-18 19:35:12 +02:00
|
|
|
# install start/stop script
|
|
|
|
@if [ ! -f $(TARGET_DIR)/etc/init.d/S91smb ]; then \
|
|
|
|
$(INSTALL) -m 0755 -D package/samba/S91smb $(TARGET_DIR)/etc/init.d/S91smb; \
|
|
|
|
fi
|
|
|
|
# install config
|
2007-08-22 11:56:41 +02:00
|
|
|
@if [ ! -f $(TARGET_DIR)/etc/samba/smb.conf ]; then \
|
2014-08-04 20:14:16 +02:00
|
|
|
$(INSTALL) -m 0644 -D package/samba/simple.conf $(TARGET_DIR)/etc/samba/smb.conf; \
|
2007-08-21 21:20:18 +02:00
|
|
|
fi
|
2010-09-01 17:20:28 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_INSTALL_INITSCRIPTS_CONFIG
|
2007-09-24 01:23:52 +02:00
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|