Makefile revision 6120
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
dcfda24abf565c442d058cbf81b2180d847a1b3eAutomatic Updater# CDDL HEADER START
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# The contents of this file are subject to the terms of the
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# Common Development and Distribution License (the "License").
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# You may not use this file except in compliance with the License.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# or http://www.opensolaris.org/os/licensing.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# See the License for the specific language governing permissions
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# and limitations under the License.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
a3f8c8e20780e488141d200acdfea6c5f3303513Automatic Updater# information: Portions Copyright [yyyy] [name of copyright owner]
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# CDDL HEADER END
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsBUILD_BITS= 64
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCOMPILER= gcc
2cbb4ab75757fbb656997a82c14ca07db37d481aAutomatic Updaterinclude ../../make-rules/shared-macros.mk
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_NAME= openscap
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_VERSION= 1.2.6
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_PROJECT_URL= http://www.open-scap.org
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_DOWNLOAD_URL= https://fedorahosted.org/releases/o/p/openscap
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_ARCHIVE_HASH= sha256:95f2345e041e9ba838ad8065b68ce0ec4b0971d7afc72d601489236bbfc0c652
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_ARCHIVE_URL= $(COMPONENT_DOWNLOAD_URL)/$(COMPONENT_ARCHIVE)
28b3569d6248168e6c00caab951521cc8141a49dAutomatic Updater
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsTPNO = 25520
2cbb4ab75757fbb656997a82c14ca07db37d481aAutomatic Updater
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Requires newer version of system/management/rad/client/rad-c from ON,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# available in S12 but not 11.3, so do not publish.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsifeq ($(BUILD_TYPE), evaluation)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsBUILD_64=
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsINSTALL_64=
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsPUBLISH_STAMP=
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsendif
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCFLAGS+= -std=c99
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCFLAGS+= -DNDEBUG
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCFLAGS+= -DOSCAP_THREAD_SAFE
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsPYTHON_VERSIONS= $(PYTHON2_VERSIONS)
a3f8c8e20780e488141d200acdfea6c5f3303513Automatic Updater
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# publish for only one version of perl
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsPERL_VERSIONS = $(PERL_VERSION)
a3f8c8e20780e488141d200acdfea6c5f3303513Automatic Updater
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude $(WS_MAKE_RULES)/common.mk
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark AndrewsCONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterCPPFLAGS += -I$(USRINCDIR)/openldap
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterRAD_CLIENT_LIB_PATH = /usr/lib/rad/client/c/$(MACH64)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
ad671240d635376dd8681550eebee799d2e3d1fdAutomatic UpdaterLDFLAGS += -L$(RAD_CLIENT_LIB_PATH) -R$(RAD_CLIENT_LIB_PATH) -lradclient -ladr -lips_client -lzonemgr_client
ad671240d635376dd8681550eebee799d2e3d1fdAutomatic Updater
ad671240d635376dd8681550eebee799d2e3d1fdAutomatic Updater# XXX This shouldn't be necessary, but is; investigate why.
ad671240d635376dd8681550eebee799d2e3d1fdAutomatic UpdaterCFLAGS += -D_FILE_OFFSET_BITS=64
ad671240d635376dd8681550eebee799d2e3d1fdAutomatic Updater
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Perl related patch needs configure script recreation.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_PREP_ACTION +=(cd $(@D); autoreconf);
a3f8c8e20780e488141d200acdfea6c5f3303513Automatic Updater
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Need to do cloney, so that the schema files can get packaged.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_PRE_CONFIGURE_ACTION = \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ($(CLONEY) $(SOURCE_DIR) $(@D))
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterCOMPONENT_POST_INSTALL_ACTION = \
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater $(RM) $(PROTO_DIR)/usr/share/openscap/cpe/* && \
0e9e255d1643375056aa9ed7fe2a279713ffae78Automatic Updater $(CP) files/cpe/* $(PROTO_DIR)/usr/share/openscap/cpe; \
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic Updater $(MV) $(PROTO_DIR)/usr/lib/python2.7/vendor-packages/64/*.py* \
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater $(PROTO_DIR)/usr/lib/python2.7/vendor-packages/ ;
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater# Needed to make "gmake test" work.
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterCPPFLAGS += -I$(SOURCE_DIR)/src/OVAL
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterCPPFLAGS += -I$(SOURCE_DIR)/src/OVAL/probes
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterCPPFLAGS += -I$(USRINCDIR)/pcre
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic Updater
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic UpdaterCONFIGURE_ENV += PERL="$(PERL)"
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic UpdaterCONFIGURE_ENV += PYTHON="$(PYTHON.$(BITS))"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --enable-debug=no
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --enable-sce=yes
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --enable-perl=yes
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic UpdaterCONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_LIBDIR.$(BITS))
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic UpdaterCONFIGURE_OPTIONS += am_cv_python_pythondir=$(PYTHON_VENDOR_PACKAGES)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += am_cv_python_pyexecdir=$(PYTHON_VENDOR_PACKAGES)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsEXTRA_LIBS = -lldap_r
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updaterifeq ($(OS_VERSION),5.11)
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterEXTRA_LIBS += -lnsl -lsocket
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsendif
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsEXTRA_LIBS += -lscf -ldlpi -lsec -lv12n
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS) $(EXTRA_LIBS)"
ca67ebfe9eef0b8f04179f7e511a19e0337a5422Automatic Updater
ca67ebfe9eef0b8f04179f7e511a19e0337a5422Automatic UpdaterDOCS_DIR = $(PROTO_DIR)/usr/share/doc/openscap/html/
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic UpdaterCOMPONENT_POST_INSTALL_ACTION += \
ca67ebfe9eef0b8f04179f7e511a19e0337a5422Automatic Updater $(MKDIR) $(DOCS_DIR); \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(CP) -r $(SOURCE_DIR)/docs/html/* $(DOCS_DIR);
8e821eea5f57ac47a94305aa7ab0c3570d92a311Automatic Updater
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsREQUIRED_PACKAGES += compress/bzip2
ca67ebfe9eef0b8f04179f7e511a19e0337a5422Automatic UpdaterREQUIRED_PACKAGES += developer/swig
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterREQUIRED_PACKAGES += gnome/config/gconf
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterREQUIRED_PACKAGES += library/glib2
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterREQUIRED_PACKAGES += library/libxml2
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterREQUIRED_PACKAGES += library/libxslt
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterREQUIRED_PACKAGES += library/openldap
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterREQUIRED_PACKAGES += library/pcre
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterREQUIRED_PACKAGES += $(PERL_PKG)
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterREQUIRED_PACKAGES += runtime/python-27
ca67ebfe9eef0b8f04179f7e511a19e0337a5422Automatic UpdaterREQUIRED_PACKAGES += security/compliance/openscap
ca67ebfe9eef0b8f04179f7e511a19e0337a5422Automatic UpdaterREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsREQUIRED_PACKAGES += system/library/math
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsREQUIRED_PACKAGES += system/library/security/libgcrypt
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsREQUIRED_PACKAGES += system/library/libv12n
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsREQUIRED_PACKAGES += system/management/rad
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsREQUIRED_PACKAGES += system/management/rad/client/rad-c
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsREQUIRED_PACKAGES += system/network/ldap/openldap
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsREQUIRED_PACKAGES += system/zones
2f8d63983c297c62630044d28a6f66676b4d339dMark AndrewsREQUIRED_PACKAGES += web/curl
2f8d63983c297c62630044d28a6f66676b4d339dMark Andrews