6358N/A#
6358N/A# CDDL HEADER START
6358N/A#
6358N/A# The contents of this file are subject to the terms of the
6358N/A# Common Development and Distribution License (the "License").
6358N/A# You may not use this file except in compliance with the License.
6358N/A#
6358N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6358N/A# or http://www.opensolaris.org/os/licensing.
6358N/A# See the License for the specific language governing permissions
6358N/A# and limitations under the License.
6358N/A#
6358N/A# When distributing Covered Code, include this CDDL HEADER in each
6358N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6358N/A# If applicable, add the following below this CDDL HEADER, with the
6358N/A# fields enclosed by brackets "[]" replaced with your own identifying
6358N/A# information: Portions Copyright [yyyy] [name of copyright owner]
6358N/A#
6358N/A# CDDL HEADER END
6358N/A#
6358N/A# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
6358N/A#
6358N/Ainclude ../../make-rules/shared-macros.mk
6358N/A
6358N/ACOMPONENT_NAME= libpki
6358N/ACOMPONENT_VERSION= 0.8.9
6358N/A
6358N/A# Version 0.8.9 of libpki has not been released, yet. There is no source
6358N/A# tarball for it. In Solaris 12, Userland consolidation has infrastructure
6358N/A# to fetch sources based on a specified git commit hash. Such infrastructure
6358N/A# is not present in Solaris 11.3. So we take the latest tarball 0.8.8
6358N/A# and apply few patches on top of it to get the same sources as in s12.
6358N/ACOMPONENT_PROJECT_URL= https://www.openca.org/projects/libpki/
6358N/ACOMPONENT_SRC= $(COMPONENT_NAME)-0.8.8
6358N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
6358N/ACOMPONENT_ARCHIVE_HASH= \
6358N/A sha256:0a3907650d0b4cf958adb7955789a2c080fc60709a7fddda0262c385ba0e3465
6358N/ACOMPONENT_ARCHIVE_URL= \
6358N/A http://downloads.sourceforge.net/project/openca/$(COMPONENT_NAME)/releases/v0.8.8/sources/$(COMPONENT_ARCHIVE)
6358N/ACOMPONENT_BUGDB= library/smartcard
6358N/A
6358N/ATPNO= 26905
6358N/A
6358N/A
6358N/Ainclude $(WS_MAKE_RULES)/prep.mk
6358N/Ainclude $(WS_MAKE_RULES)/configure.mk
6358N/Ainclude $(WS_MAKE_RULES)/ips.mk
6358N/A
6358N/APKG_PROTO_DIRS += $(COMPONENT_SRC)/docs
6358N/A
6358N/A# Need to include the path below because not all headers are available in
6358N/A# $(BUILD_DIR)/src/libpki.
6358N/ACFLAGS += -I$(COMPONENT_DIR)/$(COMPONENT_SRC)/src
6358N/A
6358N/AOPENLDAP_VARIANT = $(BUILD_DIR)/$(MACH64)-openldap
6358N/AMOZILLALDAP_VARIANT = $(BUILD_DIR)/$(MACH64)-mozillaldap
6358N/A
6358N/AVARIANTS = $(OPENLDAP_VARIANT) $(MOZILLALDAP_VARIANT)
6358N/A
6358N/A$(VARIANTS:%=%/.configured): BITS=64
6358N/A
6358N/ABUILD_64 = $(VARIANTS:%=%/.built)
6358N/A
6358N/A# Only install the OpenLDAP variant. We will cherry-pick libpki built against
6358N/A# Mozilla LDAP out of the build directory to avoid re-installing everything.
6358N/AINSTALL_64 = $(OPENLDAP_VARIANT)/.installed
6358N/A
6358N/ATEST_64 = $(OPENLDAP_VARIANT)/.tested
6358N/A
6358N/A# configure.in and Makefile.am patches need configure script recreation.
6358N/ACOMPONENT_PREP_ACTION += (cd $(@D); autoreconf);
6358N/A
6358N/A# This is necessary because 'gmake install' tries to install some files under
6358N/A# /usr/bin without it.
6358N/ACONFIGURE_ENV += DESTDIR="$(PROTO_DIR)"
6358N/ACOMPONENT_INSTALL_ARGS += DESTDIR="$(PROTO_DIR)"
6358N/A
6358N/ACONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
6358N/ACONFIGURE_ENV += CFLAGS="$(CFLAGS)"
6358N/A
6358N/ACONFIGURE_OPTIONS += --with-libdir=$(USRLIBDIR64)
6358N/ACONFIGURE_OPTIONS += --with-lib-prefix=$(USRLIBDIR64)
6358N/A
6358N/A# We build two variants: against OpenLDAP and against Mozilla LDAP libraries.
6358N/A$(OPENLDAP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-openldap=yes
6358N/A$(MOZILLALDAP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-openldap=no
6358N/A
6358N/ACOMPONENT_PRE_TEST_ACTION = files/setup_test.sh $(@D) $(COMPONENT_SRC)
6358N/A
6358N/A# common targets
6358N/Aconfigure: $(CONFIGURE_64)
6358N/A
6358N/Abuild: $(BUILD_64)
6358N/A
6358N/Ainstall: $(INSTALL_64) $(MOZILLALDAP_VARIANT)/.built
6358N/A
6358N/Atest: $(TEST_64)
6358N/A
6358N/AREQUIRED_PACKAGES += library/libxml2
6358N/AREQUIRED_PACKAGES += library/openldap
6358N/AREQUIRED_PACKAGES += library/security/openssl
6358N/AREQUIRED_PACKAGES += library/security/openssl/openssl-fips-140
6358N/AREQUIRED_PACKAGES += shell/ksh93
6358N/AREQUIRED_PACKAGES += system/library
6358N/AREQUIRED_PACKAGES += system/linker