0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass#
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass# CDDL HEADER START
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass#
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass# The contents of this file are subject to the terms of the
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass# Common Development and Distribution License (the "License").
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass# You may not use this file except in compliance with the License.
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass#
09c638a157dd9d2ed9027215d9e254badfa019b8Dav Glass# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
09c638a157dd9d2ed9027215d9e254badfa019b8Dav Glass# or http://www.opensolaris.org/os/licensing.
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass# See the License for the specific language governing permissions
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass# and limitations under the License.
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass#
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass# When distributing Covered Code, include this CDDL HEADER in each
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass# If applicable, add the following below this CDDL HEADER, with the
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass# fields enclosed by brackets "[]" replaced with your own identifying
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass# information: Portions Copyright [yyyy] [name of copyright owner]
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass#
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass# CDDL HEADER END
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass#
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass#
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass#
577da64a9f0680112357f6595f47bfcab32d9adbDav GlassBUILD_BITS= 64_and_32
577da64a9f0680112357f6595f47bfcab32d9adbDav Glassinclude ../../make-rules/shared-macros.mk
577da64a9f0680112357f6595f47bfcab32d9adbDav Glass
577da64a9f0680112357f6595f47bfcab32d9adbDav Glassifeq ($(strip $(PARFAIT_BUILD)),yes)
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassPATH=$(PARFAIT_TOOLS):$(GNUBIN):$(SPRO_VROOT)/bin:$(USRBINDIR)
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glasselse
029cb6cc7c47ef456b545670a3ec835dc57e8859Dav GlassPATH=$(GNUBIN):$(SPRO_VROOT)/bin:$(USRBINDIR)
db62bb9907ff4ffe68df2dd2772e8e46f67a2ca1Dav Glassendif
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassCOMPONENT_NAME= cyrus-sasl
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass#
15e275ef18a569d4f8c96caa3ae3079c62b7e12cDav Glass# If you update the COMPONENT_VERSION, you should make a corresponding change
c23fd5e0c063fcf4c45c6695d04d5f10f8947930Dav Glass# in the dependency at the bottom of the openldap/openldap.p5m file.
c23fd5e0c063fcf4c45c6695d04d5f10f8947930Dav Glass#
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassCOMPONENT_VERSION= 2.1.26
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassCOMPONENT_PROJECT_URL= ftp://ftp.cyrusimap.org/cyrus-sasl
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassCOMPONENT_ARCHIVE_HASH= \
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass sha256:8fbc5136512b59bb793657f36fadda6359cae3b08f01fd16b3d406f1345b7bc3
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)/$(COMPONENT_ARCHIVE)
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass# Check DONOTUSE items when updating the version and hash
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassDONOTUSE= $(SOURCE_DIR)/mac $(SOURCE_DIR)/dlcompat-20010505
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassCOMPONENT_BUGDB= library/libsasl
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassTPNO= 21351
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassSASL2.32 = $(USRLIBDIR)/sasl2
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassSASL2.64 = $(USRLIBDIR)/sasl2/$(MACH64)
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassSASL_CONFDIR = $(ETCDIR)/sasl2
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassPROTO_CONFDIR = $(PROTO_DIR)$(SASL_CONFDIR)
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassTESTS_DIR=$(PROTO_DIR)/tests
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassTESTS_32_DIR=$(TESTS_DIR)/$(MACH32)
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass
7a67e82a93bc7dc5bf9a62a3ad321c2424da37f7Dav Glass# Migrated from ON in S12, including stuff from system/header, so this
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass# cannot be installed on an S11 box.
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glassifeq ($(BUILD_TYPE), evaluation)
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassBUILD_32_and_64=
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassINSTALL_32_and_64=
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassPUBLISH_STAMP=
052dcc53d425df9224bfc720b2feca1e92903382Dav Glassendif
052dcc53d425df9224bfc720b2feca1e92903382Dav Glass
052dcc53d425df9224bfc720b2feca1e92903382Dav GlassINSTALL_TARGET=
052dcc53d425df9224bfc720b2feca1e92903382Dav GlassTEST_TARGET= $(NO_TESTS)
052dcc53d425df9224bfc720b2feca1e92903382Dav Glassinclude $(WS_MAKE_RULES)/common.mk
052dcc53d425df9224bfc720b2feca1e92903382Dav Glass
052dcc53d425df9224bfc720b2feca1e92903382Dav Glass# This causes the default compilation argument to be wrong and isn't necessary.
052dcc53d425df9224bfc720b2feca1e92903382Dav Glassstudio_MT=
052dcc53d425df9224bfc720b2feca1e92903382Dav Glass
052dcc53d425df9224bfc720b2feca1e92903382Dav GlassCPPFLAGS += -I$(USRINCDIR)/openldap
052dcc53d425df9224bfc720b2feca1e92903382Dav GlassLDFLAGS += $(CC_BITS) -lscf -lresolv
052dcc53d425df9224bfc720b2feca1e92903382Dav Glass
e4f71ec590faf50c1621b6b2c32bae83eb73ee74Dav GlassCONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)
052dcc53d425df9224bfc720b2feca1e92903382Dav GlassCONFIGURE_OPTIONS += --enable-auth-sasldb
052dcc53d425df9224bfc720b2feca1e92903382Dav GlassCONFIGURE_OPTIONS += --with-saslauthd=/var/run/saslauthd
052dcc53d425df9224bfc720b2feca1e92903382Dav GlassCONFIGURE_OPTIONS += --with-dblib=berkeley
052dcc53d425df9224bfc720b2feca1e92903382Dav GlassCONFIGURE_OPTIONS += --with-gss_impl=mit
052dcc53d425df9224bfc720b2feca1e92903382Dav GlassCONFIGURE_OPTIONS += --without-gnu-ld
052dcc53d425df9224bfc720b2feca1e92903382Dav GlassCONFIGURE_OPTIONS.32 += --with-plugindir=$(SASL2.32)
052dcc53d425df9224bfc720b2feca1e92903382Dav GlassCONFIGURE_OPTIONS.64 += --with-plugindir=$(SASL2.64)
052dcc53d425df9224bfc720b2feca1e92903382Dav GlassCONFIGURE_OPTIONS.32 += --with-sasldir=$(SASL2.32)
052dcc53d425df9224bfc720b2feca1e92903382Dav GlassCONFIGURE_OPTIONS.64 += --with-sasldir=$(SASL2.64)
052dcc53d425df9224bfc720b2feca1e92903382Dav GlassCONFIGURE_OPTIONS += --with-ipctype=doors
052dcc53d425df9224bfc720b2feca1e92903382Dav GlassCONFIGURE_OPTIONS += --with-ldap=$(USRDIR)
052dcc53d425df9224bfc720b2feca1e92903382Dav GlassCONFIGURE_OPTIONS += --enable-sample
052dcc53d425df9224bfc720b2feca1e92903382Dav GlassCONFIGURE_OPTIONS += --enable-login
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassCONFIGURE_OPTIONS += --with-configdir=$(ETCDIR)/sasl2
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassCONFIGURE_OPTIONS += --enable-ldapdb
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassPKG_PROTO_DIRS += $(SOURCE_DIR)/doc $(COMPONENT_DIR)/Solaris
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassLINTINCDIR= $(SOURCE_DIR)/include/sasl
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass
052dcc53d425df9224bfc720b2feca1e92903382Dav GlassINCLIST= hmac-md5.h \
052dcc53d425df9224bfc720b2feca1e92903382Dav Glass md5.h \
052dcc53d425df9224bfc720b2feca1e92903382Dav Glass md5global.h \
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass prop.h \
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass sasl.h \
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass saslplug.h \
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass saslutil.h
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glassexport CONFIG_SITE=$(WS_COMPONENTS)/$(COMPONENT_NAME)/Solaris/config.site
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassCFG_COMPILE=/usr/share/automake-1.15
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassCOMPONENT_PREP_ACTION = ( cd $(@D) && \
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass ( cd config && ln -s $(CFG_COMPILE)/compile . ) ; \
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass ( cd saslauthd/config && ln -s $(CFG_COMPILE)/compile . ); \
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass $(AUTORECONF) -m --force -v \
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass -I $(COMPONENT_DIR)/m4 \
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass -I $(SOURCE_DIR)/cmulocal \
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass -I $(SOURCE_DIR)/config ; \
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass )
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass# Remove some things we don't use and aren't in the TPNO
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass# Make an include/sasl directory to make llib-lsasl2 match llib-lsasl2.ln
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav GlassCOMPONENT_PRE_CONFIGURE_ACTION = \
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass -$(RM) -r $(DONOTUSE) ; \
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass $(MKDIR) $(LINTINCDIR) ; \
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass ( cd $(LINTINCDIR) && \
0db84e0da684308b0fd9ea9b5906c11bafa7a246Dav Glass ( for i in $(INCLIST) ; do \
ln -s ../$$i $$i ; \
done ) \
)
INSTALL_32 += $(PROTOUSRLIBDIR)/libsasl.so.1
INSTALL_64 += $(PROTOUSRLIBDIR64)/libsasl.so.1
# common targets
install: build $(INSTALL_32_and_64)
COMPONENT_POST_BUILD_ACTION += \
$(LD) -F libsasl2.so.3 $(LD_BITS) \
-o $(BUILD_DIR_$(BITS))/lib/.libs/libsasl.so.1 \
-G -hlibsasl.so.1 $(LD_B_DIRECT) $(LD_Z_DEFS) -M$(COMPONENT_DIR)/mapfile ; \
(cd $(BUILD_DIR_$(BITS))/sample; $(ENV) $(COMPONENT_BUILD_ENV) \
$(MAKE) sample-client sample-server) ; \
(cd $(BUILD_DIR_$(BITS))/utils; $(ENV) $(COMPONENT_BUILD_ENV) \
$(MAKE) testsuite) ;
COMPONENT_POST_INSTALL_ACTION += \
$(CP) $(BUILD_DIR_$(BITS))/utils/.libs/testsuite \
$(PROTO_DIR)/$(SASL2.$(BITS))/testsuite ; \
$(CP) $(BUILD_DIR_$(BITS))/sample/.libs/sample-server \
$(PROTO_DIR)/$(SASL2.$(BITS))/sample-server ; \
$(CP) $(BUILD_DIR_$(BITS))/sample/.libs/sample-client \
$(PROTO_DIR)/$(SASL2.$(BITS))/sample-client ;
COMPONENT_POST_INSTALL_ACTION.32 += \
$(MKDIR) $(TESTS_DIR) ; \
$(MKDIR) $(TESTS_32_DIR) ; \
$(CP) $(BUILD_DIR_32)/utils/.libs/testsuite $(TESTS_32_DIR) ; \
$(CP) $(BUILD_DIR_32)/sample/.libs/sample-server $(TESTS_32_DIR) ; \
$(CP) $(BUILD_DIR_32)/sample/.libs/sample-client $(TESTS_32_DIR) ;
COMPONENT_POST_INSTALL_ACTION.64 += \
$(MKDIR) $(TESTS_DIR) ; \
$(CP) $(BUILD_DIR_64)/utils/.libs/testsuite $(TESTS_DIR) ; \
$(CP) $(BUILD_DIR_64)/sample/.libs/sample-server $(TESTS_DIR) ; \
$(CP) $(BUILD_DIR_64)/sample/.libs/sample-client $(TESTS_DIR) ;
$(PROTOUSRLIBDIR)/libsasl.so.1: $(BUILD_DIR)/$(MACH32)/lib/.libs/libsasl.so.1
$(CP) $< $@
$(PROTOUSRLIBDIR64)/libsasl.so.1: $(BUILD_DIR)/$(MACH64)/lib/.libs/libsasl.so.1
$(CP) $< $@
TARBALL_DIR=sasltest
CLEAN_PATHS += $(TARBALL_DIR)
test_tarball: sasltest.tgz
TEST_SCRIPTS= setup_testsuite run_testsuite transform-results cleanup \
setup-for-mit setup-for-seam
sasltest.tgz: install
$(MKDIR) $(TARBALL_DIR)
$(CHMOD) 0777 $(TARBALL_DIR)
$(CP) -r $(TESTS_DIR)/* $(TARBALL_DIR)
$(CP) $(COMPONENT_DIR)/test/* $(TARBALL_DIR)
(cd $(TARBALL_DIR) && $(CHMOD) 0777 $(TEST_SCRIPTS))
gtar czf sasltest.tgz $(TARBALL_DIR)
REQUIRED_PACKAGES += archiver/gnu-tar
REQUIRED_PACKAGES += database/berkeleydb-5
REQUIRED_PACKAGES += developer/build/automake-115
REQUIRED_PACKAGES += library/openldap
REQUIRED_PACKAGES += library/security/openssl
REQUIRED_PACKAGES += security/kerberos-5
REQUIRED_PACKAGES += system/network/ldap/openldap