components/cackey/Makefile
branchs11u3-sru
changeset 6364 fd8be207f137
child 7453 688f73f0b72d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/cackey/Makefile	Wed Jul 06 18:48:42 2016 -0700
@@ -0,0 +1,90 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+
+#
+# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+#
+
+# TESTING:
+#   Requires physical card reader attached to USB with card inserted.
+#   SCM Microsystems, model SCR3310 is what was used in-house to test.
+#
+#   To build the test:
+#   $ cd build/[64-bit directory]
+#   $ gmake build-test
+#
+#   To run the test:
+#   $ cd build/[64-bit directory]
+#   $ ./testcackey> testoutput.log
+#
+#   If the last line of output says:
+#   Testing libcackey... DONE. Status = 0
+#   then you have a finished test and results.
+#   Search for CK_FAIL or "failed" in testoutput.log to see the actual failures,
+#   if no CK_FAIl or failed were reported, the test ran successfully.
+
+include ../../make-rules/shared-macros.mk
+
+BITS=			64
+COMPONENT_NAME=		CACKey
+COMPONENT_VERSION=	0.7.4
+COMPONENT_PROJECT_URL=	http://www.rkeene.org/projects/info/wiki/161
+COMPONENT_COMMIT_ID=	2f51a0d2995c7fd6acb57a953ac24697671d1ef4
+COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_COMMIT_ID)
+COMPONENT_ARCHIVE=	$(COMPONENT_SRC).zip
+COMPONENT_ARCHIVE_URL=  \
+    https://github.com/Conservatory/CACKey/archive/$(COMPONENT_COMMIT_ID).zip
+
+COMPONENT_BUGDB=	library/smartcard
+
+TPNO =			25489
+
+include $(WS_MAKE_RULES)/prep.mk
+include $(WS_MAKE_RULES)/configure.mk
+include $(WS_MAKE_RULES)/ips.mk
+
+# does not use typical FOSS dir layout, source is at top level
+COMPONENT_PRE_CONFIGURE_ACTION = ($(CLONEY) $(SOURCE_DIR) $(@D))
+
+# requires PC/SC libraries and headers
+CONFIGURE_ENV += CFLAGS="$(CFLAGS) -I$(USRINCDIR)/PCSC" 
+CONFIGURE_ENV += LDFLAGS="-lpcsclite"
+
+# options needed for configure, library location, PC/SC library and headers    
+CONFIGURE_OPTIONS +=    --exec-prefix=$(USRLIBDIR64)
+CONFIGURE_OPTIONS +=    --with-pcsc-headers=$(USRINCDIR)/PCSC
+CONFIGURE_OPTIONS +=    --enable-dod-certs-on-hw-slots
+
+# configure.ac related patch needs configure script re-creation
+COMPONENT_PREP_ACTION +=(cd $(@D); autoreconf);
+
+# 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