Makefile revision 3817
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#
3595N/A# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
906N/A#
906N/A
3817N/ACOMPILER = gcc
3817N/A
906N/Ainclude ../../make-rules/shared-macros.mk
906N/A
906N/ACOMPONENT_NAME= openscap
3595N/ACOMPONENT_VERSION= 1.2.0
1799N/ACOMPONENT_PROJECT_URL= http://www.open-scap.org
1799N/ACOMPONENT_DOWNLOAD_URL= https://fedorahosted.org/releases/o/p/openscap
906N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
906N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
3595N/ACOMPONENT_ARCHIVE_HASH= sha256:88329ebf23e7c7d063cdb5615fe1f68b18fb436a0df81307c5acc3b5963d7cec
1799N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_DOWNLOAD_URL)/$(COMPONENT_ARCHIVE)
1799N/ACOMPONENT_BUGDB= utility/openscap
906N/A
3595N/ATPNO = 20626
2899N/A
1389N/ACFLAGS+= -std=c99
1389N/ACFLAGS+= -DNDEBUG
2410N/ACFLAGS+= -DOSCAP_THREAD_SAFE
906N/A
3470N/APYTHON_VERSIONS= 2.7 2.6
3470N/A
3817N/Ainclude $(WS_MAKE_RULES)/prep.mk
3817N/Ainclude $(WS_MAKE_RULES)/configure.mk
3817N/Ainclude $(WS_MAKE_RULES)/ips.mk
906N/A
3703N/APERL_VERSION.32 = 5.12
3703N/APERL_VERSION.64 = 5.16
3703N/APERL_VERSION = $(PERL_VERSION.$(BITS))
3703N/APERL = $(PERL.$(PERL_VERSION))
3703N/ACONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
1389N/ACPPFLAGS += -I/usr/include/openldap
906N/A
906N/A# Perl related patch needs configure script recreation.
906N/ACOMPONENT_PREP_ACTION +=(cd $(@D); autoreconf);
906N/A
3470N/A# Need to do cloney, so that the schema files can get packaged.
3470N/ACOMPONENT_PRE_CONFIGURE_ACTION = \
3470N/A ($(CLONEY) $(SOURCE_DIR) $(@D))
3470N/A
3470N/A# We could use a single regular expression to cover all of the following,
3470N/A# but we want to be as specific as possible to avoid accidentally catching
3470N/A# workspace paths in our substitution.
3470N/ACOMPONENT_POST_CONFIGURE_ACTION = \
3470N/A (cd $(@D) ; cp -rp swig swig2.7 ; \
3470N/A $(GSED) -i -e 's|usr/include/python2.6|usr/include/python2.7|' \
3470N/A -e 's|$(PYTHON.2.6.VENDOR_PACKAGES.32)|$(PYTHON.2.7.VENDOR_PACKAGES.32)|' \
3595N/A -e 's|PYTHON_VERSION = 2.6|PYTHON_VERSION = 2.7|' swig2.7/Makefile swig2.7/python2/Makefile)
3470N/A
3470N/ACOMPONENT_POST_INSTALL_ACTION = \
3775N/A (cd $(@D)/swig2.7 ; $(GMAKE) $(COMPONENT_INSTALL_ARGS) install) ; \
3775N/A $(RM) $(PROTO_DIR)/usr/share/openscap/cpe/* && \
3775N/A $(CP) files/cpe/* $(PROTO_DIR)/usr/share/openscap/cpe
3775N/A
3470N/A
906N/A# Needed to make "gmake test" work.
1389N/ACPPFLAGS += -I$(SOURCE_DIR)/src/OVAL
1389N/ACPPFLAGS += -I$(SOURCE_DIR)/src/OVAL/probes
1389N/ACPPFLAGS += -I/usr/include/pcre
906N/A
3703N/ACONFIGURE_ENV += PERL="$(PERL)"
3703N/ACONFIGURE_ENV += PYTHON="$(PYTHON.$(BITS))"
3703N/ACONFIGURE_OPTIONS.32 += CFLAGS="$(CFLAGS)"
3703N/ACONFIGURE_OPTIONS.64 += CFLAGS="$(CFLAGS) -D_FILE_OFFSET_BITS=64"
906N/ACONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)"
906N/ACONFIGURE_OPTIONS += --enable-debug=no
1389N/ACONFIGURE_OPTIONS += --enable-sce=yes
1799N/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)
3032N/ACONFIGURE_OPTIONS += LIBS="-lldap_r -lscf -ldlpi -lsec -lzonecfg"
906N/A
2494N/ADOCS_DIR = $(PROTO_DIR)/usr/share/docs/openscap/html/
2494N/A
3703N/A# Enable ASLR for this component
3703N/AASLR_MODE = $(ASLR_ENABLE)
3470N/A
3703N/A# common targets
3703N/Aconfigure: $(CONFIGURE_32_and_64)
906N/A
3703N/Abuild: $(BUILD_32_and_64)
3703N/A
3703N/Ainstall: $(INSTALL_32_and_64)
2494N/A $(MKDIR) $(DOCS_DIR)
2494N/A $(CP) $(SOURCE_DIR)/docs/html/* $(DOCS_DIR)
906N/A
3703N/Atest: $(TEST_32_and_64)
906N/A
3817N/AREQUIRED_PACKAGES += compress/bzip2
3817N/AREQUIRED_PACKAGES += developer/swig
3817N/AREQUIRED_PACKAGES += gnome/config/gconf
3817N/AREQUIRED_PACKAGES += library/glib2
3817N/AREQUIRED_PACKAGES += library/libxml2
3817N/AREQUIRED_PACKAGES += library/libxslt
3817N/AREQUIRED_PACKAGES += library/openldap
3817N/AREQUIRED_PACKAGES += library/pcre
3817N/AREQUIRED_PACKAGES += runtime/perl-512
3817N/AREQUIRED_PACKAGES += runtime/perl-516
3817N/AREQUIRED_PACKAGES += runtime/python-26
3817N/AREQUIRED_PACKAGES += runtime/python-27
3817N/AREQUIRED_PACKAGES += security/compliance/openscap
3817N/AREQUIRED_PACKAGES += system/library
3817N/AREQUIRED_PACKAGES += system/library/gcc-3-runtime
3817N/AREQUIRED_PACKAGES += system/library/gcc-45-runtime
3817N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
3817N/AREQUIRED_PACKAGES += system/library/math
3817N/AREQUIRED_PACKAGES += system/library/security/libgcrypt
3817N/AREQUIRED_PACKAGES += system/zones
3817N/AREQUIRED_PACKAGES += web/curl