Makefile revision 5341
20c794b39650d115e17a15983b6b82e46238cf45gavinm#
20c794b39650d115e17a15983b6b82e46238cf45gavinm# CDDL HEADER START
20c794b39650d115e17a15983b6b82e46238cf45gavinm#
20c794b39650d115e17a15983b6b82e46238cf45gavinm# The contents of this file are subject to the terms of the
20c794b39650d115e17a15983b6b82e46238cf45gavinm# Common Development and Distribution License (the "License").
20c794b39650d115e17a15983b6b82e46238cf45gavinm# You may not use this file except in compliance with the License.
20c794b39650d115e17a15983b6b82e46238cf45gavinm#
20c794b39650d115e17a15983b6b82e46238cf45gavinm# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
20c794b39650d115e17a15983b6b82e46238cf45gavinm# or http://www.opensolaris.org/os/licensing.
20c794b39650d115e17a15983b6b82e46238cf45gavinm# See the License for the specific language governing permissions
20c794b39650d115e17a15983b6b82e46238cf45gavinm# and limitations under the License.
20c794b39650d115e17a15983b6b82e46238cf45gavinm#
20c794b39650d115e17a15983b6b82e46238cf45gavinm# When distributing Covered Code, include this CDDL HEADER in each
20c794b39650d115e17a15983b6b82e46238cf45gavinm# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20c794b39650d115e17a15983b6b82e46238cf45gavinm# If applicable, add the following below this CDDL HEADER, with the
20c794b39650d115e17a15983b6b82e46238cf45gavinm# fields enclosed by brackets "[]" replaced with your own identifying
20c794b39650d115e17a15983b6b82e46238cf45gavinm# information: Portions Copyright [yyyy] [name of copyright owner]
20c794b39650d115e17a15983b6b82e46238cf45gavinm#
20c794b39650d115e17a15983b6b82e46238cf45gavinm# CDDL HEADER END
20c794b39650d115e17a15983b6b82e46238cf45gavinm
20c794b39650d115e17a15983b6b82e46238cf45gavinm#
20c794b39650d115e17a15983b6b82e46238cf45gavinm# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
c84b7bbef5ecc2a27799422588073deefd9db715Adrian Frost#
20c794b39650d115e17a15983b6b82e46238cf45gavinm
a31148363f598def767ac48c5d82e1572e44b935Gerry LiuCOMPILER = gcc
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
a31148363f598def767ac48c5d82e1572e44b935Gerry Liuinclude ../../make-rules/shared-macros.mk
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu
20c794b39650d115e17a15983b6b82e46238cf45gavinmCOMPONENT_NAME= openscap
20c794b39650d115e17a15983b6b82e46238cf45gavinmCOMPONENT_VERSION= 1.2.6
20c794b39650d115e17a15983b6b82e46238cf45gavinmCOMPONENT_PROJECT_URL= http://www.open-scap.org
20c794b39650d115e17a15983b6b82e46238cf45gavinmCOMPONENT_DOWNLOAD_URL= https://fedorahosted.org/releases/o/p/openscap
20c794b39650d115e17a15983b6b82e46238cf45gavinmCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
20c794b39650d115e17a15983b6b82e46238cf45gavinmCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
20c794b39650d115e17a15983b6b82e46238cf45gavinmCOMPONENT_ARCHIVE_HASH= sha256:95f2345e041e9ba838ad8065b68ce0ec4b0971d7afc72d601489236bbfc0c652
20c794b39650d115e17a15983b6b82e46238cf45gavinmCOMPONENT_ARCHIVE_URL= $(COMPONENT_DOWNLOAD_URL)/$(COMPONENT_ARCHIVE)
20c794b39650d115e17a15983b6b82e46238cf45gavinmCOMPONENT_BUGDB= utility/openscap
20c794b39650d115e17a15983b6b82e46238cf45gavinm
20c794b39650d115e17a15983b6b82e46238cf45gavinmTPNO = 25520
20c794b39650d115e17a15983b6b82e46238cf45gavinm
20c794b39650d115e17a15983b6b82e46238cf45gavinmCFLAGS+= -std=c99
20c794b39650d115e17a15983b6b82e46238cf45gavinmCFLAGS+= -DNDEBUG
20c794b39650d115e17a15983b6b82e46238cf45gavinmCFLAGS+= -DOSCAP_THREAD_SAFE
20c794b39650d115e17a15983b6b82e46238cf45gavinm
20c794b39650d115e17a15983b6b82e46238cf45gavinmPYTHON_VERSIONS= $(PYTHON2_VERSIONS)
20c794b39650d115e17a15983b6b82e46238cf45gavinm
20c794b39650d115e17a15983b6b82e46238cf45gavinmPERL_VERSIONS = 5.20
20c794b39650d115e17a15983b6b82e46238cf45gavinm
20c794b39650d115e17a15983b6b82e46238cf45gavinminclude $(WS_MAKE_RULES)/prep.mk
20c794b39650d115e17a15983b6b82e46238cf45gavinminclude $(WS_MAKE_RULES)/configure.mk
20c794b39650d115e17a15983b6b82e46238cf45gavinminclude $(WS_MAKE_RULES)/ips.mk
20c794b39650d115e17a15983b6b82e46238cf45gavinm
20c794b39650d115e17a15983b6b82e46238cf45gavinmPERL_VERSION.64 = 5.20
20c794b39650d115e17a15983b6b82e46238cf45gavinmPERL_VERSION = $(PERL_VERSION.$(BITS))
20c794b39650d115e17a15983b6b82e46238cf45gavinmPERL = $(PERL.$(PERL_VERSION))
20c794b39650d115e17a15983b6b82e46238cf45gavinmPKG_MACROS += P_ARCH=$(shell arch)
20c794b39650d115e17a15983b6b82e46238cf45gavinmCONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
20c794b39650d115e17a15983b6b82e46238cf45gavinmCPPFLAGS += -I/usr/include/openldap
20c794b39650d115e17a15983b6b82e46238cf45gavinm
20c794b39650d115e17a15983b6b82e46238cf45gavinm# Perl related patch needs configure script recreation.
20c794b39650d115e17a15983b6b82e46238cf45gavinmCOMPONENT_PREP_ACTION +=(cd $(@D); autoreconf);
20c794b39650d115e17a15983b6b82e46238cf45gavinm
20c794b39650d115e17a15983b6b82e46238cf45gavinm# Need to do cloney, so that the schema files can get packaged.
20c794b39650d115e17a15983b6b82e46238cf45gavinmCOMPONENT_PRE_CONFIGURE_ACTION = \
20c794b39650d115e17a15983b6b82e46238cf45gavinm ($(CLONEY) $(SOURCE_DIR) $(@D))
20c794b39650d115e17a15983b6b82e46238cf45gavinm
20c794b39650d115e17a15983b6b82e46238cf45gavinmCOMPONENT_POST_INSTALL_ACTION = \
20c794b39650d115e17a15983b6b82e46238cf45gavinm $(RM) $(PROTO_DIR)/usr/share/openscap/cpe/* && \
20c794b39650d115e17a15983b6b82e46238cf45gavinm $(CP) files/cpe/* $(PROTO_DIR)/usr/share/openscap/cpe
20c794b39650d115e17a15983b6b82e46238cf45gavinm
20c794b39650d115e17a15983b6b82e46238cf45gavinm
20c794b39650d115e17a15983b6b82e46238cf45gavinm# Needed to make "gmake test" work.
20c794b39650d115e17a15983b6b82e46238cf45gavinmCPPFLAGS += -I$(SOURCE_DIR)/src/OVAL
20c794b39650d115e17a15983b6b82e46238cf45gavinmCPPFLAGS += -I$(SOURCE_DIR)/src/OVAL/probes
20c794b39650d115e17a15983b6b82e46238cf45gavinmCPPFLAGS += -I/usr/include/pcre
20c794b39650d115e17a15983b6b82e46238cf45gavinm
20c794b39650d115e17a15983b6b82e46238cf45gavinmCONFIGURE_ENV += PERL="$(PERL)"
20c794b39650d115e17a15983b6b82e46238cf45gavinmCONFIGURE_ENV += PYTHON="$(PYTHON.$(BITS))"
20c794b39650d115e17a15983b6b82e46238cf45gavinmCONFIGURE_OPTIONS.64 += CFLAGS="$(CFLAGS) -D_FILE_OFFSET_BITS=64"
20c794b39650d115e17a15983b6b82e46238cf45gavinmCONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)"
20c794b39650d115e17a15983b6b82e46238cf45gavinmCONFIGURE_OPTIONS += --enable-debug=no
20c794b39650d115e17a15983b6b82e46238cf45gavinmCONFIGURE_OPTIONS += --enable-sce=yes
20c794b39650d115e17a15983b6b82e46238cf45gavinmCONFIGURE_OPTIONS += --enable-perl=yes
20c794b39650d115e17a15983b6b82e46238cf45gavinmCONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_LIBDIR.$(BITS))
20c794b39650d115e17a15983b6b82e46238cf45gavinmCONFIGURE_OPTIONS += am_cv_python_pythondir=$(PYTHON_VENDOR_PACKAGES)
20c794b39650d115e17a15983b6b82e46238cf45gavinmCONFIGURE_OPTIONS += am_cv_python_pyexecdir=$(PYTHON_VENDOR_PACKAGES)
20c794b39650d115e17a15983b6b82e46238cf45gavinmEXTRA_LIBS = -lldap_r
20c794b39650d115e17a15983b6b82e46238cf45gavinmifeq ($(OS_VERSION),5.11)
20c794b39650d115e17a15983b6b82e46238cf45gavinmEXTRA_LIBS += -lnsl -lsocket
20c794b39650d115e17a15983b6b82e46238cf45gavinmendif
20c794b39650d115e17a15983b6b82e46238cf45gavinmEXTRA_LIBS += -lscf -ldlpi -lsec -lzonecfg -lv12n
20c794b39650d115e17a15983b6b82e46238cf45gavinmCONFIGURE_OPTIONS += LIBS="$(EXTRA_LIBS)"
20c794b39650d115e17a15983b6b82e46238cf45gavinm
20c794b39650d115e17a15983b6b82e46238cf45gavinmDOCS_DIR = $(PROTO_DIR)/usr/share/doc/openscap/html/
20c794b39650d115e17a15983b6b82e46238cf45gavinm
20c794b39650d115e17a15983b6b82e46238cf45gavinm# Enable ASLR for this component
20c794b39650d115e17a15983b6b82e46238cf45gavinmASLR_MODE = $(ASLR_ENABLE)
20c794b39650d115e17a15983b6b82e46238cf45gavinm
20c794b39650d115e17a15983b6b82e46238cf45gavinm# common targets
20c794b39650d115e17a15983b6b82e46238cf45gavinmconfigure: $(CONFIGURE_64)
20c794b39650d115e17a15983b6b82e46238cf45gavinm
20c794b39650d115e17a15983b6b82e46238cf45gavinmbuild: $(BUILD_64)
20c794b39650d115e17a15983b6b82e46238cf45gavinm
20c794b39650d115e17a15983b6b82e46238cf45gavinminstall: $(INSTALL_64)
20c794b39650d115e17a15983b6b82e46238cf45gavinm $(MKDIR) $(DOCS_DIR)
20c794b39650d115e17a15983b6b82e46238cf45gavinm $(CP) -r $(SOURCE_DIR)/docs/html/* $(DOCS_DIR)
20c794b39650d115e17a15983b6b82e46238cf45gavinm
20c794b39650d115e17a15983b6b82e46238cf45gavinmtest: $(TEST_64)
20c794b39650d115e17a15983b6b82e46238cf45gavinm
20c794b39650d115e17a15983b6b82e46238cf45gavinmsystem-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)
20c794b39650d115e17a15983b6b82e46238cf45gavinm
20c794b39650d115e17a15983b6b82e46238cf45gavinmREQUIRED_PACKAGES += compress/bzip2
20c794b39650d115e17a15983b6b82e46238cf45gavinmREQUIRED_PACKAGES += developer/swig
20c794b39650d115e17a15983b6b82e46238cf45gavinmREQUIRED_PACKAGES += gnome/config/gconf
20c794b39650d115e17a15983b6b82e46238cf45gavinmREQUIRED_PACKAGES += library/glib2
20c794b39650d115e17a15983b6b82e46238cf45gavinmREQUIRED_PACKAGES += library/libxml2
20c794b39650d115e17a15983b6b82e46238cf45gavinmREQUIRED_PACKAGES += library/libxslt
20c794b39650d115e17a15983b6b82e46238cf45gavinmREQUIRED_PACKAGES += library/openldap
20c794b39650d115e17a15983b6b82e46238cf45gavinmREQUIRED_PACKAGES += library/pcre
20c794b39650d115e17a15983b6b82e46238cf45gavinmREQUIRED_PACKAGES += runtime/perl-520
20c794b39650d115e17a15983b6b82e46238cf45gavinmREQUIRED_PACKAGES += runtime/python-27
20c794b39650d115e17a15983b6b82e46238cf45gavinmREQUIRED_PACKAGES += security/compliance/openscap
20c794b39650d115e17a15983b6b82e46238cf45gavinmREQUIRED_PACKAGES += system/library
20c794b39650d115e17a15983b6b82e46238cf45gavinmREQUIRED_PACKAGES += system/library/gcc-3-runtime
20c794b39650d115e17a15983b6b82e46238cf45gavinmREQUIRED_PACKAGES += system/library/gcc-45-runtime
20c794b39650d115e17a15983b6b82e46238cf45gavinmREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
20c794b39650d115e17a15983b6b82e46238cf45gavinmREQUIRED_PACKAGES += system/library/math
20c794b39650d115e17a15983b6b82e46238cf45gavinmREQUIRED_PACKAGES += system/library/security/libgcrypt
20c794b39650d115e17a15983b6b82e46238cf45gavinmREQUIRED_PACKAGES += system/library/libv12n
20c794b39650d115e17a15983b6b82e46238cf45gavinmREQUIRED_PACKAGES += system/zones
20c794b39650d115e17a15983b6b82e46238cf45gavinmREQUIRED_PACKAGES += web/curl
20c794b39650d115e17a15983b6b82e46238cf45gavinm