1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
dcfda24abf565c442d058cbf81b2180d847a1b3eAutomatic Updater# CDDL HEADER START
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic Updater#
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic Updater# The contents of this file are subject to the terms of the
c6fb85f9500350e5ce58c9a24f5d264c8a8bd6f4Automatic Updater# Common Development and Distribution License (the "License").
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# You may not use this file except in compliance with the License.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic Updater# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# or http://www.opensolaris.org/os/licensing.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# See the License for the specific language governing permissions
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic Updater# and limitations under the License.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# When distributing Covered Code, include this CDDL HEADER in each
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# If applicable, add the following below this CDDL HEADER, with the
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# fields enclosed by brackets "[]" replaced with your own identifying
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic Updater# information: Portions Copyright [yyyy] [name of copyright owner]
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# CDDL HEADER END
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
2cbb4ab75757fbb656997a82c14ca07db37d481aAutomatic Updater#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updaterinclude ../../make-rules/shared-macros.mk
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Samba uses gcc-like structure members initialization
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# ...so solarisstudio12.1 (default in 11.3) fails to compile Samba
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntoverride SPRO_VROOT = $(SPRO_ROOT)/solarisstudio12.4
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Samba does not work properly on i386 when built by studio with -xO3+.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntifeq ($(MACH), sparc)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntWAFOPT1 = -j 32
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntelse
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterWAFOPT1 = -j 64
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Both SPRO_VROOT and studio_OPT vars must use the override keyword otherwise
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Userland will ignore it and use its default value.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntoverride studio_OPT = -xO1
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntendif
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# parfait seems to spin on us
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntexport PARFAIT_BUILD=no
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCOMPONENT_NAME= samba
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCOMPONENT_VERSION= 4.4.5
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntTPNO= 30125
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCOMPONENT_ARCHIVE_HASH= sha256:b876ef2e63f66265490e80a122e66ef2d7616112b839df68f56ac2e1ce17a7bd
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic UpdaterCOMPONENT_PROJECT_URL= http://www.samba.org/
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCOMPONENT_ARCHIVE_URL= https://download.samba.org/pub/samba/stable/$(COMPONENT_ARCHIVE)
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic UpdaterCOMPONENT_BUGDB= utility/samba
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Huntinclude $(WS_MAKE_RULES)/prep.mk
fd0b768f4c23d22c89f8a156a632831583b7fb68Automatic Updater
fd0b768f4c23d22c89f8a156a632831583b7fb68Automatic Updater# waf
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntWAF_PATH = PATH=$(BUILD_DIR)/samba/buildtools/bin:$(PROTO_DIR)/usr/bin:$$PATH
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Verbosed waf produces unreadable output if parallelized.
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Uncomment to enable verbose build.
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic Updater#override WAFOPT1 = -v -j1
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Set build dirs for Samba + Winbind / Winbind (without Samba).
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntBUILD_DIR_SMB = $(BUILD_DIR)/samba
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntBUILD_DIR_WINB = $(BUILD_DIR)/winbind
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updaterinclude $(WS_MAKE_RULES)/ips.mk
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# directory to search for "include" in samba.p5m
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntPKG_OPTIONS += -I $(COMPONENT_DIR)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Set the pkg... path to search files in ./Solaris/ dir (mainly the SMF manifests are there)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntPKG_PROTO_DIRS += $(COMPONENT_DIR)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# pkg-config files
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt$(BUILD_DIR)/pkgcfg/.pc: $(COMPONENT_DIR)/Solaris/samfs.pc $(COMPONENT_DIR)/Solaris/ldap.pc $(COMPONENT_DIR)/Solaris/lber.pc $(COMPONENT_DIR)/Solaris/openldap.pc
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt $(MKDIR) $(@D)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt $(MKDIR) $(@D)/$(MACH64)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt sed -e "s:@root@:$(PROTO_DIR):g" \
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt $(COMPONENT_DIR)/Solaris/samfs.pc > $(@D)/samfs.pc
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater $(CP) $(COMPONENT_DIR)/Solaris/ldap.pc $(@D)
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater $(CP) $(COMPONENT_DIR)/Solaris/ldap.pc $(@D)/$(MACH64)
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater $(CP) $(COMPONENT_DIR)/Solaris/lber.pc $(@D)
64affc54f96a2c71cbd10ed71e246ce0746259aaAutomatic Updater $(CP) $(COMPONENT_DIR)/Solaris/lber.pc $(@D)/$(MACH64)
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater $(CP) $(COMPONENT_DIR)/Solaris/openldap.pc $(@D)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt $(CP) $(COMPONENT_DIR)/Solaris/openldap.pc $(@D)/$(MACH64)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt$(PROTO_DIR)/opt/SUNWsamfs/lib/libsam.so: Solaris/libsam.c
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt $(MKDIR) $(@D)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt $(CLONEY) $(COMPONENT_DIR)/Solaris/include $(@D)/../include
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt $(CC.studio.32) -m32 -G $(studio_PIC) -hlibsam.so Solaris/libsam.c \
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic Updater -I$(COMPONENT_DIR)/Solaris/include \
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic Updater -o $@
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic Updater
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic Updater# Compiler settings
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic UpdaterCFLAGS.studio += $(studio_C99_ENABLE)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntLIBS += -lrt -lsec -lcrypt -lmd5 -lsocket -lnsl
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# More libs needed by smbd (libavahi, libgamin, ...)
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic UpdaterLIBS4SMBD = -lsendfile -lavahi-common -lavahi-core
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt#CPPFLAGS += -DSAMBA_VERSION_VENDOR_SUFFIX=\\\"Placeholder_for_vendor_suffix\\\"
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCPPFLAGS += $(CPP_LARGEFILES)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCPPFLAGS += $(CPP_XPG6MODE)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntLDFLAGS += -m$(BITS)
12bfbed87cfffa65ac300b72c5665ab38a355c2fAutomatic UpdaterLDFLAGS += -R/usr/lib/samba$(MACHLIBDIR)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntLDFLAGS += -R/usr/lib/samba/private$(MACHLIBDIR)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntLDFLAGS += $(LIBS)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt$(BUILD_DIR_SMB)/.configured: LDFLAGS += $(LIBS4SMBD)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntASLR_MODE = $(ASLR_ENABLE)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntLD_OPTIONS += -B direct
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# --enable-fhs should not be on
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCONFIGURE_OPTIONS = --exec-prefix=/usr
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCONFIGURE_OPTIONS += --bindir=/usr/lib/samba/bin
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCONFIGURE_OPTIONS += --sbindir=/usr/lib/samba/sbin
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterCONFIGURE_OPTIONS += --libdir=/usr/lib/samba$(MACHLIBDIR)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCONFIGURE_OPTIONS += --with-privatelibdir=/usr/lib/samba/private$(MACHLIBDIR)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCONFIGURE_OPTIONS += --sysconfdir=/etc/samba
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCONFIGURE_OPTIONS += --with-pammodulesdir=/usr/lib/samba/security$(MACHLIBDIR)
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCONFIGURE_OPTIONS += --datarootdir=/usr/lib/samba
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCONFIGURE_OPTIONS += --mandir=/usr/share/man
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCONFIGURE_OPTIONS += --htmldir=/usr/share/samba/swat/help
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterCONFIGURE_OPTIONS += --includedir=/usr/include/samba
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCONFIGURE_OPTIONS += --with-privatedir=/etc/samba/private
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCONFIGURE_OPTIONS += --localstatedir=/var/samba
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCONFIGURE_OPTIONS += --with-logfilebase=/var/samba/log
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCONFIGURE_OPTIONS += --sharedstatedir=/var/samba/com
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan HuntCONFIGURE_OPTIONS += --libexecdir=/usr/lib/samba
1bc5499c2a0fc5d2b11849e97cdd6305a64eb242Evan Hunt# Whenever getfacl is found HAVE_SOLARIS_UNIXWARE_ACLS is set and
# vfs_solarisacl is placed into the list of the static modules
CONFIGURE_OPTIONS += --with-static-modules=
$(BUILD_DIR_SMB)/.configured: CONFIGURE_OPTIONS += \
--with-shared-modules=vfs_worm,vfs_zfsacl,vfs_prealloc,vfs_cacheprime,vfs_commit,idmap_ldap,idmap_tdb2,idmap_rid,idmap_ad,idmap_hash,idmap_adex
$(BUILD_DIR_WINB)/.configured: CONFIGURE_OPTIONS += \
--with-shared-modules=idmap_ldap,idmap_tdb2,idmap_rid,idmap_ad,idmap_hash,idmap_adex
CONFIGURE_OPTIONS += --with-ads
CONFIGURE_OPTIONS += --with-winbind
#CONFIGURE_OPTIONS += --enable-nss-wrapper
CONFIGURE_OPTIONS += --with-ldap
#CONFIGURE_OPTIONS += --with-system-mitkrb5
CONFIGURE_OPTIONS += --without-ad-dc
CONFIGURE_OPTIONS += --nocache
CONFIGURE_OPTIONS += --nopyo
CONFIGURE_OPTIONS += --disable-rpath
CONFIGURE_OPTIONS += --disable-gnutls
CONFIGURE_OPTIONS += --bundled-libraries=ALL
CONFIGURE_ENV += CC="$(CC)"
CONFIGURE_ENV += CPP="$(CC) -E"
CONFIGURE_ENV += AWK=gawk
CONFIGURE_ENV += PERL=$(PERL.5.20)
CONFIGURE_ENV += PYTHONDIR="$(PYTHON_VENDOR_PACKAGES)"
CONFIGURE_ENV += PYTHONARCHDIR="$(PYTHON_VENDOR_PACKAGES)/samba"
CONFIGURE_ENV += LD="$(LD)"
CONFIGURE_ENV += CFLAGS="$(CFLAGS)"
CONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS) -I$(PROTO_DIR)/usr/include -I$(COMPONENT_DIR)/Solaris/include"
CONFIGURE_ENV += LINKFLAGS="$(LD_OPTIONS) $(LDFLAGS)"
CONFIGURE_ENV.64 += MACH64="$(MACH64)"
CONFIGURE_ENV += LD_EXEC_OPTIONS="$(LD_EXEC_OPTIONS)"
CONFIGURE_ENV += CUPS_CONFIG=$(USRBINDIR)/cups-config
CONFIGURE_ENV += INSTALL="$(INSTALL)"
CONFIGURE_ENV.32 += PKG_CONFIG_PATH="$(BUILD_DIR)/pkgcfg:$(PKG_CONFIG_PATH)"
CONFIGURE_ENV.64 += PKG_CONFIG_PATH="$(BUILD_DIR)/pkgcfg/$(MACH64):$(PKG_CONFIG_PATH)"
# Propagation of smb.conf with default settings.
$(PROTO_DIR)/etc/samba/smb.conf-example: $(BUILD_DIR_SMB)/.built
$(MKDIR) $(@D)
sed -f $(COMPONENT_DIR)/Solaris/smbconf.sed > $@ \
$(BUILD_DIR_SMB)/examples/smb.conf.default
# Build targets for WAF:
# (motivation) Samba started to use WAF (build system from Google) from the 3.x
# (as a parallel build system) but Samba4 discontinued the use of auto tools
# definitively.
# (note) .BDprep target is an additional step between .prep and .configure
# targets. It was added because there were problems with libtool-like phase of
# WAF when the not "prepared well". "waf distclean" on CLONEY'ed BUILD_DIR is
# enough.
# Prepare build dir for Samba + Winbind.
$(BUILD_DIR_SMB)/.BDprep: $(SOURCE_DIR)/.prep
# re-create configure dir
$(MKDIR) $(@D)
# Clone SOURCE_DIR
$(CLONEY) $(SOURCE_DIR) $(@D)
# clenup of clone
(cd $(@D) ; $(ENV) - $(WAF_PATH) waf distclean $(WAFOPT1) )
# dummy.c is needed to build with studio
$(TOUCH) $@ $(BUILD_DIR)/dummy.c
$(TOUCH) $@
# Configure of Samba + Winbind.
$(BUILD_DIR_SMB)/.configured: $(BUILD_DIR_SMB)/.BDprep $(BUILD_DIR)/pkgcfg/.pc $(PROTO_DIR)/opt/SUNWsamfs/lib/libsam.so
(cd $(@D) ; $(ENV) - $(WAF_PATH) $(CONFIGURE_ENV) $(CONFIGURE_ENV.$(BITS)) \
waf configure $(WAFOPT1) $(CONFIGURE_OPTIONS) $(CONFIGURE_OPTIONS.$(BITS)) )
$(TOUCH) $@
# Build of Samba + Winbind.
$(BUILD_DIR_SMB)/.built: $(BUILD_DIR_SMB)/.configured
(cd $(@D) ; $(ENV) - $(WAF_PATH) LD_EXEC_OPTIONS="$(LD_EXEC_OPTIONS)" waf build $(WAFOPT1) )
$(TOUCH) $@
# Install of Samba + Winbind.
$(BUILD_DIR_SMB)/.installed: $(BUILD_DIR_SMB)/.built
(cd $(@D) ; $(ENV) - $(WAF_PATH) LD_EXEC_OPTIONS="$(LD_EXEC_OPTIONS)" waf install $(WAFOPT1) --destdir=$(PROTO_DIR) )
$(PYTHON) -m compileall $(PROTO_DIR)/$(PYTHON_VENDOR_PACKAGES)/
$(TOUCH) $@
# Prepare build dir for Winbind (without Samba) for different bitness.
$(BUILD_DIR_WINB)/.BDprep: $(SOURCE_DIR)/.prep
# re-create configure dir
$(MKDIR) $(@D)
# Clone SOURCE_DIR
$(CLONEY) $(SOURCE_DIR) $(@D)
# clenup of clone
(cd $(@D) ; $(ENV) - $(WAF_PATH) waf distclean $(WAFOPT1) )
$(TOUCH) $@
# Configure of Winbind (without Samba) for different bitness.
$(BUILD_DIR_WINB)/.configured: $(BUILD_DIR_WINB)/.BDprep $(BUILD_DIR)/pkgcfg/.pc
(cd $(@D) ; $(ENV) - $(WAF_PATH) $(CONFIGURE_ENV) $(CONFIGURE_ENV.$(BITS)) \
waf configure $(WAFOPT1) $(CONFIGURE_OPTIONS) $(CONFIGURE_OPTIONS.$(BITS)) )
$(TOUCH) $@
# Build of Winbind (without Samba) for different bitness.
WB_TARGETS = --targets=nss_winbind,pamwinbind
$(BUILD_DIR_WINB)/.built: $(BUILD_DIR_WINB)/.configured
(cd $(@D) ; $(ENV) - $(WAF_PATH) LD_EXEC_OPTIONS="$(LD_EXEC_OPTIONS)" waf build $(WAFOPT1) \
$(WB_TARGETS) )
$(TOUCH) $@
# Installf Winbind (without Samba) for different bitness.
$(BUILD_DIR_WINB)/.installed: $(BUILD_DIR_WINB)/.built
/bin/sh -c "cd $(@D) ; \
$(INSTALL) -d $(PROTO_DIR)/usr/lib/samba$(MACHLIBDIR) ; \
$(INSTALL) -m 0555 -t $(PROTO_DIR)/usr/lib/samba$(MACHLIBDIR) bin/shared/!(pam_*).so* ; \
$(INSTALL) -d $(PROTO_DIR)/usr/lib/samba/security$(MACHLIBDIR) ; \
$(INSTALL) -m 0555 -t $(PROTO_DIR)/usr/lib/samba/security$(MACHLIBDIR) bin/shared/pam_*.so* ; \
$(INSTALL) -d $(PROTO_DIR)/usr/lib/samba/private$(MACHLIBDIR) ; \
$(INSTALL) -m 0555 -t $(PROTO_DIR)/usr/lib/samba/private$(MACHLIBDIR) bin/shared/private/*.so* \
"
$(TOUCH) $@
# Set appropriate bitnesses for Samba + Winbind / Winbind (without Samba).
$(BUILD_DIR_SMB)/.configured: BITS=32
$(BUILD_DIR_SMB)/.configured: MACHLIBDIR=
$(BUILD_DIR_WINB)/.configured: BITS=64
$(BUILD_DIR_WINB)/.configured $(BUILD_DIR_WINB)/.installed: MACHLIBDIR=/$(MACH64)
# common targets
build: $(BUILD_DIR_SMB)/.built $(BUILD_DIR_WINB)/.built
include $(WS_MAKE_RULES)/shared-targets.mk
install: $(BUILD_DIR_SMB)/.installed $(BUILD_DIR_WINB)/.installed
# set version of python interpreter for pkglint
find $(PROTO_DIR) -name \*.py -print0 | \
while IFS= read -r -d $$'\0' file; do \
/usr/bin/sed -e '1,1s&^#!.*python[:blank:]\{0,\}$$&#!$(PYTHON.$(PYTHON_VERSION))&' \
$$file > $$file.pyverset ; \
done
find $(PROTO_DIR) -name \*.py.pyverset -print0 | \
while IFS= read -r -d $$'\0' file; do \
$(MV) $$file `echo $$file | sed -e 's/[.]pyverset$$//'` ; \
done
test: $(NO_TESTS)
system-test: $(NO_TESTS)
clean::
$(RM) -r $(BUILD_DIR)
REQUIRED_PACKAGES += library/file-monitor/gamin
REQUIRED_PACKAGES += library/libarchive
REQUIRED_PACKAGES += library/openldap
REQUIRED_PACKAGES += library/print/cups-libs
REQUIRED_PACKAGES += runtime/python-27
REQUIRED_PACKAGES += shell/ksh93
REQUIRED_PACKAGES += system/core-os
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/libdbus
REQUIRED_PACKAGES += system/library/security/crypto
REQUIRED_PACKAGES += system/linker
REQUIRED_PACKAGES += system/network
REQUIRED_PACKAGES += system/network/avahi