" >$@
+ @echo "| $(COMPONENT_NAME) | " >>$@
+ @echo "$(COMPONENT_VERSION) | " >>$@
+ @echo "$(CDIR) | " >>$@
+ @echo "" >>$@ ; for pkg in $(PACKAGE) ; do \
+ echo "$$pkg " >>$@ ; \
+ done ; echo " | " >>$@
+ @echo "" >>$@ ; for arc in $(ARC_CASE) ; do \
+ echo "$$arc " >>$@ ; \
+ done ; echo " | " >>$@
+ @echo "" >>$@ ; for license in $(LICENSE) ; do \
+ echo "$$license " >>$@ ; \
+ done ; echo " | " >>$@
+ @echo "$(TPNO) | " >>$@
+ @echo "" >>$@ ; for bugdb in $(COMPONENT_BUGDB) ; do \
+ echo "$$bugdb " >>$@ ; \
+ done ; echo " | " >>$@
+ @echo "$(RESPONSIBLE_ENGINEER) | " >>$@
+ @echo "$(RESPONSIBLE_MANAGER) | " >>$@
+ @echo "$(TEAM) | " >>$@
+ @echo "
" >>$@
+
+$(BUILD_DIR)/package-info: $(PKG_REPORTS)
+ @cat $(PKG_REPORTS) | sort -u >$@
+
+$(BUILD_DIR)/component-info: $(PKG_REPORTS)
+ @echo "COMPONENT_NAME=\"$(COMPONENT_NAME)\"" >$@
+ @echo "COMPONENT_VERSION=\"$(COMPONENT_VERSION)\"" >>$@
+ @echo "COMPONENT_PROJECT_URL=\"$(COMPONENT_PROJECT_URL)\"" >>$@
+ @echo "COMPONENT_ARCHIVE_URL=\"$(COMPONENT_ARCHIVE_URL)\"" >>$@
+ @echo "COMPONENT_DIR=\"$(CDIR)\"" >>$@
+ @echo "TPNO=\"$(TPNO)\"" >>$@
+ @echo "COMPONENT_BUGDB=\"$(COMPONENT_BUGDB)\"" >>$@
+ @echo "RESPONSIBLE_ENGINEER=\"$(RESPONSIBLE_ENGINEER)\"" >>$@
+ @echo "RESPONSIBLE_MANAGER=\"$(RESPONSIBLE_MANAGER)\"" >>$@
+ @echo "TEAM=\"$(TEAM)\"" >>$@
+
+$(BUILD_DIR)/%.pkg-report: %.p5m $(BUILD_DIR)
+ @$(PKGMOGRIFY) $(PKG_OPTIONS) -P $@ $< \
+ $(REPORT_TRANSFORMS) >/dev/null
+
+include $(BUILD_DIR)/package-info
diff --git a/sample_data/make-rules/component.mk b/sample_data/make-rules/component.mk
new file mode 100644
index 0000000..2f4534b
--- /dev/null
+++ b/sample_data/make-rules/component.mk
@@ -0,0 +1,33 @@
+
+# A simple rule to print the value of any macro. Ex:
+# $ gmake print-REQUIRED_PACKAGES
+# Note that some macros are set on a per target basis, so what you see
+# is not always what you get.
+print-%:
+ @echo '$(subst ','\'',$*=$($*)) (origin: $(origin $*), flavor: $(flavor $*))'
+
+# A simple rule to print only the value of any macro.
+print-value-%:
+ @echo '$(subst ','\'',$($*))'
+
+# Provide default print package targets for components that do not rely on IPS.
+# Define them implicitly so that the definitions do not collide with ips.mk
+define print-package-rule
+echo $(strip $(PACKAGE_$(1))) | tr ' ' '\n'
+endef
+
+
+COMPONENT_TOOL = $(WS_TOOLS)/userland-component
+
+format:
+ @$(COMPONENT_TOOL) --path $(COMPONENT_DIR);
+
+update:
+ @if [ "$(VERSION)X" = "X" ]; \
+ then $(COMPONENT_TOOL) --path $(COMPONENT_DIR) --bump; \
+ else $(COMPONENT_TOOL) --path $(COMPONENT_DIR) --bump $(VERSION); \
+ fi;
+
+update-latest:
+ $(COMPONENT_TOOL) --path $(COMPONENT_DIR) --bump latest;
+
diff --git a/sample_data/make-rules/configure.mk b/sample_data/make-rules/configure.mk
new file mode 100644
index 0000000..4418455
--- /dev/null
+++ b/sample_data/make-rules/configure.mk
@@ -0,0 +1,249 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2011 EveryCity Ltd. All rights reserved.
+#
+
+#
+# Rules and Macros for building opens source software that uses configure /
+# GNU auto* tools to configure their build for the system they are on. This
+# uses GNU Make to build the components to take advantage of the viewpath
+# support and build multiple version (32/64 bit) from a shared source.
+#
+# To use these rules, include ../make-rules/configure.mk in your Makefile
+# and define "build", "install", and "test" targets appropriate to building
+# your component.
+# Ex:
+#
+# build: $(SOURCE_DIR)/build/$(MACH32)/.built \
+# $(SOURCE_DIR)/build/$(MACH64)/.built
+#
+# install: $(SOURCE_DIR)/build/$(MACH32)/.installed \
+# $(SOURCE_DIR)/build/$(MACH64)/.installed
+#
+# test: $(SOURCE_DIR)/build/$(MACH32)/.tested \
+# $(SOURCE_DIR)/build/$(MACH64)/.tested
+#
+# Any additional pre/post configure, build, or install actions can be specified
+# in your make file by setting them in on of the following macros:
+# COMPONENT_PRE_CONFIGURE_ACTION, COMPONENT_POST_CONFIGURE_ACTION
+# COMPONENT_PRE_BUILD_ACTION, COMPONENT_POST_BUILD_ACTION
+# COMPONENT_PRE_INSTALL_ACTION, COMPONENT_POST_INSTALL_ACTION
+# COMPONENT_PRE_TEST_ACTION, COMPONENT_POST_TEST_ACTION
+#
+# If component specific make targets need to be used for build or install, they
+# can be specified in
+# COMPONENT_BUILD_TARGETS, COMPONENT_INSTALL_TARGETS
+# COMPONENT_TEST_TARGETS
+#
+
+CONFIGURE_PREFIX = /usr
+
+# If the component prefers 64-bit binaries, then ensure builds deliver 64-bit
+# binaries to the standard directories and 32-bit binaries to the non-standard
+# location. This allows simplification of package manifests and makes it
+# easier to deliver the 64-bit binaries as the default.
+ifeq ($(strip $(PREFERRED_BITS)),64)
+CONFIGURE_BINDIR.32 = $(CONFIGURE_PREFIX)/bin/$(MACH32)
+CONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
+CONFIGURE_SBINDIR.32 = $(CONFIGURE_PREFIX)/sbin/$(MACH32)
+CONFIGURE_SBINDIR.64 = $(CONFIGURE_PREFIX)/sbin
+else
+CONFIGURE_BINDIR.32 = $(CONFIGURE_PREFIX)/bin
+CONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin/$(MACH64)
+CONFIGURE_SBINDIR.32 = $(CONFIGURE_PREFIX)/sbin
+CONFIGURE_SBINDIR.64 = $(CONFIGURE_PREFIX)/sbin/$(MACH64)
+endif
+
+# Regardless of PREFERRED_BITS, 64-bit libraries should always be delivered to
+# the appropriate subdirectory by default.
+CONFIGURE_LIBDIR.32 = $(CONFIGURE_PREFIX)/lib
+CONFIGURE_LIBDIR.64 = $(CONFIGURE_PREFIX)/lib/$(MACH64)
+
+CONFIGURE_MANDIR = $(CONFIGURE_PREFIX)/share/man
+CONFIGURE_LOCALEDIR = $(CONFIGURE_PREFIX)/share/locale
+# all texinfo documentation seems to go to /usr/share/info no matter what
+CONFIGURE_INFODIR = /usr/share/info
+CONFIGURE_INCLUDEDIR = /usr/include
+
+CONFIGURE_ENV = CONFIG_SHELL="$(CONFIG_SHELL)"
+CONFIGURE_ENV += CC="$(CC)"
+CONFIGURE_ENV += CXX="$(CXX)"
+CONFIGURE_ENV += F77="$(F77)"
+CONFIGURE_ENV += FC="$(FC)"
+CONFIGURE_ENV += CFLAGS="$(CFLAGS)"
+CONFIGURE_ENV += CXXFLAGS="$(CXXFLAGS)"
+CONFIGURE_ENV += FFLAGS="$(F77FLAGS)"
+CONFIGURE_ENV += FCFLAGS="$(FCFLAGS)"
+CONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
+CONFIGURE_ENV += PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)"
+
+# Rewrite absolute source-code paths into relative for ccache, so that any
+# workspace with a shared CCACHE_DIR can benefit when compiling a component
+ifneq ($(strip $(CCACHE)),)
+CONFIGURE_ENV += CCACHE="$(CCACHE)"
+CONFIGURE_OPTIONS += CCACHE="$(CCACHE)"
+CONFIGURE_ENV += CC_gcc_32="$(CC_gcc_32)"
+CONFIGURE_ENV += CC_gcc_64="$(CC_gcc_32)"
+CONFIGURE_ENV += CXX_gcc_32="$(CXX_gcc_64)"
+CONFIGURE_ENV += CXX_gcc_64="$(CXX_gcc_64)"
+CONFIGURE_OPTIONS += CC_gcc_32="$(CC_gcc_32)"
+CONFIGURE_OPTIONS += CC_gcc_64="$(CC_gcc_32)"
+CONFIGURE_OPTIONS += CXX_gcc_32="$(CXX_gcc_64)"
+CONFIGURE_OPTIONS += CXX_gcc_64="$(CXX_gcc_64)"
+CONFIGURE_ENV.$(BITS) += CCACHE_BASEDIR="$(BUILD_DIR_$(BITS))"
+CONFIGURE_OPTIONS.$(BITS) += CCACHE_BASEDIR="$(BUILD_DIR_$(BITS))"
+
+ifneq ($(strip $(CCACHE_DIR)),)
+CONFIGURE_ENV += CCACHE_DIR="$(CCACHE_DIR)"
+CONFIGURE_OPTIONS += CCACHE_DIR="$(CCACHE_DIR)"
+endif
+
+ifneq ($(strip $(CCACHE_LOGFILE)),)
+CONFIGURE_ENV += CCACHE_LOGFILE="$(CCACHE_LOGFILE)"
+CONFIGURE_OPTIONS += CCACHE_LOGFILE="$(CCACHE_LOGFILE)"
+endif
+
+endif
+
+CONFIGURE_DEFAULT_DIRS?=yes
+
+CONFIGURE_OPTIONS += CC="$(CC)"
+CONFIGURE_OPTIONS += CXX="$(CXX)"
+CONFIGURE_OPTIONS += F77="$(F77)"
+CONFIGURE_OPTIONS += FC="$(FC)"
+CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
+CONFIGURE_OPTIONS += CXXFLAGS="$(CXXFLAGS)"
+CONFIGURE_OPTIONS += FFLAGS="$(F77FLAGS)"
+CONFIGURE_OPTIONS += FCFLAGS="$(FCFLAGS)"
+CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)"
+CONFIGURE_OPTIONS += PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)"
+
+CONFIGURE_OPTIONS += --prefix=$(CONFIGURE_PREFIX)
+ifeq ($(CONFIGURE_DEFAULT_DIRS),yes)
+CONFIGURE_OPTIONS += --mandir=$(CONFIGURE_MANDIR)
+CONFIGURE_OPTIONS += --bindir=$(CONFIGURE_BINDIR.$(BITS))
+CONFIGURE_OPTIONS += --libdir=$(CONFIGURE_LIBDIR.$(BITS))
+CONFIGURE_OPTIONS += --sbindir=$(CONFIGURE_SBINDIR.$(BITS))
+endif
+CONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.$(BITS))
+
+COMPONENT_INSTALL_ARGS += DESTDIR=$(PROTO_DIR)
+
+$(BUILD_DIR_32)/.configured: BITS=32
+$(BUILD_DIR_64)/.configured: BITS=64
+
+CONFIGURE_ENV += $(CONFIGURE_ENV.$(BITS))
+ifeq ($(strip $(PARFAIT_BUILD)),yes)
+# parfait creates '*.bc' files which can confuse configure's
+# object/exe extension detection. which we really don't need it
+# to do anyway, so we'll just tell it what they are.
+CONFIGURE_ENV += ac_cv_objext=o
+CONFIGURE_ENV += ac_cv_exeext=""
+# this is fixed in the clang compiler but we can't use it yet
+CONFIGURE_ENV += ac_cv_header_stdbool_h=yes
+endif
+
+
+# temporarily work around some issues
+CONFIGURE_ENV += "ac_cv_func_realloc_0_nonnull=yes"
+COMPONENT_BUILD_ENV += "ac_cv_func_realloc_0_nonnull=yes"
+
+# configure the unpacked source for building 32 and 64 bit version
+CONFIGURE_SCRIPT = $(SOURCE_DIR)/configure
+$(BUILD_DIR)/%/.configured: $(SOURCE_DIR)/.prep
+ ($(RM) -rf $(@D) ; $(MKDIR) $(@D))
+ $(COMPONENT_PRE_CONFIGURE_ACTION)
+ (cd $(@D) ; $(ENV) $(CONFIGURE_ENV) $(CONFIG_SHELL) \
+ $(CONFIGURE_SCRIPT) $(CONFIGURE_OPTIONS))
+ $(COMPONENT_POST_CONFIGURE_ACTION)
+ $(TOUCH) $@
+
+# build the configured source
+$(BUILD_DIR)/%/.built: $(BUILD_DIR)/%/.configured
+ $(COMPONENT_PRE_BUILD_ACTION)
+ (cd $(@D) ; $(ENV) $(COMPONENT_BUILD_ENV) \
+ $(GMAKE) $(COMPONENT_BUILD_GMAKE_ARGS) $(COMPONENT_BUILD_ARGS) \
+ $(COMPONENT_BUILD_TARGETS))
+ $(COMPONENT_POST_BUILD_ACTION)
+ifeq ($(strip $(PARFAIT_BUILD)),yes)
+ -$(PARFAIT) build
+endif
+ $(TOUCH) $@
+
+# install the built source into a prototype area
+$(BUILD_DIR)/%/.installed: $(BUILD_DIR)/%/.built
+ $(COMPONENT_PRE_INSTALL_ACTION)
+ (cd $(@D) ; $(ENV) $(COMPONENT_INSTALL_ENV) $(GMAKE) \
+ $(COMPONENT_INSTALL_ARGS) $(COMPONENT_INSTALL_TARGETS))
+ $(COMPONENT_POST_INSTALL_ACTION)
+ $(TOUCH) $@
+
+CONFIGURE_TEST_TRANSFORMS = \
+ '-n ' \
+ '-e "/TOTAL:/p" ' \
+ '-e "/SKIP:/p" ' \
+ '-e "/PASS:/p" ' \
+ '-e "/FAIL:/p" ' \
+ '-e "/ERROR:/p" '
+
+USE_DEFAULT_TEST_TRANSFORMS?=no
+ifeq ($(strip $(USE_DEFAULT_TEST_TRANSFORMS)),yes)
+COMPONENT_TEST_TRANSFORMS+= $(CONFIGURE_TEST_TRANSFORMS)
+endif
+
+# test the built source
+$(BUILD_DIR)/%/.tested-and-compared: $(BUILD_DIR)/%/.built
+ $(RM) -rf $(COMPONENT_TEST_BUILD_DIR)
+ $(MKDIR) $(COMPONENT_TEST_BUILD_DIR)
+ $(COMPONENT_PRE_TEST_ACTION)
+ -(cd $(COMPONENT_TEST_DIR) ; \
+ $(COMPONENT_TEST_ENV_CMD) $(COMPONENT_TEST_ENV) \
+ $(COMPONENT_TEST_CMD) \
+ $(COMPONENT_TEST_ARGS) $(COMPONENT_TEST_TARGETS)) \
+ &> $(COMPONENT_TEST_OUTPUT)
+ $(COMPONENT_POST_TEST_ACTION)
+ $(COMPONENT_TEST_CREATE_TRANSFORMS)
+ $(COMPONENT_TEST_PERFORM_TRANSFORM)
+ $(COMPONENT_TEST_COMPARE)
+ $(COMPONENT_TEST_CLEANUP)
+ $(TOUCH) $@
+
+$(BUILD_DIR)/%/.tested: $(BUILD_DIR)/%/.built
+ $(COMPONENT_PRE_TEST_ACTION)
+ (cd $(COMPONENT_TEST_DIR) ; \
+ $(COMPONENT_TEST_ENV_CMD) $(COMPONENT_TEST_ENV) \
+ $(COMPONENT_TEST_CMD) \
+ $(COMPONENT_TEST_ARGS) $(COMPONENT_TEST_TARGETS))
+ $(COMPONENT_POST_TEST_ACTION)
+ $(COMPONENT_TEST_CLEANUP)
+ $(TOUCH) $@
+
+ifeq ($(strip $(PARFAIT_BUILD)),yes)
+parfait: install
+ -$(PARFAIT) build
+else
+parfait:
+ $(MAKE) PARFAIT_BUILD=yes parfait
+endif
+
+clean::
+ $(RM) -r $(BUILD_DIR) $(PROTO_DIR)
diff --git a/sample_data/make-rules/depend.mk b/sample_data/make-rules/depend.mk
new file mode 100644
index 0000000..3917f61
--- /dev/null
+++ b/sample_data/make-rules/depend.mk
@@ -0,0 +1,25 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2018 Adam Stevko
+#
+
+print-required-packages::
+ @for package in $(REQUIRED_PACKAGES) ; do \
+ echo $$package ; \
+ done | LANG=C LC_ALL=C sort -u
+
+# update the metadata for current component
+update-metadata:
+ @echo "generating metadata: $(CURDIR:$(WS_TOP)/components/%=%)"
+ @$(BASS_O_MATIC) --workspace=$(WS_TOP) --pkg5
+
diff --git a/sample_data/make-rules/encumbered.mk b/sample_data/make-rules/encumbered.mk
new file mode 100644
index 0000000..85d1ff8
--- /dev/null
+++ b/sample_data/make-rules/encumbered.mk
@@ -0,0 +1,24 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2015 Alexander Pyhalov
+#
+
+WS_REPO = $(WS_TOP)/$(MACH)/encumbered-repo
+
+COMPONENT_PKGLINT_ENV += ENCUMBERED=true
+
+PUBLISHER = hipster-encumbered
+
+BASS_O_MATIC = $(WS_TOOLS)/bass-o-matic --subdir=components/encumbered
+
+ENCUMBERED = encumbered/
diff --git a/sample_data/make-rules/environment.mk b/sample_data/make-rules/environment.mk
new file mode 100644
index 0000000..95d2410
--- /dev/null
+++ b/sample_data/make-rules/environment.mk
@@ -0,0 +1,119 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2020, Adam Stevko
+#
+
+PFEXEC = /usr/bin/pfexec
+
+ZONE = $(WS_TOOLS)/userland-zone
+
+define separator-line
+ @$(PYTHON) -c 'l="="*int(40-len("$1")/2); print("%s%s%s" % (l, "$1", l))'
+endef
+
+component-environment-check::
+ $(call separator-line,Workspace)
+ @echo " Path: $(WS_TOP)"
+ @echo " Branch: $$(git rev-parse --abbrev-ref HEAD)"
+ @echo " Changeset: $$(git rev-parse HEAD)"
+ $(call separator-line,System)
+ @/usr/bin/uname -a
+ @echo "Zone: $$(/usr/bin/zonename)"
+ @echo "Zone IP type: $$(/usr/bin/zonename -t)"
+ @/usr/sbin/psrinfo -vp
+ @/usr/sbin/ipadm show-addr
+ $(call separator-line,Required Packages)
+ @/usr/bin/pkg list -vH $(USERLAND_REQUIRED_PACKAGES:%=/%) $(REQUIRED_PACKAGES:%=/%)
+ $(call separator-line)
+
+component-environment-prep::
+ @/usr/bin/pkg list -vH $(USERLAND_REQUIRED_PACKAGES:%=/%) $(REQUIRED_PACKAGES:%=/%) >/dev/null || \
+ { echo "Adding required packages to build environment..."; \
+ RETVAL=7 ; \
+ while [ $$RETVAL -eq 7 ] ; do \
+ $(PFEXEC) /usr/bin/pkg install --accept -v $(REQUIRED_PACKAGES:%=/%) ; \
+ RETVAL=$$? ; \
+ if [ $$RETVAL -eq 4 ] || [ -z $$RETVAL ]; then break; fi; \
+ sleep 10; \
+ done; }
+ZONENAME_PREFIX = bz
+ZONENAME_ID = $(shell echo "$(WS_TOP)" | sha1sum | cut -c0-7)-$(COMPONENT_NAME)
+ZONENAME = $(ZONENAME_PREFIX)-$(ZONENAME_ID)
+
+component-zone-template:
+ $(call separator-line)
+ $(call separator-line,Create template zone)
+ USER_ID=$$(id -u) && \
+ $(PFEXEC) $(ZONE) --prefix $(ZONENAME_PREFIX) create-template -u $${USER} -i $${USER_ID}
+
+component-zone-build:
+ $(call separator-line)
+ $(call separator-line,Create $(ZONENAME))
+ $(PFEXEC) $(ZONE) --prefix $(ZONENAME_PREFIX) spawn-zone --id $(ZONENAME_ID)
+ $(call separator-line,Boot $(ZONENAME))
+ @while $$(true); do \
+ echo "Waiting for zone $(ZONENAME) to boot..."; \
+ $(PFEXEC) /usr/sbin/zlogin -l $${USER} $(ZONENAME) \
+ /bin/true >/dev/null 2>&1 && break; \
+ sleep 10; \
+ done
+ # FIXME:
+ # - remove once we figure out a better way how to enable zoneproxy-client inside the nlipkg brand
+ @while $$(true); do \
+ echo "Waiting for $(ZONENAME) config repository.."; \
+ $(PFEXEC) /usr/bin/svcs -z $(ZONENAME) -a >/dev/null 2>&1 && break; \
+ sleep 10; \
+ done
+ # We need to create door inside after zone-proxy-client is running
+ $(call separator-line,Configure IPS for $(ZONENAME))
+ $(PFEXEC) /usr/lib/zones/zoneproxy-adm $(ZONENAME)
+ @while $$(true); do \
+ echo "Waiting for zoneproxyd to be ready.."; \
+ PROXY_PID=$$(/usr/bin/svcs -p svc:/application/pkg/zones-proxyd:default | \
+ nawk '$$0 ~ /zoneproxyd/ {print $$2}') && \
+ $(PFEXEC) /usr/bin/pfiles $${PROXY_PID} | \
+ $(GNU_GREP) $(ZONENAME) >/dev/null 2>&1 && break; \
+ sleep 10; \
+ done
+ $(PFEXEC) /usr/sbin/svcadm -z $(ZONENAME) \
+ enable svc:/application/pkg/zones-proxy-client:default
+ ZONEROOT="$$(/usr/sbin/zoneadm -z $(ZONENAME) list -p | cut -d: -f4)/root" && \
+ $(PFEXEC) /usr/bin/pkg -R $${ZONEROOT} set-property use-system-repo True && \
+ while $$(true); do \
+ echo "Waiting for sysrepo to be ready..." && \
+ $(PFEXEC) /usr/bin/pkg -R $${ZONEROOT} publisher | \
+ $(GNU_GREP) syspub >/dev/null 2>&1 && break; \
+ sleep 10; \
+ done
+ $(call separator-line,Build in $(ZONENAME))
+ $(PFEXEC) /usr/sbin/zlogin -l $${USER} $(ZONENAME) \
+ "cd $(COMPONENT_DIR); gmake install"
+ $(call separator-line)
+
+component-zone-cleanup:
+ $(PFEXEC) $(ZONE) destroy-zone --id $(ZONENAME_ID)
+
+# Short aliases for user convenience
+env-check:: component-environment-check
+env-prep:: component-environment-prep
diff --git a/sample_data/make-rules/font.mk b/sample_data/make-rules/font.mk
new file mode 100644
index 0000000..df87e7e
--- /dev/null
+++ b/sample_data/make-rules/font.mk
@@ -0,0 +1,201 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2018, Aurelien Larcher. All rights reserved.
+#
+BUILD_BITS ?= NO_ARCH
+BUILD_STYLE ?= archive
+
+ifneq ($(findstring X11,$(FONT_TYPE)),)
+X11_CATEGORY = FONT
+include $(WS_MAKE_RULES)/x11.mk
+endif
+
+include $(WS_MAKE_RULES)/common.mk
+
+MKFONTSCALE = mkfontscale
+MKFONTDIR = mkfontdir
+
+ETCFONTSDIR = $(ETCDIR)/fonts
+ETCFONTSCONFDIR = $(ETCFONTSDIR)/conf.avail
+USRSHAREFONTSDIR = $(USRSHAREDIR)/fonts
+
+#
+# Font type macros
+#
+
+TTFFONTDIR = TrueType
+OTFFONTDIR = OpenType
+X11FONTDIR = X11
+X11MISCFONTDIR = X11
+PKGFONTDIR?= $($(FONT_TYPE)FONTDIR)
+
+# For compatibility
+USRSHARETTFFONTSDIR = $(USRSHAREFONTSDIR)/$(TTFFONTDIR)
+USRSHAREOTFFONTSDIR = $(USRSHAREFONTSDIR)/$(OTFFONTDIR)
+USRSHAREX11FONTSDIR = $(USRSHAREFONTSDIR)/$(X11FONTDIR)
+
+TTFFONTSRC = ttf
+OTFFONTSRC = otf
+X11FONTSRC =
+X11MISCFONTSRC =
+PKGFONTSRC?= $($(FONT_TYPE)FONTSRC)
+
+TTFFONTCLS = truetype
+OTFFONTCLS = opentype
+X11FONTCLS = xorg
+X11MISCFONTCLS =
+PKGFONTCLS?= $($(FONT_TYPE)FONTCLS)
+
+TTFFONTEXT = *.ttc *.tte *.ttf
+OTFFONTEXT = *.otf *.otc *.ttf *.ttc
+X11FONTEXT = *.pcf
+X11MISCFONTEXT = *.pcf
+PKGFONTEXT?= $($(FONT_TYPE)FONTEXT)
+
+PKGFONTCONFSRC = fontconfig
+PKGFONTCONFEXT = *.conf
+
+#
+# Proto area directories
+#
+
+PROTOFONTSDIR = $(PROTO_DIR)$(USRSHAREFONTSDIR)
+PROTOTTFFONTSDIR = $(PROTOFONTSDIR)/$(TTFFONTDIR)
+PROTOOTFFONTSDIR = $(PROTOFONTSDIR)/$(OTFFONTDIR)
+PROTOX11FONTSDIR = $(PROTOFONTSDIR)/$(X11FONTDIR)
+PROTOPKGFONTSDIR = $(PROTO$(FONT_TYPE)FONTSDIR)
+
+PROTOFONTSCONFDIR = $(PROTO_DIR)$(ETCFONTSCONFDIR)
+
+#
+# Default macros
+#
+
+COMPONENT_FONT_TYPE = $(PKGFONTCLS)
+COMPONENT_FONT_NAME = $(COMPONENT_NAME)
+COMPONENT_FONT_PKG = $(COMPONENT_NAME)
+ifeq ($(strip $(COMPONENT_FONT_TYPE)),)
+COMPONENT_FMRI = \
+ system/font/$(strip $(COMPONENT_FONT_PKG))
+else
+COMPONENT_FMRI = \
+ system/font/$(strip $(COMPONENT_FONT_TYPE))/$(strip $(COMPONENT_FONT_PKG))
+endif
+COMPONENT_CLASSIFICATION = System/Fonts
+COMPONENT_CATEGORY = font
+
+COMPONENT_FONT_DEST_DIR?= $(USRSHAREFONTSDIR)/$(PKGFONTDIR)/$(COMPONENT_FONT_NAME)
+COMPONENT_FONT_SRC_DIR ?= $(PKGFONTSRC)
+COMPONENT_FONT_FILES =
+
+COMPONENT_FONTCONF_DEST_DIR?= $(ETCFONTSCONFDIR)
+COMPONENT_FONTCONF_SRC_DIR ?= $(PKGFONTCONFSRC)
+COMPONENT_FONTCONF_FILES = $(PKGFONTCONFEXT)
+
+#
+# Build style specific rules
+#
+
+ifeq ($(strip $(BUILD_STYLE)),archive)
+
+POST_INSTALL_MKFONT?=no
+
+COMPONENT_BUILD_ACTION?= true
+ifeq ($(strip $(POST_INSTALL_MKFONT)),no)
+COMPONENT_BUILD_ACTION = \
+ cd $(@D)/$(COMPONENT_FONT_SRC_DIR); $(MKFONTSCALE); $(MKFONTDIR);
+endif
+
+$(BUILD_DIR)/%/.built: $(SOURCE_DIR)/.prep
+ ($(RM) -rf $(@D) ; $(MKDIR) $(@D))
+ $(CLONEY) $(SOURCE_DIR) $(@D)
+ $(COMPONENT_PRE_BUILD_ACTION)
+ ($(COMPONENT_BUILD_ACTION))
+ $(COMPONENT_POST_BUILD_ACTION)
+ $(TOUCH) $@
+
+build: $(BUILD_$(MK_BITS))
+
+COMPONENT_FONT_POST_INSTALL_ACTION = \
+ ( $(MKFONTSCALE) $(PROTO_DIR)$(COMPONENT_FONT_DEST_DIR); \
+ $(MKFONTDIR) $(PROTO_DIR)$(COMPONENT_FONT_DEST_DIR) )
+
+ifeq ($(strip $(POST_INSTALL_MKFONT)),yes)
+COMPONENT_POST_INSTALL_ACTION+=$(COMPONENT_FONT_POST_INSTALL_ACTION)
+else
+COMPONENT_FONT_FILES += fonts.dir
+COMPONENT_FONT_FILES += fonts.scale
+endif
+
+COMPONENT_INSTALL_ACTION = \
+ cd $(@D)/$(COMPONENT_FONT_SRC_DIR) && \
+ $(INSTALL) -m 0444 $(COMPONENT_FONT_FILES) \
+ $(PROTO_DIR)$(COMPONENT_FONT_DEST_DIR) ; \
+ if [ -n "$(strip $(COMPONENT_FONTCONF_FILES))" ]; \
+ then \
+ cd $(@D)/$(COMPONENT_FONTCONF_SRC_DIR) && \
+ $(INSTALL) -m 0444 $(COMPONENT_FONTCONF_FILES) \
+ $(PROTO_DIR)$(COMPONENT_FONTCONF_DEST_DIR) ; \
+ fi;
+
+$(BUILD_DIR)/%/.installed: $(BUILD_DIR)/%/.built
+ $(MKDIR) $(@D)
+ $(COMPONENT_PRE_INSTALL_ACTION)
+ -$(RM) -r $(PROTO_DIR)$(COMPONENT_FONT_DEST_DIR)
+ $(MKDIR) $(PROTO_DIR)$(COMPONENT_FONT_DEST_DIR)
+ $(MKDIR) $(PROTO_DIR)$(COMPONENT_FONTCONF_DEST_DIR)
+ ($(COMPONENT_INSTALL_ACTION))
+ $(COMPONENT_POST_INSTALL_ACTION)
+ $(TOUCH) $@
+
+install: $(INSTALL_$(MK_BITS))
+
+clean::
+ $(RM) -r $(BUILD_DIR) $(PROTO_DIR)
+
+endif
+
+ifeq ($(strip $(BUILD_STYLE)),configure)
+# We don't compress individual font files so that we get better compression
+# at higher levels in ZFS & IPS, and so that we aren't constantly replacing
+# font files in every build just because the timestamp in the compressed
+# version changed.
+CONFIGURE_OPTIONS += --without-compression
+endif
+
+# Add font metadata to packages to make it easier to search for fonts
+$(CANONICAL_MANIFESTS:%.p5m=$(MANIFEST_BASE)-%.mogrified): PUBLISH_TRANSFORMS += $(@:.mogrified=.font-transforms)
+
+$(CANONICAL_MANIFESTS:%.p5m=$(MANIFEST_BASE)-%.mogrified): font-transforms
+font-transforms: $(CANONICAL_MANIFESTS:%.p5m=$(MANIFEST_BASE)-%.font-transforms)
+
+$(MANIFEST_BASE)-%.font-transforms: %.p5m
+ $(PERL) $(WS_TOOLS)/generate_font_metadata.pl \
+ -p $(PROTO_DIR) -m $< > $@ || ( rm $@ ; exit 1 )
+
+# Package containing fc-scan used in generate_font_metadata.pl
+REQUIRED_PACKAGES += system/library/fontconfig
+# Package containing $(MKFONTSCALE) & $(MKFONTDIR)
+REQUIRED_PACKAGES += x11/font-utilities
+
diff --git a/sample_data/make-rules/gcc-component.mk b/sample_data/make-rules/gcc-component.mk
new file mode 100644
index 0000000..9b8b76e
--- /dev/null
+++ b/sample_data/make-rules/gcc-component.mk
@@ -0,0 +1,208 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"). You may
+# only use this file in accordance with the terms of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2019 Aurelien Larcher
+#
+
+GCC_COMPONENT_VERSION_MAJOR = $(shell echo $(COMPONENT_VERSION) | $(NAWK) -F. '{print $$1}')
+
+ifeq ($(strip $(ILLUMOS_GCC_REVISION)),)
+GCC_COMPONENT_STRING_VERSION = $(COMPONENT_VERSION)-oi-$(COMPONENT_REVISION)
+else
+GCC_COMPONENT_STRING_VERSION = $(COMPONENT_VERSION)-il-$(ILLUMOS_GCC_REVISION)
+endif
+
+GCC_COMPONENT_PREFIX = /usr/gcc/$(GCC_COMPONENT_VERSION_MAJOR)
+
+#
+# Define default component variables for upstream GCC
+#
+ifeq ($(strip $(COMPONENT_VERSION)),)
+$(error Empty GCC version)
+endif
+ifeq ($(strip $(COMPONENT_ARCHIVE_HASH)),)
+$(error Empty GCC archive hash)
+endif
+COMPONENT_NAME= gcc
+COMPONENT_FMRI= developer/gcc-$(GCC_COMPONENT_VERSION_MAJOR)
+COMPONENT_SUMMARY= GNU Compiler Collection
+COMPONENT_CLASSIFICATION= Development/C
+COMPONENT_PROJECT_URL = https://gcc.gnu.org/
+COMPONENT_SRC ?= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
+COMPONENT_ARCHIVE ?= $(COMPONENT_SRC).tar.xz
+COMPONENT_ARCHIVE_URL ?= \
+ https://ftp.gnu.org/gnu/gcc/gcc-$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
+
+PATCH_EACH_ARCHIVE=1
+PATCHDIR_PATCHES = $(shell find $(PATCH_DIR) -type f -name '$(PATCH_PATTERN)' \
+ 2>/dev/null | sort)
+
+MPFR_NAME= mpfr
+ifeq ($(strip $(MPFR_VERSION)),)
+$(error Empty MPFR version)
+endif
+ifeq ($(strip $(MPFR_ARCHIVE_HASH)),)
+$(error Empty MPFR archive hash)
+endif
+COMPONENT_SRC_1= $(MPFR_NAME)-$(MPFR_VERSION)
+COMPONENT_ARCHIVE_1= $(COMPONENT_SRC_1).tar.bz2
+COMPONENT_ARCHIVE_URL_1= https://www.mpfr.org/$(COMPONENT_SRC_1)/$(COMPONENT_ARCHIVE_1)
+COMPONENT_ARCHIVE_HASH_1= $(MPFR_ARCHIVE_HASH)
+CLEAN_PATHS += $(COMPONENT_SRC_1)
+COMPONENT_POST_UNPACK_ACTION_1 += ( $(RM) -r $(COMPONENT_SRC)/$(MPFR_NAME) && $(CP) -rpP $(COMPONENT_SRC_1) $(COMPONENT_SRC)/$(MPFR_NAME) )
+
+MPC_NAME=mpc
+ifeq ($(strip $(MPC_VERSION)),)
+$(error Empty MPC version)
+endif
+ifeq ($(strip $(MPC_ARCHIVE_HASH)),)
+$(error Empty MPC archive hash)
+endif
+COMPONENT_SRC_2= $(MPC_NAME)-$(MPC_VERSION)
+COMPONENT_ARCHIVE_2= $(COMPONENT_SRC_2).tar.gz
+COMPONENT_ARCHIVE_URL_2= https://ftp.gnu.org/gnu/mpc/$(COMPONENT_ARCHIVE_2)
+COMPONENT_ARCHIVE_HASH_2= $(MPC_ARCHIVE_HASH)
+CLEAN_PATHS += $(COMPONENT_SRC_2)
+COMPONENT_POST_UNPACK_ACTION_2 += ( $(RM) -r $(COMPONENT_SRC)/$(MPC_NAME) && $(CP) -rpP $(COMPONENT_SRC_2) $(COMPONENT_SRC)/$(MPC_NAME) )
+
+GMP_NAME=gmp
+ifeq ($(strip $(GMP_VERSION)),)
+$(error Empty GMP version)
+endif
+ifeq ($(strip $(GMP_ARCHIVE_HASH)),)
+$(error Empty GMP archive hash)
+endif
+COMPONENT_SRC_3= $(GMP_NAME)-$(GMP_VERSION)
+COMPONENT_ARCHIVE_3= $(COMPONENT_SRC_3).tar.bz2
+COMPONENT_ARCHIVE_URL_3= https://ftp.gnu.org/gnu/gmp/$(COMPONENT_ARCHIVE_3)
+COMPONENT_ARCHIVE_HASH_3= $(GMP_ARCHIVE_HASH)
+CLEAN_PATHS += $(COMPONENT_SRC_3)
+COMPONENT_POST_UNPACK_ACTION_3 += ( $(RM) -r $(COMPONENT_SRC)/$(GMP_NAME) && $(CP) -rpP $(COMPONENT_SRC_3) $(COMPONENT_SRC)/$(GMP_NAME) )
+
+BUILD_STYLE=configure
+
+include $(WS_MAKE_RULES)/common.mk
+
+PATH=$(PATH.gnu)
+
+CC_BITS=
+CFLAGS= -O2
+CXXFLAGS= -O2
+FCFLAGS= -O2
+
+COMMON_ENV= LD_OPTIONS="-zignore -zcombreloc -i"
+COMMON_ENV+= LD_FOR_TARGET=/usr/bin/ld
+COMMON_ENV+= LD_FOR_HOST=/usr/bin/ld
+COMMON_ENV+= STRIP="/usr/bin/strip -x"
+COMMON_ENV+= STRIP_FOR_TARGET="/usr/bin/strip -x"
+COMMON_ENV+= LD=/usr/bin/ld
+
+CONFIGURE_ENV+= $(COMMON_ENV)
+COMPONENT_BUILD_ENV+= $(COMMON_ENV)
+COMPONENT_INSTALL_ENV+= $(COMMON_ENV)
+
+CONFIGURE_PREFIX=$(GCC_COMPONENT_PREFIX)
+
+# General options
+CONFIGURE_OPTIONS+= --sbindir=$(CONFIGURE_BINDIR.$(BITS))
+CONFIGURE_OPTIONS+= --libdir=$(CONFIGURE_LIBDIR.$(BITS))
+CONFIGURE_OPTIONS+= --libexecdir=$(CONFIGURE_LIBDIR.$(BITS))
+CONFIGURE_OPTIONS+= --host $(GNU_TRIPLET)
+CONFIGURE_OPTIONS+= --build $(GNU_TRIPLET)
+CONFIGURE_OPTIONS+= --target $(GNU_TRIPLET)
+#CONFIGURE_OPTIONS+= --with-boot-ldflags=-R$(CONFIGURE_PREFIX)/lib
+CONFIGURE_OPTIONS+= --with-pkgversion="OpenIndiana $(GCC_COMPONENT_STRING_VERSION)"
+CONFIGURE_OPTIONS+= --with-bugurl="https://bugs.openindiana.org"
+
+# Toolchain options
+CONFIGURE_OPTIONS+= --without-gnu-ld
+CONFIGURE_OPTIONS+= --with-ld=/usr/bin/ld
+CONFIGURE_OPTIONS+= --with-build-time-tools=/usr/gnu/$(GNU_TRIPLET)/bin
+
+# If the compiler used to build matches the compiler being built, there is no
+# need for a 3 stage build.
+ifneq ($(shell $(CC) --version | grep $(COMPONENT_VERSION)),)
+CONFIGURE_OPTIONS += --disable-bootstrap
+else
+COMPONENT_BUILD_TARGETS=bootstrap
+endif
+
+# On SPARC systems, use Sun Assembler
+CONFIGURE_OPTIONS.sparc+= --without-gnu-as --with-as=/usr/bin/as
+CONFIGURE_OPTIONS.i386+= --with-gnu-as --with-as=/usr/bin/gas
+CONFIGURE_OPTIONS+= $(CONFIGURE_OPTIONS.$(MACH))
+
+# Set path to library install prefix
+CONFIGURE_OPTIONS+= LDFLAGS="-R$(CONFIGURE_PREFIX)/lib"
+
+# Strip the resulting binaries
+COMPONENT_INSTALL_TARGETS = install-strip
+
+COMPONENT_POST_INSTALL_ACTION = \
+ $(RM) -r $(PROTO_DIR)$(CONFIGURE_PREFIX)/lib/gcc/$(GNU_TRIPLET)/$(COMPONENT_VERSION)/include-fixed
+
+unexport SHELLOPTS
+
+#
+# Run the tests and generate a summary report, then output the summary
+# report into the results file. Note that list of reported tests is sorted
+# to allow parallel test run.
+#
+# To ensure that all tests that are expected to pass actually
+# pass, we have to increase the stacksize limit to at least
+# 16MB. Otherwise we'll get spurious failures in the test
+# harness (gcc.c-torture/compile/limits-exprparen.c and others).
+# With the soft stacksize limit set to 16384 we get reasonably good
+# test results.
+#
+ifeq ($(strip $(MACH)),i386)
+COMPONENT_PRE_TEST_ACTION += \
+ (cd $(COMPONENT_TEST_DIR) ; \
+ ulimit -Ss 16385 ; \
+ $(ENV) $(COMPONENT_PRE_TEST_ENV) \
+ $(GMAKE) -k -i $(JOBS:%=-j%) check check-target RUNTESTFLAGS="--target_board=unix/-m64\{,-msave-args\}" ; \
+ $(FIND) . -name '*.sum' | while read f; do \
+ gsed -e '1,/^Running target unix/p' -e 'd' $f > $f.2; \
+ gsed -e '/^Running target unix/,/Summary ===$/p' -e 'd' $f | grep '^.*: ' | sort -k 2 >> $f.2; \
+ gsed -e '/Summary ===$/,$p' -e 'd' $f >> $f.2; \
+ mv $f.2 $f; done; \
+ $(GMAKE) mail-report.log)
+else
+COMPONENT_PRE_TEST_ACTION += \
+ (cd $(COMPONENT_TEST_DIR) ; \
+ ulimit -Ss 16385 ; \
+ $(ENV) $(COMPONENT_PRE_TEST_ENV) \
+ $(GMAKE) -k -i $(JOBS:%=-j%) check check-target RUNTESTFLAGS="--target_board=unix/-m64" ; \
+ $(FIND) . -name '*.sum' | while read f; do \
+ gsed -e '1,/^Running target unix/p' -e 'd' $f > $f.2; \
+ gsed -e '/^Running target unix/,/Summary ===$/p' -e 'd' $f | grep '^.*: ' | sort -k 2 >> $f.2; \
+ gsed -e '/Summary ===$/,$p' -e 'd' $f >> $f.2; \
+ mv $f.2 $f; done; \
+ $(GMAKE) mail-report.log)
+endif
+
+COMPONENT_TEST_CMD = $(CAT)
+COMPONENT_TEST_TARGETS = mail-report.log
+
+# Master test results are different between x86 and SPARC.
+COMPONENT_TEST_MASTER = \
+ $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH).master
+
+# Common dependencies
+REQUIRED_PACKAGES += SUNWcs
+REQUIRED_PACKAGES += system/library
+REQUIRED_PACKAGES += system/library/math
+
+# Required by the test suite
+REQUIRED_PACKAGES += developer/test/dejagnu
+REQUIRED_PACKAGES += developer/build/autoconf-archive
+REQUIRED_PACKAGES += developer/build/autogen
+REQUIRED_PACKAGES += system/extended-system-utilities
diff --git a/sample_data/make-rules/gem.mk b/sample_data/make-rules/gem.mk
new file mode 100644
index 0000000..0b28824
--- /dev/null
+++ b/sample_data/make-rules/gem.mk
@@ -0,0 +1,107 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+#
+GEM=/usr/ruby/$(RUBY_VERSION)/bin/gem
+
+VENDOR_GEM_DIR=/usr/ruby/$(RUBY_VERSION)/lib/ruby/vendor_ruby/gems/$(RUBY_LIB_VERSION)
+
+# Name of the gem spec to use. This will typically be
+#