#
################################################################################
-SAMBA4_VERSION = 4.1.9
+SAMBA4_VERSION = 4.1.10
SAMBA4_SITE = http://ftp.samba.org/pub/samba/stable
SAMBA4_SOURCE = samba-$(SAMBA4_VERSION).tar.gz
SAMBA4_LICENSE = GPLv3+
SAMBA4_CONF_OPT += --without-acl-support
endif
+ifeq ($(BR2_PACKAGE_CUPS),y)
+ SAMBA4_CONF_ENV += CUPS_CONFIG="$(STAGING_DIR)/usr/bin/cups-config"
+ SAMBA4_CONF_OPT += --enable-cups
+ SAMBA4_DEPENDENCIES += cups
+else
+ SAMBA4_CONF_OPT += --disable-cups
+endif
+
ifeq ($(BR2_PACKAGE_LIBAIO),y)
SAMBA4_CONF_OPT += --with-aio-support
SAMBA4_DEPENDENCIES += libaio
python_LDFLAGS="" \
python_LIBDIR="" \
$(TARGET_CONFIGURE_OPTS) \
+ $(SAMBA4_CONF_ENV) \
./buildtools/bin/waf configure \
--prefix=/usr \
--sysconfdir=/etc \
--hostcc=gcc \
--disable-rpath \
--disable-rpath-install \
- --disable-cups \
--disable-iprint \
--without-pam \
--without-dmapi \
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
endef
+# Samba just installs .py files so the purge causes problems with some tools
+ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY),y)
+define SAMBA4_BUILD_PYC_FILES
+ PYTHONPATH="$(PYTHON_PATH)" \
+ $(HOST_DIR)/usr/bin/python -c "import compileall; \
+ compileall.compile_dir('$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/samba')"
+endef
+SAMBA4_POST_INSTALL_TARGET_HOOKS += SAMBA4_BUILD_PYC_FILES
+endif
+
define SAMBA4_INSTALL_INIT_SYSV
$(INSTALL) -m 0755 -D package/samba4/S91smb \
$(TARGET_DIR)/etc/init.d/S91smb