Makefile revision 3470
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews#
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater# CDDL HEADER START
7a2a1b8b14fc804ac80612d7b98064095e445be5Automatic Updater#
7a42357217528037bdfedcb17eeebfe96ae4266aAutomatic Updater# The contents of this file are subject to the terms of the
1167fc7904c5f0a472f8df207ac46dd52c7f1ec8Automatic Updater# Common Development and Distribution License (the "License").
0c39b3ed9409ecb277d5e32fa763a4e4d6598df8Automatic Updater# You may not use this file except in compliance with the License.
46da3117812814a29432a8d9a9ccf8acdbfdadceAutomatic Updater#
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0519188c8e1ae76978fc4e0f799620cd36eba07aAutomatic Updater# or http://www.opensolaris.org/os/licensing.
79b273c187a4aa1016a62181983dfdd0521681aeMark Andrews# See the License for the specific language governing permissions
90ff38a0d8deaf5f9c2aa5916d99b2e572d28738Automatic Updater# and limitations under the License.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
6c6a121295b30772cbf3dd75a51fb9d883051a0eAutomatic Updater# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# If applicable, add the following below this CDDL HEADER, with the
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater# fields enclosed by brackets "[]" replaced with your own identifying
bbde8dc56605130058a1540609264fa109da3b63Automatic Updater# information: Portions Copyright [yyyy] [name of copyright owner]
bbde8dc56605130058a1540609264fa109da3b63Automatic Updater#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# CDDL HEADER END
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater
3cc98b8ecedcbc8465f1cf2740b966b315662430Automatic Updater#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
bbde8dc56605130058a1540609264fa109da3b63Automatic Updater
bbde8dc56605130058a1540609264fa109da3b63Automatic Updaterinclude ../../make-rules/shared-macros.mk
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCOMPONENT_NAME= openscap
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark AndrewsCOMPONENT_VERSION= 1.0.0
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCOMPONENT_PROJECT_URL= http://www.open-scap.org
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCOMPONENT_DOWNLOAD_URL= https://fedorahosted.org/releases/o/p/openscap
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCOMPONENT_ARCHIVE_HASH= sha256:47105500b8b3d80cdf07b277bfab59091de5eadb16d97d27ee663bfbee58cb76
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCOMPONENT_ARCHIVE_URL= $(COMPONENT_DOWNLOAD_URL)/$(COMPONENT_ARCHIVE)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterCOMPONENT_BUGDB= utility/openscap
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan HuntTPNO= 16560
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterCOMPILER = gcc
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan HuntCFLAGS+= -std=c99
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterCFLAGS+= -DNDEBUG
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterCFLAGS+= -DOSCAP_THREAD_SAFE
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan HuntPYTHON_VERSIONS= 2.7 2.6
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater
2d2dc37599979c83495510f8af8d1756753aa2c5Automatic Updaterinclude $(WS_TOP)/make-rules/prep.mk
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Huntinclude $(WS_TOP)/make-rules/configure.mk
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updaterinclude $(WS_TOP)/make-rules/ips.mk
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterCPPFLAGS += -I/usr/include/openldap
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# Perl related patch needs configure script recreation.
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic UpdaterCOMPONENT_PREP_ACTION +=(cd $(@D); autoreconf);
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# Need to do cloney, so that the schema files can get packaged.
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterCOMPONENT_PRE_CONFIGURE_ACTION = \
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater ($(CLONEY) $(SOURCE_DIR) $(@D))
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews# We could use a single regular expression to cover all of the following,
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews# but we want to be as specific as possible to avoid accidentally catching
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews# workspace paths in our substitution.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonCOMPONENT_POST_CONFIGURE_ACTION = \
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater (cd $(@D) ; cp -rp swig swig2.7 ; \
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $(GSED) -i -e 's|usr/include/python2.6|usr/include/python2.7|' \
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater -e 's|$(PYTHON.2.6.VENDOR_PACKAGES.32)|$(PYTHON.2.7.VENDOR_PACKAGES.32)|' \
8e9f3b69914ee02a80b87c97b1f8093edb3e9ae0Automatic Updater -e 's|PYTHON_VERSION = 2.6|PYTHON_VERSION = 2.7|' swig2.7/Makefile)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
930f6069e5aa157cf6987cdafd412f5757a5a558Automatic UpdaterCOMPONENT_POST_INSTALL_ACTION = \
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews (cd $(@D)/swig2.7 ; $(GMAKE) $(COMPONENT_INSTALL_ARGS) install)
930f6069e5aa157cf6987cdafd412f5757a5a558Automatic Updater
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updater# Needed to make "gmake test" work.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCPPFLAGS += -I$(SOURCE_DIR)/src/OVAL
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic UpdaterCPPFLAGS += -I$(SOURCE_DIR)/src/OVAL/probes
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCPPFLAGS += -I/usr/include/pcre
930f6069e5aa157cf6987cdafd412f5757a5a558Automatic Updater
693c4232dfdffaff672197d4b9fea944c64cf80aAutomatic UpdaterCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)"
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCONFIGURE_OPTIONS += --enable-debug=no
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_OPTIONS += --enable-sce=yes
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCONFIGURE_OPTIONS += --enable-perl=yes
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_LIBDIR.$(BITS))
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark AndrewsCONFIGURE_OPTIONS += am_cv_python_pythondir=$(PYTHON_VENDOR_PACKAGES)
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCONFIGURE_OPTIONS += am_cv_python_pyexecdir=$(PYTHON_VENDOR_PACKAGES)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_OPTIONS += LIBS="-lldap_r -lscf -ldlpi -lsec -lzonecfg"
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCONFIGURE_OPTIONS += --with-report-branding="/usr/share/lib/xml/style/os-logo.xsl"
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonDOCS_DIR = $(PROTO_DIR)/usr/share/docs/openscap/html/
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater# common targets
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updaterconfigure: $(CONFIGURE_32)
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews
11af78f7dc35741bdab68dbab11b03daab005b28Automatic Updaterbuild: $(BUILD_32)
11af78f7dc35741bdab68dbab11b03daab005b28Automatic Updater
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrewsinstall: $(INSTALL_32)
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont $(MKDIR) $(DOCS_DIR)
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater $(CP) $(SOURCE_DIR)/docs/html/* $(DOCS_DIR)
8ccd7da886e93cd490fcb6f4c4e98a6514f35820Automatic Updater
2a31bd531072824ef252c18303859d6af7451b00Francis Duponttest: $(TEST_32)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic UpdaterBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
a308b69ac66fadf66863484f301314d6e6a3f1d2Automatic Updater
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsinclude $(WS_TOP)/make-rules/depend.mk
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews