2014-03-02 13:42:18 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# samba4
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2015-04-15 22:57:18 +02:00
|
|
|
SAMBA4_VERSION = 4.2.1
|
2015-03-05 21:44:09 +01:00
|
|
|
SAMBA4_SITE = http://ftp.samba.org/pub/samba
|
2014-03-02 13:42:18 +01:00
|
|
|
SAMBA4_SOURCE = samba-$(SAMBA4_VERSION).tar.gz
|
2015-03-06 13:50:29 +01:00
|
|
|
SAMBA4_INSTALL_STAGING = YES
|
2014-03-02 13:42:18 +01:00
|
|
|
SAMBA4_LICENSE = GPLv3+
|
|
|
|
SAMBA4_LICENSE_FILES = COPYING
|
|
|
|
SAMBA4_DEPENDENCIES = host-e2fsprogs host-heimdal e2fsprogs popt python zlib \
|
2014-03-03 12:44:12 +01:00
|
|
|
$(if $(BR2_PACKAGE_LIBCAP),libcap) \
|
|
|
|
$(if $(BR2_PACKAGE_READLINE),readline)
|
2014-03-02 13:42:18 +01:00
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_ACL),y)
|
2015-03-06 10:30:09 +01:00
|
|
|
SAMBA4_CONF_OPTS += --with-acl-support
|
|
|
|
SAMBA4_DEPENDENCIES += acl
|
2014-03-02 13:42:18 +01:00
|
|
|
else
|
2015-03-06 10:30:09 +01:00
|
|
|
SAMBA4_CONF_OPTS += --without-acl-support
|
2014-03-02 13:42:18 +01:00
|
|
|
endif
|
|
|
|
|
2014-07-31 17:21:18 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_CUPS),y)
|
2015-03-06 10:30:09 +01:00
|
|
|
SAMBA4_CONF_ENV += CUPS_CONFIG="$(STAGING_DIR)/usr/bin/cups-config"
|
|
|
|
SAMBA4_CONF_OPTS += --enable-cups
|
|
|
|
SAMBA4_DEPENDENCIES += cups
|
2014-07-31 17:21:18 +02:00
|
|
|
else
|
2015-03-06 10:30:09 +01:00
|
|
|
SAMBA4_CONF_OPTS += --disable-cups
|
2014-07-31 17:21:18 +02:00
|
|
|
endif
|
|
|
|
|
2014-03-02 13:42:18 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBAIO),y)
|
2015-03-06 10:30:09 +01:00
|
|
|
SAMBA4_CONF_OPTS += --with-aio-support
|
|
|
|
SAMBA4_DEPENDENCIES += libaio
|
2014-03-02 13:42:18 +01:00
|
|
|
else
|
2015-03-06 10:30:09 +01:00
|
|
|
SAMBA4_CONF_OPTS += --without-aio-support
|
2014-03-02 13:42:18 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_DBUS)$(BR2_PACKAGE_AVAHI_DAEMON),yy)
|
2015-03-06 10:30:09 +01:00
|
|
|
SAMBA4_CONF_OPTS += --enable-avahi
|
|
|
|
SAMBA4_DEPENDENCIES += avahi
|
2014-03-02 13:42:18 +01:00
|
|
|
else
|
2015-03-06 10:30:09 +01:00
|
|
|
SAMBA4_CONF_OPTS += --disable-avahi
|
2014-03-02 13:42:18 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_GAMIN),y)
|
2015-03-06 10:30:09 +01:00
|
|
|
SAMBA4_CONF_OPTS += --with-fam
|
|
|
|
SAMBA4_DEPENDENCIES += gamin
|
2014-03-02 13:42:18 +01:00
|
|
|
else
|
2015-03-06 10:30:09 +01:00
|
|
|
SAMBA4_CONF_OPTS += --without-fam
|
2014-03-02 13:42:18 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_GETTEXT),y)
|
2015-03-06 10:30:09 +01:00
|
|
|
SAMBA4_CONF_OPTS += --with-gettext=$(STAGING_DIR)/usr
|
|
|
|
SAMBA4_DEPENDENCIES += gettext
|
2014-03-02 13:42:18 +01:00
|
|
|
else
|
2015-03-06 10:30:09 +01:00
|
|
|
SAMBA4_CONF_OPTS += --without-gettext
|
2014-03-02 13:42:18 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_GNUTLS),y)
|
2015-03-06 10:30:09 +01:00
|
|
|
SAMBA4_CONF_OPTS += --enable-gnutls
|
|
|
|
SAMBA4_DEPENDENCIES += gnutls
|
2014-03-02 13:42:18 +01:00
|
|
|
else
|
2015-03-06 10:30:09 +01:00
|
|
|
SAMBA4_CONF_OPTS += --disable-gnutls
|
2014-03-02 13:42:18 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_NCURSES_TARGET_FORM)$(BR2_PACKAGE_NCURSES_TARGET_MENU)$(BR2_PACKAGE_NCURSES_TARGET_PANEL),yyy)
|
2015-03-06 11:42:48 +01:00
|
|
|
SAMBA4_CONF_ENV += NCURSES_CONFIG="$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS)"
|
2015-03-06 10:30:09 +01:00
|
|
|
SAMBA4_DEPENDENCIES += ncurses
|
2014-03-02 13:42:18 +01:00
|
|
|
else
|
2015-03-06 10:30:09 +01:00
|
|
|
SAMBA4_CONF_OPTS += --without-regedit
|
2014-03-02 13:42:18 +01:00
|
|
|
endif
|
|
|
|
|
2015-03-05 21:44:09 +01:00
|
|
|
# The ctdb tests (cluster) need bash and take up some space
|
|
|
|
# They're normally intended for debugging so remove them
|
|
|
|
define SAMBA4_REMOVE_CTDB_TESTS
|
|
|
|
rm -rf $(TARGET_DIR)/usr/lib/ctdb-tests
|
|
|
|
rm -rf $(TARGET_DIR)/usr/share/ctdb-tests
|
|
|
|
rm -f $(TARGET_DIR)/usr/bin/ctdb_run_*tests
|
|
|
|
endef
|
|
|
|
SAMBA4_POST_INSTALL_TARGET_HOOKS += SAMBA4_REMOVE_CTDB_TESTS
|
|
|
|
|
2014-03-02 13:42:18 +01:00
|
|
|
define SAMBA4_CONFIGURE_CMDS
|
2014-04-23 02:07:58 +02:00
|
|
|
cp package/samba4/samba4-cache.txt $(@D)/cache.txt;
|
|
|
|
echo 'Checking uname machine type: $(BR2_ARCH)' >>$(@D)/cache.txt;
|
2014-03-02 13:42:18 +01:00
|
|
|
(cd $(@D); \
|
|
|
|
PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python-config" \
|
|
|
|
python_LDFLAGS="" \
|
|
|
|
python_LIBDIR="" \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2014-07-31 17:21:18 +02:00
|
|
|
$(SAMBA4_CONF_ENV) \
|
2014-03-02 13:42:18 +01:00
|
|
|
./buildtools/bin/waf configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--with-libiconv=$(STAGING_DIR)/usr \
|
|
|
|
--enable-fhs \
|
|
|
|
--cross-compile \
|
|
|
|
--cross-answers=$(@D)/cache.txt \
|
|
|
|
--hostcc=gcc \
|
|
|
|
--disable-rpath \
|
|
|
|
--disable-rpath-install \
|
|
|
|
--disable-iprint \
|
|
|
|
--without-pam \
|
|
|
|
--without-dmapi \
|
|
|
|
--disable-glusterfs \
|
2015-03-05 21:44:09 +01:00
|
|
|
--with-cluster-support \
|
2014-05-09 14:31:37 +02:00
|
|
|
--bundled-libraries='!asn1_compile,!compile_et' \
|
2014-09-27 21:32:44 +02:00
|
|
|
$(SAMBA4_CONF_OPTS) \
|
2014-03-02 13:42:18 +01:00
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define SAMBA4_BUILD_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
|
|
|
|
endef
|
|
|
|
|
2015-03-06 13:50:29 +01:00
|
|
|
define SAMBA4_INSTALL_STAGING_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install
|
|
|
|
endef
|
|
|
|
|
2014-03-02 13:42:18 +01:00
|
|
|
define SAMBA4_INSTALL_TARGET_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
|
|
|
|
endef
|
|
|
|
|
2014-07-31 17:21:18 +02:00
|
|
|
# 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
|
|
|
|
|
2015-03-05 21:44:09 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_SAMBA4_AD_DC),)
|
|
|
|
SAMBA4_CONF_OPTS += --without-ad-dc
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_SAMBA4_ADS),y)
|
|
|
|
SAMBA4_CONF_OPTS += --with-ads --with-ldap --with-shared-modules=idmap_ad
|
|
|
|
SAMBA4_DEPENDENCIES += openldap
|
|
|
|
else
|
|
|
|
SAMBA4_CONF_OPTS += --without-ads --without-ldap
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_SAMBA4_SMBTORTURE),)
|
|
|
|
define SAMBA4_REMOVE_SMBTORTURE
|
|
|
|
rm -f $(TARGET_DIR)/usr/bin/smbtorture
|
|
|
|
endef
|
|
|
|
SAMBA4_POST_INSTALL_TARGET_HOOKS += SAMBA4_REMOVE_SMBTORTURE
|
|
|
|
endif
|
|
|
|
|
2014-03-02 13:42:18 +01:00
|
|
|
define SAMBA4_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -m 0755 -D package/samba4/S91smb \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S91smb
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|