components/openvswitch/Makefile
changeset 5682 94c0ca64c022
parent 5173 fe10c87a291e
child 5730 cca4aa297e68
--- a/components/openvswitch/Makefile	Wed Mar 30 10:16:56 2016 -0700
+++ b/components/openvswitch/Makefile	Wed Mar 30 13:33:31 2016 -0700
@@ -21,30 +21,25 @@
 #
 
 #
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 
 # parfait fails to compile us (22221056)
 export PARFAIT_BUILD=no
 
+BUILD_BITS= 64
 include ../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		openvswitch
 COMPONENT_VERSION=	2.3.1
-COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
-COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
 COMPONENT_ARCHIVE_HASH=	\
     sha256:d6d96e45fd9c070cc2696a4a09b4cc4b48dd7fc367c0455725d00f7daa343bf0
 COMPONENT_PROJECT_URL=  http://openvswitch.org/
 COMPONENT_ARCHIVE_URL=  $(COMPONENT_PROJECT_URL)/releases/$(COMPONENT_ARCHIVE)
 COMPONENT_BUGDB=	service/openvswitch
-IPS_COMPONENT_VERSION=	$(COMPONENT_VERSION) 
 
 TPNO=			21407
 
-include ../../make-rules/prep.mk
-include ../../make-rules/configure.mk
-
 # Depends on S12-only changes in ON to build.
 ifeq ($(BUILD_TYPE), evaluation)
 BUILD_64=
@@ -52,14 +47,10 @@
 PUBLISH_STAMP=
 endif
 
-include ../../make-rules/ips.mk
-include ../../make-rules/lint-libraries.mk
+include $(WS_MAKE_RULES)/common.mk
 
-PKG_PROTO_DIRS += $(COMPONENT_DIR)/files
 PKG_PROTO_DIRS += $(BUILD_DIR_64)
 
-CONFIGURE_ENV += CFLAGS="$(CFLAGS)"
-
 COMPONENT_PRE_CONFIGURE_ACTION += \
     ($(LN) -fs $(COMPONENT_DIR)/files/include/solaris $(SOURCE_DIR)/include/solaris; \
     $(LN) -fs $(COMPONENT_DIR)/files/lib/* $(SOURCE_DIR)/lib; \
@@ -67,19 +58,18 @@
 
 COMPILER =	gcc
 
-CONFIGURE_PREFIX	= /usr/lib/ovs
+USRLIBOVSDIR= $(USRLIBDIR)/ovs
+
+CONFIGURE_PREFIX	= $(USRLIBOVSDIR)
+CONFIGURE_BINDIR.64	= $(USRSBINDIR)
+CONFIGURE_SBINDIR.64	= $(USRLIBOVSDIR)
 
-CONFIGURE_OPTIONS	+= --mandir=/usr/share/man
-CONFIGURE_OPTIONS	+= --localstatedir=/var/run/ovs
-CONFIGURE_OPTIONS	+= --bindir=/usr/sbin
-CONFIGURE_OPTIONS	+= --sbindir=/usr/lib/ovs
-CONFIGURE_OPTIONS	+= --with-logdir=/var/log/ovs
-CONFIGURE_OPTIONS	+= --with-rundir=/var/run/ovs/
-CONFIGURE_OPTIONS	+= --with-dbdir=/var/lib/ovs/etc
-CONFIGURE_OPTIONS	+= --datarootdir=/usr/lib/ovs/share
-
-# Enable aslr for this component
-ASLR_MODE = $(ASLR_ENABLE)
+CONFIGURE_OPTIONS	+= --mandir=$(USRSHAREMANDIR)
+CONFIGURE_OPTIONS	+= --localstatedir=$(VARDIR)/run/ovs
+CONFIGURE_OPTIONS	+= --with-logdir=$(VARDIR)/log/ovs
+CONFIGURE_OPTIONS	+= --with-rundir=$(VARDIR)/run/ovs/
+CONFIGURE_OPTIONS	+= --with-dbdir=$(VARDIR)/lib/ovs/etc
+CONFIGURE_OPTIONS	+= --datarootdir=$(USRLIBOVSDIR)/share
 
 COMPONENT_PRE_BUILD_ACTION = \
     ($(LN) -fs $(COMPONENT_DIR)/files/include/solaris $(SOURCE_DIR)/include/solaris)
@@ -91,24 +81,10 @@
 
 COMPONENT_TEST_ENV += PATH="$(GNUBIN):$(PATH)"
 
-# common targets
-configure:	$(CONFIGURE_64)
-
-build:		$(BUILD_64)
-
-install:	$(INSTALL_64)
-
-test:		$(TEST_64)
-
-system-test:	$(SYSTEM_TESTS_NOT_IMPLEMENTED)
-
-BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
-
 REQUIRED_PACKAGES += library/security/openssl
 REQUIRED_PACKAGES += runtime/python-27
 REQUIRED_PACKAGES += shell/ksh93
 REQUIRED_PACKAGES += system/core-os
-REQUIRED_PACKAGES += system/library
 REQUIRED_PACKAGES += system/library/math
 REQUIRED_PACKAGES += system/management/rad
 REQUIRED_PACKAGES += system/management/rad/client/rad-c