make-rules/ruby.mk
author Rich Burridge <rich.burridge@oracle.com>
Tue, 02 May 2017 17:33:26 -0700
changeset 7964 d9801318ed3d
parent 7130 73b1ef197337
permissions -rw-r--r--
25981468 Build ilmbase and openexr with the GNU compilers
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5438
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
     1
#
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
     3
#
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
     7
#
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    12
#
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    18
#
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    20
#
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    21
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    22
#
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    23
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    24
# This is only useful for a single ruby version substtution NOT using
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    25
# -RUBYVER and -GENFRAG manifests
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    26
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    27
# Transform file paths for ruby version without creating version specific
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    28
# packages
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    29
PKG_MACROS += RUBY_VERSION=$(RUBY_VERSION)
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    30
PKG_MACROS += RUBY_LIB_VERSION=$(RUBY_LIB_VERSION)
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    31
PKG_MACROS += RUBYV=$(subst .,,$(RUBY_VERSION))
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    32
VENDOR_RUBY = /usr/ruby/$(RUBY_VERSION)/lib/ruby/vendor_ruby/$(RUBY_LIB_VERSION)
c068f8c677e8 PSARC/2016/016 Rename/Refactor Puppet and Puppet Module Packages
Shawn Ferry <shawn.ferry@oracle.com>
parents:
diff changeset
    33
VENDOR_RUBY_ARCH = /usr/ruby/$(RUBY_VERSION)/lib/ruby/vendor_ruby/$(RUBY_LIB_VERSION)/$(MACH64)-solaris$(SOLARIS_VERSION)
7130
73b1ef197337 24837601 facter, hiera,et al should use ruby-version-specific scripts
April Chin <april.chin@oracle.com>
parents: 5438
diff changeset
    34
73b1ef197337 24837601 facter, hiera,et al should use ruby-version-specific scripts
April Chin <april.chin@oracle.com>
parents: 5438
diff changeset
    35
# Modify ruby scripts in the ruby-version-specific path of the proto area,
73b1ef197337 24837601 facter, hiera,et al should use ruby-version-specific scripts
April Chin <april.chin@oracle.com>
parents: 5438
diff changeset
    36
# under usr/ruby/$(RUBY_VERSION), containing "#!/usr/bin/env ruby" to
73b1ef197337 24837601 facter, hiera,et al should use ruby-version-specific scripts
April Chin <april.chin@oracle.com>
parents: 5438
diff changeset
    37
# use the version-specific ruby path, defined by the $(RUBY_VERSION) macro.
73b1ef197337 24837601 facter, hiera,et al should use ruby-version-specific scripts
April Chin <april.chin@oracle.com>
parents: 5438
diff changeset
    38
# Without this change, the mediated ruby version in /usr/bin/ruby
73b1ef197337 24837601 facter, hiera,et al should use ruby-version-specific scripts
April Chin <april.chin@oracle.com>
parents: 5438
diff changeset
    39
# will probably be used, which may not match the ruby
73b1ef197337 24837601 facter, hiera,et al should use ruby-version-specific scripts
April Chin <april.chin@oracle.com>
parents: 5438
diff changeset
    40
# version supported by the component.
73b1ef197337 24837601 facter, hiera,et al should use ruby-version-specific scripts
April Chin <april.chin@oracle.com>
parents: 5438
diff changeset
    41
COMPONENT_POST_INSTALL_ACTION += \
73b1ef197337 24837601 facter, hiera,et al should use ruby-version-specific scripts
April Chin <april.chin@oracle.com>
parents: 5438
diff changeset
    42
    cd $(PROTO_DIR)/usr/ruby/$(RUBY_VERSION); \
73b1ef197337 24837601 facter, hiera,et al should use ruby-version-specific scripts
April Chin <april.chin@oracle.com>
parents: 5438
diff changeset
    43
    $(RUBY_SCRIPT_FIX_FUNC);