2007-01-14 07:13:27 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# samba
|
|
|
|
#
|
|
|
|
#############################################################
|
2009-05-04 21:01:25 +02:00
|
|
|
SAMBA_VERSION:=3.3.4
|
2007-07-11 16:06:06 +02:00
|
|
|
SAMBA_SOURCE:=samba-$(SAMBA_VERSION).tar.gz
|
2008-06-24 10:36:37 +02:00
|
|
|
SAMBA_SITE:=http://samba.org/samba/ftp/stable/
|
2007-07-11 16:06:06 +02:00
|
|
|
SAMBA_DIR:=$(BUILD_DIR)/samba-$(SAMBA_VERSION)/source
|
2007-01-14 07:13:27 +01:00
|
|
|
SAMBA_CAT:=$(ZCAT)
|
|
|
|
SAMBA_BINARY:=bin/smbd
|
|
|
|
SAMBA_TARGET_BINARY:=usr/sbin/smbd
|
|
|
|
|
|
|
|
$(DL_DIR)/$(SAMBA_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(SAMBA_SITE),$(SAMBA_SOURCE))
|
2007-01-14 07:13:27 +01:00
|
|
|
|
|
|
|
$(SAMBA_DIR)/.unpacked: $(DL_DIR)/$(SAMBA_SOURCE)
|
|
|
|
$(SAMBA_CAT) $(DL_DIR)/$(SAMBA_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
|
|
|
toolchain/patch-kernel.sh `dirname $(SAMBA_DIR)` package/samba/ samba\*.patch
|
2007-07-23 09:56:00 +02:00
|
|
|
$(CONFIG_UPDATE) $(SAMBA_DIR)
|
|
|
|
touch $@
|
2007-01-14 07:13:27 +01:00
|
|
|
|
|
|
|
$(SAMBA_DIR)/.configured: $(SAMBA_DIR)/.unpacked
|
|
|
|
(cd $(SAMBA_DIR); rm -rf config.cache; \
|
|
|
|
./autogen.sh; \
|
2007-01-14 12:25:22 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2007-01-14 07:13:27 +01:00
|
|
|
samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \
|
|
|
|
samba_cv_USE_SETREUID=yes \
|
2007-07-17 02:21:16 +02:00
|
|
|
samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \
|
2008-07-03 10:12:51 +02:00
|
|
|
samba_cv_HAVE_IFACE_IFCONF=yes \
|
2008-10-06 21:53:29 +02:00
|
|
|
samba_cv_HAVE_MMAP=yes \
|
|
|
|
samba_cv_HAVE_FCNTL_LOCK=yes \
|
|
|
|
samba_cv_HAVE_SECURE_MKSTEMP=yes \
|
2008-12-12 10:09:51 +01:00
|
|
|
samba_cv_HAVE_NATIVE_ICONV=no \
|
|
|
|
samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \
|
2008-10-06 21:53:29 +02:00
|
|
|
samba_cv_fpie=no \
|
2009-04-26 23:17:33 +02:00
|
|
|
libreplace_cv_HAVE_IPV6=$(if $(BR2_INET_IPV6),yes,no) \
|
2007-01-14 07:13:27 +01:00
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
2008-07-03 10:12:51 +02:00
|
|
|
--prefix=/usr \
|
|
|
|
--localstatedir=/var \
|
2007-01-14 07:13:27 +01:00
|
|
|
--with-lockdir=/var/cache/samba \
|
|
|
|
--with-piddir=/var/run \
|
|
|
|
--with-privatedir=/etc/samba \
|
|
|
|
--with-logfilebase=/var/log/samba \
|
|
|
|
--with-configdir=/etc/samba \
|
2008-12-12 10:09:51 +01:00
|
|
|
--with-libiconv=$(STAGING_DIR) \
|
2007-01-14 07:13:27 +01:00
|
|
|
--without-ldap \
|
2008-12-12 10:09:51 +01:00
|
|
|
--without-ads \
|
|
|
|
--without-acl \
|
2007-01-14 07:13:27 +01:00
|
|
|
--with-included-popt \
|
|
|
|
--with-included-iniparser \
|
2008-12-12 10:09:51 +01:00
|
|
|
--disable-shared-libs \
|
2007-01-14 07:13:27 +01:00
|
|
|
--disable-static \
|
2008-12-12 10:09:51 +01:00
|
|
|
--disable-cups \
|
2009-01-13 09:02:52 +01:00
|
|
|
$(DISABLE_LARGEFILE) \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2007-07-23 09:56:00 +02:00
|
|
|
touch $@
|
2007-01-14 07:13:27 +01:00
|
|
|
|
|
|
|
$(SAMBA_DIR)/$(SAMBA_BINARY): $(SAMBA_DIR)/.configured
|
2008-12-12 11:34:25 +01:00
|
|
|
# make proto must be done before make to be parallel safe
|
2008-12-12 10:29:37 +01:00
|
|
|
$(MAKE) -C $(SAMBA_DIR) proto
|
|
|
|
$(MAKE) -C $(SAMBA_DIR)
|
2007-01-14 07:13:27 +01:00
|
|
|
|
|
|
|
SAMBA_TARGETS_ :=
|
|
|
|
SAMBA_TARGETS_y :=
|
|
|
|
|
2007-08-22 14:35:41 +02:00
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_CIFS) += usr/sbin/mount.cifs \
|
2007-01-14 07:13:27 +01:00
|
|
|
usr/sbin/umount.cifs
|
2007-08-22 14:35:41 +02:00
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_EVENTLOGADM) += usr/bin/eventlogadm
|
2008-10-06 21:53:29 +02:00
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_FINDSMB) += usr/bin/findsmb
|
2007-08-22 14:35:41 +02:00
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_NET) += usr/bin/net
|
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_NMBD) += usr/sbin/nmbd
|
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_NMBLOOKUP) += usr/bin/nmblookup
|
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_NTLM_AUTH) += usr/bin/ntlm_auth
|
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_PDBEDIT) += usr/bin/pdbedit
|
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_PROFILES) += usr/bin/profiles
|
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_RPCCLIENT) += usr/bin/rpcclient
|
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_SMBCACLS) += usr/bin/smbcacls
|
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_SMBCLIENT) += usr/bin/smbclient
|
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_SMBCONTROL) += usr/bin/smbcontrol
|
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_SMBCQUOTAS) += usr/bin/smbcquotas
|
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_SMBGET) += usr/bin/smbget
|
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_SMBPASSWD) += usr/bin/smbpasswd
|
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_SMBSPOOL) += usr/bin/smbspool
|
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_SMBSTATUS) += usr/bin/smbstatus
|
2008-10-06 21:53:29 +02:00
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_SMBTAR) += usr/bin/smbtar
|
2007-08-22 14:35:41 +02:00
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_SMBTREE) += usr/bin/smbtree
|
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_SWAT) += usr/sbin/swat
|
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_TDB) += usr/bin/tdbbackup \
|
|
|
|
usr/bin/tdbdump \
|
2007-01-14 07:13:27 +01:00
|
|
|
usr/bin/tdbtool
|
2007-08-22 14:35:41 +02:00
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_TESTPARM) += usr/bin/testparm
|
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_WINBINDD) += usr/sbin/winbindd
|
|
|
|
SAMBA_TARGETS_$(BR2_PACKAGE_SAMBA_WBINFO) += usr/bin/wbinfo
|
2007-01-14 07:13:27 +01:00
|
|
|
|
|
|
|
$(TARGET_DIR)/$(SAMBA_TARGET_BINARY): $(SAMBA_DIR)/$(SAMBA_BINARY)
|
2007-08-22 14:35:41 +02:00
|
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) \
|
2007-01-14 07:13:27 +01:00
|
|
|
prefix="${TARGET_DIR}/usr" \
|
|
|
|
BASEDIR="${TARGET_DIR}/usr" \
|
|
|
|
SBINDIR="${TARGET_DIR}/usr/sbin" \
|
|
|
|
LOCKDIR="${TARGET_DIR}/var/cache/samba" \
|
|
|
|
PRIVATEDIR="${TARGET_DIR}/etc/samba" \
|
|
|
|
CONFIGDIR="${TARGET_DIR}/etc/samba" \
|
|
|
|
VARDIR="${TARGET_DIR}/var/log/samba" \
|
2008-12-12 10:09:51 +01:00
|
|
|
-C $(SAMBA_DIR) installlibs installservers installbin installcifsmount installscripts
|
|
|
|
# Do not install the LDAP-like embedded database tools
|
|
|
|
rm -f $(addprefix $(TARGET_DIR)/usr/bin/ldb, add del edit modify search)
|
|
|
|
# Remove not used library by Samba binaries
|
|
|
|
rm -f $(TARGET_DIR)/usr/lib/libnetapi*
|
|
|
|
rm -f $(TARGET_DIR)/usr/lib/libsmbclient*
|
|
|
|
rm -f $(TARGET_DIR)/usr/lib/libtalloc*
|
|
|
|
rm -f $(TARGET_DIR)/usr/lib/libtdb*
|
|
|
|
# Remove not wanted Samba binaries
|
2007-08-22 11:56:41 +02:00
|
|
|
for file in $(SAMBA_TARGETS_); do \
|
2007-01-14 07:13:27 +01:00
|
|
|
rm -f $(TARGET_DIR)/$$file; \
|
|
|
|
done
|
2008-12-12 10:09:51 +01:00
|
|
|
# Strip the wanted Samba binaries
|
|
|
|
$(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/$(SAMBA_TARGET_BINARY)
|
2007-08-22 11:56:41 +02:00
|
|
|
for file in $(SAMBA_TARGETS_y); do \
|
2008-12-12 10:09:51 +01:00
|
|
|
$(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/$$file; \
|
2007-07-17 02:21:16 +02:00
|
|
|
done
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_SAMBA_SWAT),y)
|
2008-07-03 10:12:51 +02:00
|
|
|
cp -dpfr $(SAMBA_DIR)/../swat $(TARGET_DIR)/usr/
|
|
|
|
endif
|
2007-06-16 19:54:38 +02:00
|
|
|
$(INSTALL) -m 0755 package/samba/S91smb $(TARGET_DIR)/etc/init.d
|
2007-08-22 11:56:41 +02:00
|
|
|
@if [ ! -f $(TARGET_DIR)/etc/samba/smb.conf ]; then \
|
2007-01-14 07:13:27 +01:00
|
|
|
$(INSTALL) -m 0755 -D package/samba/simple.conf $(TARGET_DIR)/etc/samba/smb.conf; \
|
2007-08-21 21:20:18 +02:00
|
|
|
fi
|
2007-01-14 07:13:27 +01:00
|
|
|
rm -rf $(TARGET_DIR)/var/cache/samba
|
|
|
|
rm -rf $(TARGET_DIR)/var/lib/samba
|
|
|
|
|
2008-12-12 10:09:51 +01:00
|
|
|
samba: libiconv $(TARGET_DIR)/$(SAMBA_TARGET_BINARY)
|
2007-01-14 07:13:27 +01:00
|
|
|
|
2007-09-24 01:23:52 +02:00
|
|
|
samba-source: $(DL_DIR)/$(SAMBA_SOURCE)
|
|
|
|
|
|
|
|
samba-unpacked: $(SAMBA_DIR)/.unpacked
|
|
|
|
|
2007-01-14 07:13:27 +01:00
|
|
|
samba-clean:
|
|
|
|
rm -f $(TARGET_DIR)/$(SAMBA_TARGET_BINARY)
|
2007-08-22 11:56:41 +02:00
|
|
|
for file in $(SAMBA_TARGETS_y); do \
|
2007-01-14 07:13:27 +01:00
|
|
|
rm -f $(TARGET_DIR)/$$file; \
|
|
|
|
done
|
|
|
|
rm -f $(TARGET_DIR)/etc/init.d/S91smb
|
|
|
|
rm -rf $(TARGET_DIR)/etc/samba
|
|
|
|
-$(MAKE) -C $(SAMBA_DIR) clean
|
|
|
|
|
|
|
|
samba-dirclean:
|
|
|
|
rm -rf $(SAMBA_DIR)
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_SAMBA),y)
|
2007-01-14 07:13:27 +01:00
|
|
|
TARGETS+=samba
|
|
|
|
endif
|