Makefile revision 6533
0a987c833e0517dc4efefc14229d96dec62e0965vboxsync#
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync# CDDL HEADER START
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync#
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync# The contents of this file are subject to the terms of the
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync# Common Development and Distribution License (the "License").
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync# You may not use this file except in compliance with the License.
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync#
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync# or http://www.opensolaris.org/os/licensing.
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync# See the License for the specific language governing permissions
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync# and limitations under the License.
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync#
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync# When distributing Covered Code, include this CDDL HEADER in each
3baadeafd9922582dad9b32431362e6296417dd8vboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
00e8340a60924420ea08462899c5815a685c78b2vboxsync# If applicable, add the following below this CDDL HEADER, with the
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync# fields enclosed by brackets "[]" replaced with your own identifying
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync#
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync# CDDL HEADER END
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync#
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync#
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync# TESTING:
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync# Requires physical card reader attached to USB with card inserted.
868d6eb6308a75913b9c494558832732e7539b0evboxsync# SCM Microsystems, model SCR3310 is what was used in-house to test.
868d6eb6308a75913b9c494558832732e7539b0evboxsync# The pkcs11_coolkey package, once built needs to be installed on
868d6eb6308a75913b9c494558832732e7539b0evboxsync# the system building and running the test.
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync#
2dfda90468c5653309a3e93423313e0ec0e627a2vboxsync# To build the test:
868d6eb6308a75913b9c494558832732e7539b0evboxsync# $ cd components/coolkey/test
868d6eb6308a75913b9c494558832732e7539b0evboxsync# $ gmake build-test
868d6eb6308a75913b9c494558832732e7539b0evboxsync#
# To run the test, as root:
# # cd components/coolkey/test
# # ./testcoolkey> testoutput.log
# enter PIN at prompt and press <enter>
#
# If the last line of output says:
# Testing libcoolkey... DONE. Status = 0
# then you have a finished test and results.
# Search for "failed" in testoutput.log to see the actual failures, then
# review any failed messages to determine if the test ran successfully or not.
include ../../make-rules/shared-macros.mk
BITS= 64
COMPONENT_NAME= coolkey
COMPONENT_VERSION= 1.1.0
COMPONENT_PROJECT_URL= http://pki.fedoraproject.org/wiki/CoolKey
COMPONENT_DOWNLOAD_URL= http://pkgs.fedoraproject.org/repo/pkgs/$(COMPONENT_NAME)/$(COMPONENT_NAME)-$(COMPONENT_VERSION).tar.gz/815a1811a46bf9b8782107c073149cbe
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
COMPONENT_ARCHIVE_HASH= sha256:8448e3abb81bffc593c96b577dcfbc05b40e8684188456c31be15fae73d730f7
COMPONENT_ARCHIVE_URL= $(COMPONENT_DOWNLOAD_URL)/$(COMPONENT_ARCHIVE)
COMPONENT_BUGDB= library/smartcard
TPNO = 25487
include $(WS_MAKE_RULES)/prep.mk
include $(WS_MAKE_RULES)/configure.mk
include $(WS_MAKE_RULES)/ips.mk
# Configuration related patch needs aclocal to be regenerated
COMPONENT_PREP_ACTION +=(cd $(@D); autoconf);
# Do not add the SUNWspro area to the RUNPATH
# Although -norunpath is set in CXXFLAGS, we need to append
# the -norunpath option here, so it's picked up when building
# shared libraries (CC -G)
CXX += $(studio_NORUNPATH)
COMPONENT_BUILD_ENV += CXXFLAGS="$(CXXFLAGS)"
COMPONENT_INSTALL_ENV += CXXFLAGS="$(CXXFLAGS)"
# Requires PC/SC headers and library
CONFIGURE_ENV += PCSC_CFLAGS="$(CFLAGS) -I$(USRINCDIR)/PCSC"
CONFIGURE_ENV += PCSC_LIBS="-lpcsclite"
# No dependency information exists the first time this package is built
CONFIGURE_OPTIONS += --disable-dependency-tracking
CONFIGURE_OPTIONS += CXXFLAGS="$(CXXFLAGS)"
# Common targets
configure: $(CONFIGURE_64)
build: $(BUILD_64)
install: $(INSTALL_64)
test: $(NO_TEST)
# Required packages
REQUIRED_PACKAGES += library/security/pcsc/pcsclite
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/c++-runtime
REQUIRED_PACKAGES += system/linker