Makefile revision 3775
2180N/A#
2180N/A# CDDL HEADER START
2180N/A#
2180N/A# The contents of this file are subject to the terms of the
2180N/A# Common Development and Distribution License (the "License").
2180N/A# You may not use this file except in compliance with the License.
2180N/A#
2180N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2180N/A# or http://www.opensolaris.org/os/licensing.
2180N/A# See the License for the specific language governing permissions
2180N/A# and limitations under the License.
2180N/A#
2180N/A# When distributing Covered Code, include this CDDL HEADER in each
2180N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2180N/A# If applicable, add the following below this CDDL HEADER, with the
2180N/A# fields enclosed by brackets "[]" replaced with your own identifying
2180N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2180N/A#
2180N/A# CDDL HEADER END
2180N/A
2180N/A#
2180N/A# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
2180N/A#
2180N/A
2180N/Ainclude ../../make-rules/shared-macros.mk
2180N/A
2180N/ACOMPONENT_NAME= openscap
2180N/ACOMPONENT_VERSION= 1.2.0
2180N/ACOMPONENT_PROJECT_URL= http://www.open-scap.org
2180N/ACOMPONENT_DOWNLOAD_URL= https://fedorahosted.org/releases/o/p/openscap
2180N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
2180N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
2180N/ACOMPONENT_ARCHIVE_HASH= sha256:88329ebf23e7c7d063cdb5615fe1f68b18fb436a0df81307c5acc3b5963d7cec
2180N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_DOWNLOAD_URL)/$(COMPONENT_ARCHIVE)
2180N/ACOMPONENT_BUGDB= utility/openscap
2180N/A
2180N/ATPNO = 20626
2180N/A
2180N/ACOMPILER = gcc
2180N/ACFLAGS+= -std=c99
2180N/ACFLAGS+= -DNDEBUG
2180N/ACFLAGS+= -DOSCAP_THREAD_SAFE
2180N/A
2180N/APYTHON_VERSIONS= 2.7 2.6
2180N/A
2180N/Ainclude $(WS_TOP)/make-rules/prep.mk
2180N/Ainclude $(WS_TOP)/make-rules/configure.mk
2180N/Ainclude $(WS_TOP)/make-rules/ips.mk
2180N/A
2180N/APERL_VERSION.32 = 5.12
2180N/APERL_VERSION.64 = 5.16
2180N/APERL_VERSION = $(PERL_VERSION.$(BITS))
2180N/APERL = $(PERL.$(PERL_VERSION))
2180N/ACONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
2180N/ACPPFLAGS += -I/usr/include/openldap
2180N/A
2180N/A# Perl related patch needs configure script recreation.
2180N/ACOMPONENT_PREP_ACTION +=(cd $(@D); autoreconf);
2180N/A
2180N/A# Need to do cloney, so that the schema files can get packaged.
2180N/ACOMPONENT_PRE_CONFIGURE_ACTION = \
2180N/A ($(CLONEY) $(SOURCE_DIR) $(@D))
2180N/A
2180N/A# We could use a single regular expression to cover all of the following,
2180N/A# but we want to be as specific as possible to avoid accidentally catching
2180N/A# workspace paths in our substitution.
2180N/ACOMPONENT_POST_CONFIGURE_ACTION = \
2180N/A (cd $(@D) ; cp -rp swig swig2.7 ; \
2180N/A $(GSED) -i -e 's|usr/include/python2.6|usr/include/python2.7|' \
2180N/A -e 's|$(PYTHON.2.6.VENDOR_PACKAGES.32)|$(PYTHON.2.7.VENDOR_PACKAGES.32)|' \
2180N/A -e 's|PYTHON_VERSION = 2.6|PYTHON_VERSION = 2.7|' swig2.7/Makefile swig2.7/python2/Makefile)
2180N/A
2180N/ACOMPONENT_POST_INSTALL_ACTION = \
2180N/A (cd $(@D)/swig2.7 ; $(GMAKE) $(COMPONENT_INSTALL_ARGS) install) ; \
2180N/A $(RM) $(PROTO_DIR)/usr/share/openscap/cpe/* && \
2180N/A $(CP) files/cpe/* $(PROTO_DIR)/usr/share/openscap/cpe
2180N/A
2180N/A
2180N/A# Needed to make "gmake test" work.
2180N/ACPPFLAGS += -I$(SOURCE_DIR)/src/OVAL
2180N/ACPPFLAGS += -I$(SOURCE_DIR)/src/OVAL/probes
2180N/ACPPFLAGS += -I/usr/include/pcre
2180N/A
2180N/ACONFIGURE_ENV += PERL="$(PERL)"
2180N/ACONFIGURE_ENV += PYTHON="$(PYTHON.$(BITS))"
2180N/ACONFIGURE_OPTIONS.32 += CFLAGS="$(CFLAGS)"
2180N/ACONFIGURE_OPTIONS.64 += CFLAGS="$(CFLAGS) -D_FILE_OFFSET_BITS=64"
2180N/ACONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)"
2180N/ACONFIGURE_OPTIONS += --enable-debug=no
2180N/ACONFIGURE_OPTIONS += --enable-sce=yes
2180N/ACONFIGURE_OPTIONS += --enable-perl=yes
2180N/ACONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_LIBDIR.$(BITS))
2180N/ACONFIGURE_OPTIONS += am_cv_python_pythondir=$(PYTHON_VENDOR_PACKAGES)
2180N/ACONFIGURE_OPTIONS += am_cv_python_pyexecdir=$(PYTHON_VENDOR_PACKAGES)
2180N/ACONFIGURE_OPTIONS += LIBS="-lldap_r -lscf -ldlpi -lsec -lzonecfg"
2180N/A
2180N/ADOCS_DIR = $(PROTO_DIR)/usr/share/docs/openscap/html/
2180N/A
2180N/A# Enable ASLR for this component
2180N/AASLR_MODE = $(ASLR_ENABLE)
2180N/A
2180N/A# common targets
2180N/Aconfigure: $(CONFIGURE_32_and_64)
2180N/A
2180N/Abuild: $(BUILD_32_and_64)
2180N/A
2180N/Ainstall: $(INSTALL_32_and_64)
2180N/A $(MKDIR) $(DOCS_DIR)
2180N/A $(CP) $(SOURCE_DIR)/docs/html/* $(DOCS_DIR)
2180N/A
2180N/Atest: $(TEST_32_and_64)
2180N/A
2180N/ABUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
2180N/A
2180N/Ainclude $(WS_TOP)/make-rules/depend.mk
2180N/A