291N/A#
291N/A# CDDL HEADER START
291N/A#
291N/A# The contents of this file are subject to the terms of the
291N/A# Common Development and Distribution License (the "License").
291N/A# You may not use this file except in compliance with the License.
291N/A#
291N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
291N/A# or http://www.opensolaris.org/os/licensing.
291N/A# See the License for the specific language governing permissions
291N/A# and limitations under the License.
291N/A#
291N/A# When distributing Covered Code, include this CDDL HEADER in each
291N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
291N/A# If applicable, add the following below this CDDL HEADER, with the
291N/A# fields enclosed by brackets "[]" replaced with your own identifying
291N/A# information: Portions Copyright [yyyy] [name of copyright owner]
291N/A#
291N/A# CDDL HEADER END
291N/A#
6935N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
291N/A#
291N/Ainclude ../../make-rules/shared-macros.mk
291N/A
291N/ACOMPONENT_NAME= pam_pkcs11
6935N/ACOMPONENT_VERSION= 0.6.8
6935N/ACOMPONENT_PROJECT_URL= https://sourceforge.net/projects/opensc/
291N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
291N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
844N/ACOMPONENT_ARCHIVE_HASH= \
6935N/A sha256:9d942e542ef35d0e1f990d9ff5bf9df0af84c828ed081add2eb1b4d84f0efbda
618N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)files/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE)
1273N/ACOMPONENT_BUGDB= library/pam-pkcs11
291N/A
6935N/ATPNO= 28155
3661N/A
3996N/Ainclude $(WS_MAKE_RULES)/prep.mk
3996N/Ainclude $(WS_MAKE_RULES)/configure.mk
3996N/Ainclude $(WS_MAKE_RULES)/ips.mk
291N/A
6935N/A# Force regeneration of ancient autoconf scripts to fix 64-bit build detection
6935N/A# and due to patches to autoconf and automake files.
6935N/ACOMPONENT_PREP_ACTION += (cd $(@D); autoreconf -fiv)
6935N/A
6935N/A# Enable ASLR for this component
6935N/AASLR_MODE = $(ASLR_ENABLE)
6935N/A
6935N/A# We build two different variants of pam_pkcs11 for our users.
6935N/AVARIANT_OPENLDAP = $(BUILD_DIR)/openldap
6935N/AVARIANT_MOZILLALDAP = $(BUILD_DIR)/mozillaldap
6935N/A
6935N/AVARIANTS = $(VARIANT_OPENLDAP) $(VARIANT_MOZILLALDAP)
6935N/A
6935N/ABUILD_32 = $(VARIANTS:%=%/$(MACH32)/.built)
6935N/ABUILD_64 = $(VARIANTS:%=%/$(MACH64)/.built)
6935N/ABUILD_32_and_64 = $(BUILD_32) $(BUILD_64)
6935N/A
6935N/A$(VARIANT_OPENLDAP)/$(MACH64)/.configured: BITS=64
6935N/A$(VARIANT_MOZILLALDAP)/$(MACH64)/.configured: BITS=64
6935N/A
6935N/A# Configure options for mozillaldap variant
6935N/A$(VARIANT_MOZILLALDAP)/%/.configured: \
6935N/A CONFIGURE_OPTIONS += --enable-openldap=no
6935N/A$(VARIANT_MOZILLALDAP)/%/.configured: \
6935N/A CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS) -DMODULE_ISA_FIX"
6935N/A
6935N/A# Configure options for openldap variant
6935N/A$(VARIANT_OPENLDAP)/%/.configured: \
6935N/A CONFIGURE_OPTIONS += --enable-openldap=yes
6935N/A$(VARIANT_OPENLDAP)/%/.configured: \
6935N/A CONFIGURE_OPTIONS += \
6935N/A CFLAGS="$(CFLAGS) -I/usr/include/openldap -DMODULE_ISA_FIX"
6935N/A
6935N/A# Common configure options
6935N/ACONFIGURE_BINDIR.32= $(USRLIBDIR)/pam_pkcs11
6935N/ACONFIGURE_BINDIR.64= $(USRLIBDIR64)/pam_pkcs11
6935N/A
291N/ACONFIGURE_OPTIONS += --localstatedir=/var
6935N/ACONFIGURE_OPTIONS += --with-confdir=/etc/security/pam_pkcs11
6935N/ACONFIGURE_OPTIONS += --docdir=/etc/security/pam_pkcs11
6935N/ACONFIGURE_OPTIONS += OPENSSL_LIBS="-lssl -lcrypto -lsocket"
6935N/ACONFIGURE_OPTIONS.32 += --with-pcsclite=no
6935N/ACONFIGURE_OPTIONS.64 += --with-pcsclite=yes
6935N/ACONFIGURE_OPTIONS.64 += PCSC_CFLAGS="-I/usr/include/PCSC"
6935N/ACONFIGURE_OPTIONS.64 += PCSC_LIBS="-lpcsclite"
6935N/A
6935N/A# We install only the MozillaLDAP variant. We will cherry-pick binaries built
6935N/A# against OpenLDAP out of the build directory to avoid re-installing
6935N/A# everything.
6935N/AINSTALL_32 = $(VARIANT_MOZILLALDAP)/$(MACH32)/.installed
6935N/AINSTALL_64 = $(VARIANT_MOZILLALDAP)/$(MACH64)/.installed
6935N/AINSTALL_32_and_64 = $(INSTALL_32) $(INSTALL_64)
291N/A
291N/A# common targets
291N/Abuild: $(BUILD_32_and_64)
291N/A
291N/Ainstall: $(INSTALL_32_and_64)
291N/A
291N/Atest: $(NO_TESTS)
291N/A
6935N/AREQUIRED_PACKAGES += library/openldap
3996N/AREQUIRED_PACKAGES += library/security/openssl
6935N/AREQUIRED_PACKAGES += library/security/pcsc/pcsclite
3996N/AREQUIRED_PACKAGES += shell/bash
3996N/AREQUIRED_PACKAGES += system/library
6935N/AREQUIRED_PACKAGES += system/linker
6935N/A