906N/A#
906N/A# CDDL HEADER START
906N/A#
906N/A# The contents of this file are subject to the terms of the
906N/A# Common Development and Distribution License (the "License").
906N/A# You may not use this file except in compliance with the License.
906N/A#
906N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
906N/A# or http://www.opensolaris.org/os/licensing.
906N/A# See the License for the specific language governing permissions
906N/A# and limitations under the License.
906N/A#
906N/A# When distributing Covered Code, include this CDDL HEADER in each
906N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
906N/A# If applicable, add the following below this CDDL HEADER, with the
906N/A# fields enclosed by brackets "[]" replaced with your own identifying
906N/A# information: Portions Copyright [yyyy] [name of copyright owner]
906N/A#
906N/A# CDDL HEADER END
906N/A
906N/A#
5492N/A# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
906N/A#
906N/A
4341N/ACOMPILER = gcc
3996N/A
906N/Ainclude ../../make-rules/shared-macros.mk
906N/A
906N/ACOMPONENT_NAME= openscap
5492N/ACOMPONENT_VERSION= 1.2.6
1887N/ACOMPONENT_PROJECT_URL= http://www.open-scap.org
1887N/ACOMPONENT_DOWNLOAD_URL= https://fedorahosted.org/releases/o/p/openscap
906N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
906N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
5492N/ACOMPONENT_ARCHIVE_HASH= sha256:95f2345e041e9ba838ad8065b68ce0ec4b0971d7afc72d601489236bbfc0c652
1887N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_DOWNLOAD_URL)/$(COMPONENT_ARCHIVE)
1887N/ACOMPONENT_BUGDB= utility/openscap
906N/A
5492N/ATPNO = 25520
3661N/A
1887N/ACFLAGS+= -std=c99
1887N/ACFLAGS+= -DNDEBUG
2473N/ACFLAGS+= -DOSCAP_THREAD_SAFE
906N/A
3985N/A# When Python 2.6 goes away, the _VERSION (singular) line below can go as well,
3985N/A# as can the COMPONENT_POST_CONFIGURE_ACTION and possibly more.
3985N/APYTHON_VERSION= 2.6
3985N/APYTHON_VERSIONS= $(PYTHON2_VERSIONS)
3806N/A
3996N/Ainclude $(WS_MAKE_RULES)/prep.mk
3996N/Ainclude $(WS_MAKE_RULES)/configure.mk
3996N/Ainclude $(WS_MAKE_RULES)/ips.mk
906N/A
1887N/ACPPFLAGS += -I/usr/include/openldap
1887N/A
906N/A# Perl related patch needs configure script recreation.
906N/ACOMPONENT_PREP_ACTION +=(cd $(@D); autoreconf);
906N/A
3806N/A# Need to do cloney, so that the schema files can get packaged.
3806N/ACOMPONENT_PRE_CONFIGURE_ACTION = \
3806N/A ($(CLONEY) $(SOURCE_DIR) $(@D))
3806N/A
3806N/A# We could use a single regular expression to cover all of the following,
3806N/A# but we want to be as specific as possible to avoid accidentally catching
3806N/A# workspace paths in our substitution.
3806N/ACOMPONENT_POST_CONFIGURE_ACTION = \
3806N/A (cd $(@D) ; cp -rp swig swig2.7 ; \
3806N/A $(GSED) -i -e 's|usr/include/python2.6|usr/include/python2.7|' \
3806N/A -e 's|$(PYTHON.2.6.VENDOR_PACKAGES.32)|$(PYTHON.2.7.VENDOR_PACKAGES.32)|' \
3806N/A -e 's|PYTHON_VERSION = 2.6|PYTHON_VERSION = 2.7|' swig2.7/Makefile swig2.7/python2/Makefile)
3806N/A
3806N/ACOMPONENT_POST_INSTALL_ACTION = \
4341N/A (cd $(@D)/swig2.7 ; $(GMAKE) $(COMPONENT_INSTALL_ARGS) install) ; \
4341N/A $(RM) $(PROTO_DIR)/usr/share/openscap/cpe/* && \
4341N/A $(CP) files/cpe/* $(PROTO_DIR)/usr/share/openscap/cpe
3806N/A
906N/A# Needed to make "gmake test" work.
1887N/ACPPFLAGS += -I$(SOURCE_DIR)/src/OVAL
1887N/ACPPFLAGS += -I$(SOURCE_DIR)/src/OVAL/probes
1887N/ACPPFLAGS += -I/usr/include/pcre
906N/A
1887N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
906N/ACONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)"
906N/ACONFIGURE_OPTIONS += --enable-debug=no
1887N/ACONFIGURE_OPTIONS += --enable-sce=yes
1887N/ACONFIGURE_OPTIONS += --enable-perl=yes
906N/ACONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_LIBDIR.$(BITS))
906N/ACONFIGURE_OPTIONS += am_cv_python_pythondir=$(PYTHON_VENDOR_PACKAGES)
906N/ACONFIGURE_OPTIONS += am_cv_python_pyexecdir=$(PYTHON_VENDOR_PACKAGES)
3806N/ACONFIGURE_OPTIONS += LIBS="-lldap_r -lnsl -lsocket -lscf -ldlpi -lsec -lzonecfg"
906N/A
2502N/ADOCS_DIR = $(PROTO_DIR)/usr/share/docs/openscap/html/
2502N/A
3806N/A# Enable ASLR for this component
3806N/AASLR_MODE = $(ASLR_ENABLE)
3806N/A
906N/A# common targets
3806N/Aconfigure: $(CONFIGURE_32)
3806N/A
906N/Abuild: $(BUILD_32)
906N/A
906N/Ainstall: $(INSTALL_32)
2502N/A $(MKDIR) $(DOCS_DIR)
5492N/A $(CP) -r $(SOURCE_DIR)/docs/html/* $(DOCS_DIR)
906N/A
906N/Atest: $(TEST_32)
906N/A
3996N/AREQUIRED_PACKAGES += compress/bzip2
4341N/AREQUIRED_PACKAGES += developer/swig
3996N/AREQUIRED_PACKAGES += gnome/config/gconf
3996N/AREQUIRED_PACKAGES += library/glib2
3996N/AREQUIRED_PACKAGES += library/libxml2
3996N/AREQUIRED_PACKAGES += library/libxslt
3996N/AREQUIRED_PACKAGES += library/openldap
3996N/AREQUIRED_PACKAGES += library/pcre
3996N/AREQUIRED_PACKAGES += runtime/perl-512
3996N/AREQUIRED_PACKAGES += runtime/python-26
3996N/AREQUIRED_PACKAGES += runtime/python-27
3996N/AREQUIRED_PACKAGES += security/compliance/openscap
3996N/AREQUIRED_PACKAGES += system/library
3996N/AREQUIRED_PACKAGES += system/library/gcc-3-runtime
3996N/AREQUIRED_PACKAGES += system/library/gcc-45-runtime
3996N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
3996N/AREQUIRED_PACKAGES += system/library/math
3996N/AREQUIRED_PACKAGES += system/library/security/libgcrypt
3996N/AREQUIRED_PACKAGES += system/zones
3996N/AREQUIRED_PACKAGES += web/curl