summaryrefslogtreecommitdiff
path: root/package/samba
diff options
context:
space:
mode:
Diffstat (limited to 'package/samba')
-rw-r--r--package/samba/Config.in9
-rw-r--r--package/samba/samba.mk17
2 files changed, 24 insertions, 2 deletions
diff --git a/package/samba/Config.in b/package/samba/Config.in
index 40161b6e3..cb4c4f62d 100644
--- a/package/samba/Config.in
+++ b/package/samba/Config.in
@@ -40,6 +40,15 @@ config BR2_PACKAGE_SAMBA_FINDSMB
comment "findsmb - disabled (requires nmblookup, smbclient and perl)"
depends on !BR2_PACKAGE_SAMBA_SMBCLIENT || !BR2_PACKAGE_SAMBA_NMBLOOKUP || !BR2_PACKAGE_MICROPERL
+config BR2_PACKAGE_SAMBA_LIBSMBCLIENT
+ bool "libsmbclient"
+ depends on BR2_PACKAGE_SAMBA
+ help
+ libsmbclient is a library toolset that permits applications
+ to manipulate CIFS/SMB network resources using many of the
+ standards POSIX functions available for manipulating local
+ files.
+
config BR2_PACKAGE_SAMBA_NET
bool "net"
default y
diff --git a/package/samba/samba.mk b/package/samba/samba.mk
index 82bf152e2..c4ecebf2d 100644
--- a/package/samba/samba.mk
+++ b/package/samba/samba.mk
@@ -11,6 +11,14 @@ SAMBA_CAT:=$(ZCAT)
SAMBA_BINARY:=bin/smbd
SAMBA_TARGET_BINARY:=usr/sbin/smbd
+ifeq ($(BR2_PACKAGE_SAMBA_LIBSMBCLIENT),y)
+SAMBA_LIBSMBCLIENT := libsmbclient
+SAMBA_CONF_OPTIONS := --enable-libsmbclient
+else
+SAMBA_LIBSMBCLIENT :=
+SAMBA_CONF_OPTIONS := --disable-libsmbclient
+endif
+
$(DL_DIR)/$(SAMBA_SOURCE):
$(call DOWNLOAD,$(SAMBA_SITE),$(SAMBA_SOURCE))
@@ -58,6 +66,7 @@ $(SAMBA_DIR)/.configured: $(SAMBA_DIR)/.unpacked
--disable-static \
--disable-cups \
$(DISABLE_LARGEFILE) \
+ $(SAMBA_CONF_OPTIONS) \
)
touch $@
@@ -112,7 +121,6 @@ $(TARGET_DIR)/$(SAMBA_TARGET_BINARY): $(SAMBA_DIR)/$(SAMBA_BINARY)
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
@@ -134,7 +142,12 @@ endif
rm -rf $(TARGET_DIR)/var/cache/samba
rm -rf $(TARGET_DIR)/var/lib/samba
-samba: libiconv $(TARGET_DIR)/$(SAMBA_TARGET_BINARY)
+libsmbclient: $(SAMBA_DIR)/bin/libsmbclient.so
+ $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+ DESTDIR="$(STAGING_DIR)" \
+ -C $(SAMBA_DIR) installlibs
+
+samba: libiconv $(TARGET_DIR)/$(SAMBA_TARGET_BINARY) $(SAMBA_LIBSMBCLIENT)
samba-source: $(DL_DIR)/$(SAMBA_SOURCE)