Makefile revision 4260
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont#
11e9368a226272085c337e9e74b79808c16fbdbaTinderbox User# CDDL HEADER START
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont#
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# The contents of this file are subject to the terms of the
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# Common Development and Distribution License (the "License").
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# You may not use this file except in compliance with the License.
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont#
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# or http://www.opensolaris.org/os/licensing.
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# See the License for the specific language governing permissions
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# and limitations under the License.
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont#
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# When distributing Covered Code, include this CDDL HEADER in each
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# If applicable, add the following below this CDDL HEADER, with the
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# fields enclosed by brackets "[]" replaced with your own identifying
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# information: Portions Copyright [yyyy] [name of copyright owner]
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont#
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# CDDL HEADER END
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User#
50066670817cdf9e86c832066d73715232b29680Tinderbox User
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCOMPILER = gcc
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
2a31bd531072824ef252c18303859d6af7451b00Francis Dupontinclude ../../make-rules/shared-macros.mk
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCOMPONENT_NAME= openscap
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCOMPONENT_VERSION= 1.2.3
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCOMPONENT_PROJECT_URL= http://www.open-scap.org
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCOMPONENT_DOWNLOAD_URL= https://fedorahosted.org/releases/o/p/openscap
50066670817cdf9e86c832066d73715232b29680Tinderbox UserCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCOMPONENT_ARCHIVE_HASH= sha256:c15d587e5cdfcef1316536e6ed8ad66fea3e083ac3d3b723b7e54208f63787c7
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCOMPONENT_ARCHIVE_URL= $(COMPONENT_DOWNLOAD_URL)/$(COMPONENT_ARCHIVE)
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCOMPONENT_BUGDB= utility/openscap
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
2a31bd531072824ef252c18303859d6af7451b00Francis DupontTPNO = 22513
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCFLAGS+= -std=c99
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCFLAGS+= -DNDEBUG
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCFLAGS+= -DOSCAP_THREAD_SAFE
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# When Python 2.6 goes away, the _VERSION (singular) line below can go as well,
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# as can the COMPONENT_POST_CONFIGURE_ACTION and possibly more.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserPYTHON_VERSION= 2.6
2a31bd531072824ef252c18303859d6af7451b00Francis DupontPYTHON_VERSIONS= $(PYTHON2_VERSIONS)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userinclude $(WS_MAKE_RULES)/prep.mk
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userinclude $(WS_MAKE_RULES)/configure.mk
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userinclude $(WS_MAKE_RULES)/ips.mk
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
794b79e6bbc3f5db1ea6ae154d739b9f1ef1a375Tinderbox UserPERL_VERSION.32 = 5.12
794b79e6bbc3f5db1ea6ae154d739b9f1ef1a375Tinderbox UserPERL_VERSION.64 = 5.16
794b79e6bbc3f5db1ea6ae154d739b9f1ef1a375Tinderbox UserPERL_VERSION = $(PERL_VERSION.$(BITS))
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntPERL = $(PERL.$(PERL_VERSION))
794b79e6bbc3f5db1ea6ae154d739b9f1ef1a375Tinderbox UserCONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
794b79e6bbc3f5db1ea6ae154d739b9f1ef1a375Tinderbox UserCPPFLAGS += -I/usr/include/openldap
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Perl related patch needs configure script recreation.
c7d32c0b0ff4c01f0d4479af3410d3c06044d48aAutomatic UpdaterCOMPONENT_PREP_ACTION +=(cd $(@D); autoreconf);
c7d32c0b0ff4c01f0d4479af3410d3c06044d48aAutomatic Updater
c7d32c0b0ff4c01f0d4479af3410d3c06044d48aAutomatic Updater# Need to do cloney, so that the schema files can get packaged.
c7d32c0b0ff4c01f0d4479af3410d3c06044d48aAutomatic UpdaterCOMPONENT_PRE_CONFIGURE_ACTION = \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User ($(CLONEY) $(SOURCE_DIR) $(@D))
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# We could use a single regular expression to cover all of the following,
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# but we want to be as specific as possible to avoid accidentally catching
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# workspace paths in our substitution.
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCOMPONENT_POST_CONFIGURE_ACTION = \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User (cd $(@D) ; cp -rp swig swig2.7 ; \
28b3569d6248168e6c00caab951521cc8141a49dAutomatic Updater $(GSED) -i -e 's|usr/include/python2.6|usr/include/python2.7|' \
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic Updater -e 's|$(PYTHON.2.6.VENDOR_PACKAGES.32)|$(PYTHON.2.7.VENDOR_PACKAGES.32)|' \
cd791043c8a6edbcacc2392575a9816d19b8157cTinderbox User -e 's|PYTHON_VERSION = 2.6|PYTHON_VERSION = 2.7|' swig2.7/Makefile swig2.7/python2/Makefile)
cd791043c8a6edbcacc2392575a9816d19b8157cTinderbox User
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic UpdaterCOMPONENT_POST_INSTALL_ACTION = \
28b3569d6248168e6c00caab951521cc8141a49dAutomatic Updater (cd $(@D)/swig2.7 ; $(GMAKE) $(COMPONENT_INSTALL_ARGS) install) ; \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User $(RM) $(PROTO_DIR)/usr/share/openscap/cpe/* && \
2a6d4c9948b3f4f31311bd799d114585a30419a9Automatic Updater $(CP) files/cpe/* $(PROTO_DIR)/usr/share/openscap/cpe
2a6d4c9948b3f4f31311bd799d114585a30419a9Automatic Updater
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic Updater
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic Updater# Needed to make "gmake test" work.
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic UpdaterCPPFLAGS += -I$(SOURCE_DIR)/src/OVAL
2a6d4c9948b3f4f31311bd799d114585a30419a9Automatic UpdaterCPPFLAGS += -I$(SOURCE_DIR)/src/OVAL/probes
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCPPFLAGS += -I/usr/include/pcre
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont
28b3569d6248168e6c00caab951521cc8141a49dAutomatic UpdaterCONFIGURE_ENV += PERL="$(PERL)"
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCONFIGURE_ENV += PYTHON="$(PYTHON.$(BITS))"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS.32 += CFLAGS="$(CFLAGS)"
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCONFIGURE_OPTIONS.64 += CFLAGS="$(CFLAGS) -D_FILE_OFFSET_BITS=64"
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS += --enable-debug=no
2a6d4c9948b3f4f31311bd799d114585a30419a9Automatic UpdaterCONFIGURE_OPTIONS += --enable-sce=yes
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS += --enable-perl=yes
2a6d4c9948b3f4f31311bd799d114585a30419a9Automatic UpdaterCONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_LIBDIR.$(BITS))
2a6d4c9948b3f4f31311bd799d114585a30419a9Automatic UpdaterCONFIGURE_OPTIONS += am_cv_python_pythondir=$(PYTHON_VENDOR_PACKAGES)
2a6d4c9948b3f4f31311bd799d114585a30419a9Automatic UpdaterCONFIGURE_OPTIONS += am_cv_python_pyexecdir=$(PYTHON_VENDOR_PACKAGES)
2a6d4c9948b3f4f31311bd799d114585a30419a9Automatic UpdaterCONFIGURE_OPTIONS += LIBS="-lldap_r -lscf -ldlpi -lsec -lzonecfg"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic UpdaterDOCS_DIR = $(PROTO_DIR)/usr/share/docs/openscap/html/
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Enable ASLR for this component
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox UserASLR_MODE = $(ASLR_ENABLE)
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# common targets
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox Userconfigure: $(CONFIGURE_32_and_64)
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox Userbuild: $(BUILD_32_and_64)
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox Userinstall: $(INSTALL_32_and_64)
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User $(MKDIR) $(DOCS_DIR)
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User $(CP) $(SOURCE_DIR)/docs/html/* $(DOCS_DIR)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
2a31bd531072824ef252c18303859d6af7451b00Francis Duponttest: $(TEST_32_and_64)
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserREQUIRED_PACKAGES += compress/bzip2
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserREQUIRED_PACKAGES += developer/swig
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserREQUIRED_PACKAGES += gnome/config/gconf
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserREQUIRED_PACKAGES += library/glib2
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserREQUIRED_PACKAGES += library/libxml2
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserREQUIRED_PACKAGES += library/libxslt
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserREQUIRED_PACKAGES += library/openldap
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserREQUIRED_PACKAGES += library/pcre
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserREQUIRED_PACKAGES += runtime/perl-512
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserREQUIRED_PACKAGES += runtime/perl-516
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserREQUIRED_PACKAGES += runtime/python-26
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserREQUIRED_PACKAGES += runtime/python-27
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserREQUIRED_PACKAGES += security/compliance/openscap
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserREQUIRED_PACKAGES += system/library
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserREQUIRED_PACKAGES += system/library/gcc-3-runtime
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserREQUIRED_PACKAGES += system/library/gcc-45-runtime
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserREQUIRED_PACKAGES += system/library/math
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserREQUIRED_PACKAGES += system/library/security/libgcrypt
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserREQUIRED_PACKAGES += system/zones
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox UserREQUIRED_PACKAGES += web/curl
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox User