components/ruby/puppet/Makefile
changeset 5438 c068f8c677e8
parent 5427 25b736152081
child 5442 f02b645d5dcb
equal deleted inserted replaced
5437:449f3459d285 5438:c068f8c677e8
    19 # CDDL HEADER END
    19 # CDDL HEADER END
    20 #
    20 #
    21 # Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
    21 # Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
    22 #
    22 #
    23 include ../../../make-rules/shared-macros.mk
    23 include ../../../make-rules/shared-macros.mk
       
    24 RUBY_VERSION=2.1
       
    25 RUBY_LIB_VERSION=2.1.0
       
    26 RUBY_VERSIONS=2.1.0
    24 
    27 
    25 COMPONENT_NAME=		puppet
    28 COMPONENT_NAME=		puppet
    26 COMPONENT_VERSION=	3.6.2
    29 COMPONENT_VERSION=	3.6.2
    27 COMPONENT_PROJECT_URL=	http://puppetlabs.com/
    30 COMPONENT_PROJECT_URL=	http://puppetlabs.com/
    28 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
    31 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
    35 TPNO=			18128
    38 TPNO=			18128
    36 
    39 
    37 include $(WS_MAKE_RULES)/prep.mk
    40 include $(WS_MAKE_RULES)/prep.mk
    38 include $(WS_MAKE_RULES)/install.rb.mk
    41 include $(WS_MAKE_RULES)/install.rb.mk
    39 include $(WS_MAKE_RULES)/ips.mk
    42 include $(WS_MAKE_RULES)/ips.mk
       
    43 include $(WS_MAKE_RULES)/ruby.mk
    40 
    44 
    41 # puppet requires facter and hiera as part of the install phase 
    45 # puppet requires facter and hiera as part of the install phase 
    42 COMPONENT_INSTALL_ENV	+= RUBYLIB="$(COMPONENT_DIR)/../facter/build/$(MACH64)/lib:$(COMPONENT_DIR)/../hiera/build/$(MACH64)/lib"
    46 FACTER_LIB=$(WS_TOP)/components/ruby/facter/build/$(MACH64)/lib
       
    47 HIERA_LIB=$(WS_TOP)/components/ruby/hiera/build/$(MACH64)/lib
       
    48 COMPONENT_INSTALL_ENV	+= RUBYLIB="$(FACTER_LIB):$(HIERA_LIB)"
    43 
    49 
    44 ../facter/build/%/.installed:
    50 ../facter/build/%/.installed:
    45 	(cd ../facter ; $(GMAKE) install)
    51 	(cd ../facter ; $(GMAKE) install)
    46 
    52 
    47 ../hiera/build/%/.installed:
    53 ../hiera/build/%/.installed:
    48 	(cd ../hiera ; $(GMAKE) install)
    54 	(cd ../hiera ; $(GMAKE) install)
       
    55 
       
    56 
       
    57 # Collect puppet module manifests for inclusion of puppet modules in group depends
       
    58 # declare a prereq on all manifests to update depend file as needed
       
    59 PUPPET_MODULE_MANIFESTS = $(wildcard $(WS_TOP)/components/ruby/puppet-modules/*-*/*.p5m)
       
    60 $(BUILD_DIR)/puppet-modules.depend: $(PUPPET_MODULE_MANIFESTS) $(BUILD_DIR)
       
    61 	$(PKGMOGRIFY) -i -O /dev/null -P $@ $(WS_TRANSFORMS)/group-dependency $(PUPPET_MODULE_MANIFESTS)
       
    62 build:: $(BUILD_DIR)/puppet-modules.depend
       
    63 
    49 
    64 
    50 # set the bindir to /usr/sbin
    65 # set the bindir to /usr/sbin
    51 INSTALL_RB_BINDIR_OPTION =	--bindir=$(USRSBINDIR)
    66 INSTALL_RB_BINDIR_OPTION =	--bindir=$(USRSBINDIR)
    52 
    67 
    53 # --sbindir option not supported by Puppet install.rb
    68 # --sbindir option not supported by Puppet install.rb
    54 INSTALL_RB_SBINDIR_OPTION =
    69 INSTALL_RB_SBINDIR_OPTION =
    55 
    70 
    56 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
    71 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
    57 
    72 
    58 # common targets
    73 # common targets
    59 build:		$(BUILD_64)
    74 build::		$(BUILD_64)
    60 	# Ruby extension for auditing
       
    61 	(cd ext; $(RUBY) extconf.rb; $(GMAKE))
       
    62 
    75 
    63 # make sure facter and hiera are installed first
    76 # make sure facter and hiera are installed first
    64 install:	../facter/build/$(MACH64)/.installed ../hiera/build/$(MACH64)/.installed $(INSTALL_64)
    77 install:	../facter/build/$(MACH64)/.installed ../hiera/build/$(MACH64)/.installed $(INSTALL_64)
    65 
    78 
    66 clean::
    79 clean::
    67 	@if [ -f ext/Makefile ]; then \
       
    68 		(cd ext; $(GMAKE) clean; $(RM) Makefile) \
       
    69 	fi
       
    70 
    80 
    71 # puppet requires the installation of the following rubygems to run
    81 # puppet requires the installation of the following rubygems to run
    72 # the unittests:  rspec rspec-expectations mocha rack rgen
    82 # the unittests:  rspec rspec-expectations mocha rack rgen
    73 # Disable the tests until these rubygems are available.
    83 # Disable the tests until these rubygems are available.
    74 test:		$(NO_TESTS)
    84 test:		$(NO_TESTS)
    75 
    85 
    76 system-test:    $(NO_TESTS)
    86 system-test:    $(NO_TESTS)
    77 
    87 
    78 
    88 REQUIRED_PACKAGES += runtime/ruby-21
    79 REQUIRED_PACKAGES += runtime/ruby-19
    89 REQUIRED_PACKAGES += library/ruby/hiera
    80 REQUIRED_PACKAGES += shell/ksh93
    90 REQUIRED_PACKAGES += system/management/facter
    81 REQUIRED_PACKAGES += system/core-os
       
    82 REQUIRED_PACKAGES += system/library
       
    83 REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
       
    84 REQUIRED_PACKAGES += system/library/math
       
    85 REQUIRED_PACKAGES += system/network