components/ruby/puppet-modules/oracle-solaris_providers/Makefile
changeset 5443 51abc0fb79b7
parent 5438 c068f8c677e8
child 5465 c49b82fa1ffd
equal deleted inserted replaced
5442:f02b645d5dcb 5443:51abc0fb79b7
    18 #
    18 #
    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 
    24 
    25 COMPONENT_NAME=		puppet
    25 
    26 COMPONENT_VERSION=	3.6.2
    26 GIT_REPO= https://github.com/oraclesolaris/puppet-solaris_providers
    27 COMPONENT_PROJECT_URL=	http://puppetlabs.com/
    27 GIT_BRANCH= v1.0.2
    28 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
    28 GIT_COMMIT_ID= c4b6092
    29 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
    29 GIT_HASH=  sha256:12b9c1a169e95494dc2c8463fecafcdf4875642bc0970a2a59fdbc4cfa09df50
    30 COMPONENT_ARCHIVE_HASH=	\
    30 
    31     sha256:9114c63108c58e39db84937cb8f7e1add3dcbaa08fd730f631de6a7f64a3c360
    31 COMPONENT_NAME=		puppet-solaris_providers
    32 COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)downloads/puppet/$(COMPONENT_ARCHIVE)
    32 COMPONENT_VERSION=	1.0.2
       
    33 COMPONENT_PROJECT_URL=	https://github.com/oraclesolaris/puppet-solaris_providers
       
    34 # github releases provide direct archive downloads
       
    35 COMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)/archive/$(GIT_BRANCH).tar.gz
       
    36 # Construct our own SRC instead of using the default with GIT_COMMIT_ID
       
    37 # archive from github strips leading v from release for vN named release tags
       
    38 COMPONENT_SRC=$(COMPONENT_NAME)-$(shell echo $(GIT_BRANCH) | sed -e 's/v//')
    33 COMPONENT_BUGDB=	utility/puppet
    39 COMPONENT_BUGDB=	utility/puppet
    34 
    40 
    35 TPNO=			18128
    41 TPNO=			18128
    36 
    42 
    37 include $(WS_MAKE_RULES)/prep.mk
    43 include $(WS_MAKE_RULES)/prep.mk
    38 include $(WS_MAKE_RULES)/install.rb.mk
    44 include $(WS_MAKE_RULES)/puppetmodule.mk
    39 include $(WS_MAKE_RULES)/ips.mk
    45 include $(WS_MAKE_RULES)/ips.mk
    40 
    46 
    41 # 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"
       
    43 
    47 
    44 ../facter/build/%/.installed:
    48 MODULE_NAME =	solaris_providers
    45 	(cd ../facter ; $(GMAKE) install)
       
    46 
       
    47 ../hiera/build/%/.installed:
       
    48 	(cd ../hiera ; $(GMAKE) install)
       
    49 
       
    50 # set the bindir to /usr/sbin
       
    51 INSTALL_RB_BINDIR_OPTION =	--bindir=$(USRSBINDIR)
       
    52 
       
    53 # --sbindir option not supported by Puppet install.rb
       
    54 INSTALL_RB_SBINDIR_OPTION =
       
    55 
    49 
    56 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
    50 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
    57 
    51 
       
    52 # generate manifest for files supplied from git repo on demand
       
    53 oracle-solaris_providers-github.frag: install
       
    54 	$(PKGSEND) generate $(PROTO_DIR)/etc/puppet/modules/ | \
       
    55 		$(GSED) -e 's/\(file\|dir\).*path=/\1 path=/' | \
       
    56 		$(PKGFMT) > oracle-solaris_providers-github.frag
       
    57 
    58 # common targets
    58 # common targets
    59 build:		$(BUILD_64)
    59 build: $(BUILD_NO_ARCH)
    60 	# Ruby extension for auditing
       
    61 	(cd ext; $(RUBY) extconf.rb; $(GMAKE))
       
    62 
    60 
    63 # make sure facter and hiera are installed first
    61 install:	$(INSTALL_NO_ARCH)
    64 install:	../facter/build/$(MACH64)/.installed ../hiera/build/$(MACH64)/.installed $(INSTALL_64)
       
    65 
    62 
    66 clean::
       
    67 	@if [ -f ext/Makefile ]; then \
       
    68 		(cd ext; $(GMAKE) clean; $(RM) Makefile) \
       
    69 	fi
       
    70 
       
    71 # puppet requires the installation of the following rubygems to run
       
    72 # the unittests:  rspec rspec-expectations mocha rack rgen
       
    73 # Disable the tests until these rubygems are available.
       
    74 test:		$(NO_TESTS)
    63 test:		$(NO_TESTS)
    75 
    64 
    76 system-test:    $(NO_TESTS)
    65 system-test:    $(NO_TESTS)
    77 
    66 
    78 
    67 PKG_PROTO_DIRS += files
    79 REQUIRED_PACKAGES += runtime/ruby-19
    68 REQUIRED_PACKAGES += system/management/puppet
    80 REQUIRED_PACKAGES += shell/ksh93
       
    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