Skip to content

Instantly share code, notes, and snippets.

@Magisus
Last active April 3, 2017 19:24
Show Gist options
  • Save Magisus/ba7a250b20387f4384f07a60fc316ee7 to your computer and use it in GitHub Desktop.
Save Magisus/ba7a250b20387f4384f07a60fc316ee7 to your computer and use it in GitHub Desktop.
Bash command issues

From shell (both locally from zsh on Mac and bash on redhat-7) this works correctly, creating LC_MESSAGE dirs and corresponding MO files:

for dir in ./locales/*/ ; do [ -d "${dir}/LC_MESSAGES" ] || mkdir "${dir}/LC_MESSAGES" ; msgfmt "${dir}/puppet.po" -o "${dir}/LC_MESSAGES/puppet.mo" ; done ;

But when run from the vanagon configure step in these lines: https://github.com/Magisus/puppet-agent/blob/mo-generation/configs/components/puppet.rb#L101-L103, it the ${dir} is empty:

[ -d puppet ] || mkdir -p puppet
cd puppet && \
: && \
for dir in ./locales/*/ ; do [ -d "/LC_MESSAGES" ] || mkdir "/LC_MESSAGES" ; msgfmt "/puppet.po" -o "/LC_MESSAGES/puppet.mo" ; done ;
msgfmt: error while opening "/puppet.po" for reading: No such file or directory
msgfmt: error while opening "/puppet.po" for reading: No such file or directory
@Magisus
Copy link
Author

Magisus commented Apr 3, 2017

SHELL = /bin/bash

tempdir := $(shell mktemp -d -p /var/tmp 2>/dev/null || mktemp -d -t 'tmp')
workdir := $(PWD)

all: file-list-before-build puppet-agent-1.9.3.298.gacd301a-1.x86_64.rpm

puppet-agent-1.9.3.298.gacd301a-1.x86_64.rpm: puppet-agent-1.9.3.298.gacd301a.tar.gz
	bash -c 'mkdir -p $(tempdir)/rpmbuild/{SOURCES,SPECS,BUILD,RPMS,SRPMS}'
	cp puppet-agent-1.9.3.298.gacd301a.tar.gz $(tempdir)/rpmbuild/SOURCES
	cp file-list-for-rpm $(tempdir)/rpmbuild/SOURCES
	cp puppet-agent.spec $(tempdir)/rpmbuild/SPECS
	PATH=/opt/freeware/bin:$$PATH /usr/bin/rpmbuild -bb --target x86_64 --define '_topdir $(tempdir)/rpmbuild' --define 'dist .el7' $(tempdir)/rpmbuild/SPECS/puppet-agent.spec
	mkdir -p output/el/7/PC1/x86_64
	cp $(tempdir)/rpmbuild/*RPMS/**/*.rpm ./output/el/7/PC1/x86_64

file-list-before-build:
	(find -H "/opt/puppetlabs" "/opt/puppetlabs/puppet" "/etc/puppetlabs" "/opt/puppetlabs/bin" "/var/log/puppetlabs" "/var/run/puppetlabs" "/opt/puppetlabs/puppet/cache" "/etc/puppetlabs/puppet" "/opt/puppetlabs/puppet/share/locale" "/etc/puppetlabs/code" "/etc/puppetlabs/code/modules" "/opt/puppetlabs/puppet/modules" "/etc/puppetlabs/code/environments" "/etc/puppetlabs/code/environments/production" "/etc/puppetlabs/code/environments/production/manifests" "/etc/puppetlabs/code/environments/production/modules" "/var/log/puppetlabs/puppet" "/opt/puppetlabs/facter/facts.d" "/etc/puppetlabs/code/environments/production/hieradata" "/etc/puppetlabs/mcollective" "/opt/puppetlabs/mcollective/plugins" "/etc/puppetlabs/pxp-agent" "/etc/puppetlabs/pxp-agent/modules" "/opt/puppetlabs/pxp-agent/spool" "/var/log/puppetlabs/pxp-agent" 2>/dev/null || find "/opt/puppetlabs" "/opt/puppetlabs/puppet" "/etc/puppetlabs" "/opt/puppetlabs/bin" "/var/log/puppetlabs" "/var/run/puppetlabs" "/opt/puppetlabs/puppet/cache" "/etc/puppetlabs/puppet" "/opt/puppetlabs/puppet/share/locale" "/etc/puppetlabs/code" "/etc/puppetlabs/code/modules" "/opt/puppetlabs/puppet/modules" "/etc/puppetlabs/code/environments" "/etc/puppetlabs/code/environments/production" "/etc/puppetlabs/code/environments/production/manifests" "/etc/puppetlabs/code/environments/production/modules" "/var/log/puppetlabs/puppet" "/opt/puppetlabs/facter/facts.d" "/etc/puppetlabs/code/environments/production/hieradata" "/etc/puppetlabs/mcollective" "/opt/puppetlabs/mcollective/plugins" "/etc/puppetlabs/pxp-agent" "/etc/puppetlabs/pxp-agent/modules" "/opt/puppetlabs/pxp-agent/spool" "/var/log/puppetlabs/pxp-agent" 2>/dev/null) | sort | uniq > file-list-before-build

file-list-after-build: puppet facter hiera leatherman cpp-hocon marionette-collective cpp-pcp-client pxp-agent augeas curl ruby-2.3.3 ruby-stomp rubygem-deep-merge rubygem-net-ssh rubygem-hocon rubygem-semantic_puppet rubygem-text rubygem-locale rubygem-gettext rubygem-fast_gettext rubygem-gettext-setup ruby-shadow ruby-augeas openssl puppet-ca-bundle libxml2 libxslt virt-what dmidecode shellpath runtime ruby-selinux
	(find -H "/opt/puppetlabs" "/opt/puppetlabs/puppet" "/etc/puppetlabs" "/opt/puppetlabs/bin" "/var/log/puppetlabs" "/var/run/puppetlabs" "/opt/puppetlabs/puppet/cache" "/etc/puppetlabs/puppet" "/opt/puppetlabs/puppet/share/locale" "/etc/puppetlabs/code" "/etc/puppetlabs/code/modules" "/opt/puppetlabs/puppet/modules" "/etc/puppetlabs/code/environments" "/etc/puppetlabs/code/environments/production" "/etc/puppetlabs/code/environments/production/manifests" "/etc/puppetlabs/code/environments/production/modules" "/var/log/puppetlabs/puppet" "/opt/puppetlabs/facter/facts.d" "/etc/puppetlabs/code/environments/production/hieradata" "/etc/puppetlabs/mcollective" "/opt/puppetlabs/mcollective/plugins" "/etc/puppetlabs/pxp-agent" "/etc/puppetlabs/pxp-agent/modules" "/opt/puppetlabs/pxp-agent/spool" "/var/log/puppetlabs/pxp-agent" 2>/dev/null || find "/opt/puppetlabs" "/opt/puppetlabs/puppet" "/etc/puppetlabs" "/opt/puppetlabs/bin" "/var/log/puppetlabs" "/var/run/puppetlabs" "/opt/puppetlabs/puppet/cache" "/etc/puppetlabs/puppet" "/opt/puppetlabs/puppet/share/locale" "/etc/puppetlabs/code" "/etc/puppetlabs/code/modules" "/opt/puppetlabs/puppet/modules" "/etc/puppetlabs/code/environments" "/etc/puppetlabs/code/environments/production" "/etc/puppetlabs/code/environments/production/manifests" "/etc/puppetlabs/code/environments/production/modules" "/var/log/puppetlabs/puppet" "/opt/puppetlabs/facter/facts.d" "/etc/puppetlabs/code/environments/production/hieradata" "/etc/puppetlabs/mcollective" "/opt/puppetlabs/mcollective/plugins" "/etc/puppetlabs/pxp-agent" "/etc/puppetlabs/pxp-agent/modules" "/opt/puppetlabs/pxp-agent/spool" "/var/log/puppetlabs/pxp-agent" 2>/dev/null) | sort | uniq > file-list-after-build

puppet-agent-1.9.3.298.gacd301a.tar.gz: file-list 
	mkdir -p 'puppet-agent-1.9.3.298.gacd301a'
	'tar' -cf - -T "file-list" "bill-of-materials" "/opt/puppetlabs/puppet/VERSION" "/usr/lib/systemd/system/puppet.service" "/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0/specifications/puppet.gemspec" "/opt/puppetlabs/bin/puppet" "/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0/specifications/facter.gemspec" "/opt/puppetlabs/bin/facter" "/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0/specifications/hiera.gemspec" "/opt/puppetlabs/bin/hiera" "/usr/lib/systemd/system/mcollective.service" "/opt/puppetlabs/bin/mco" "/usr/lib/systemd/system/pxp-agent.service" "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/augeas.rb" "/opt/puppetlabs/puppet/share/doc/openssl-1.0.2j/LICENSE" "/etc/profile.d/puppet-agent.sh" "/etc/profile.d/puppet-agent.csh" "/etc/sysconfig/puppet" "/usr/lib/tmpfiles.d/puppet-agent.conf" "/opt/puppetlabs/puppet/share/vim/puppet-vimfiles/ftdetect/puppet.vim" "/opt/puppetlabs/puppet/share/vim/puppet-vimfiles/ftplugin/puppet.vim" "/opt/puppetlabs/puppet/share/vim/puppet-vimfiles/indent/puppet.vim" "/opt/puppetlabs/puppet/share/vim/puppet-vimfiles/syntax/puppet.vim" "/etc/puppetlabs/puppet/puppet.conf" "/etc/puppetlabs/puppet/auth.conf" "/etc/puppetlabs/code/environments/production/environment.conf" "/etc/puppetlabs/puppet/hiera.yaml" "/etc/sysconfig/mcollective" "/etc/puppetlabs/mcollective/client.cfg" "/etc/puppetlabs/mcollective/server.cfg" "/etc/puppetlabs/mcollective/facts.yaml" "/etc/logrotate.d/mcollective" "/etc/sysconfig/pxp-agent" "/etc/logrotate.d/pxp-agent" | ( cd 'puppet-agent-1.9.3.298.gacd301a/'; 'tar' xfp -)
	'tar' -cf - puppet-agent-1.9.3.298.gacd301a/ | gzip -9c > puppet-agent-1.9.3.298.gacd301a.tar.gz

file-list: file-list-before-build puppet-agent-project
	comm -23 file-list-after-build file-list-before-build > file-list
	comm -23 file-list-after-build file-list-before-build | sed -e 's/\(^.*[[:space:]].*$$\)/"\1"/g' > file-list-for-rpm

/opt/puppetlabs/puppet/VERSION:
	echo 1.9.3.298.gacd301a > '/opt/puppetlabs/puppet/VERSION'

/opt/puppetlabs: file-list-before-build
	mkdir -p '/opt/puppetlabs'
/opt/puppetlabs/puppet: file-list-before-build
	mkdir -p '/opt/puppetlabs/puppet'
/etc/puppetlabs: file-list-before-build
	mkdir -p '/etc/puppetlabs'
/opt/puppetlabs/bin: file-list-before-build
	mkdir -p '/opt/puppetlabs/bin'
/var/log/puppetlabs: file-list-before-build
	mkdir -p '/var/log/puppetlabs'
/var/run/puppetlabs: file-list-before-build
	mkdir -p '/var/run/puppetlabs'
/opt/puppetlabs/puppet/cache: file-list-before-build
	mkdir -p '/opt/puppetlabs/puppet/cache'
/etc/puppetlabs/puppet: file-list-before-build
	mkdir -p '/etc/puppetlabs/puppet'
/opt/puppetlabs/puppet/share/locale: file-list-before-build
	mkdir -p '/opt/puppetlabs/puppet/share/locale'
/etc/puppetlabs/code: file-list-before-build
	mkdir -p '/etc/puppetlabs/code'
/etc/puppetlabs/code/modules: file-list-before-build
	mkdir -p '/etc/puppetlabs/code/modules'
/opt/puppetlabs/puppet/modules: file-list-before-build
	mkdir -p '/opt/puppetlabs/puppet/modules'
/etc/puppetlabs/code/environments: file-list-before-build
	mkdir -p '/etc/puppetlabs/code/environments'
/etc/puppetlabs/code/environments/production: file-list-before-build
	mkdir -p '/etc/puppetlabs/code/environments/production'
/etc/puppetlabs/code/environments/production/manifests: file-list-before-build
	mkdir -p '/etc/puppetlabs/code/environments/production/manifests'
/etc/puppetlabs/code/environments/production/modules: file-list-before-build
	mkdir -p '/etc/puppetlabs/code/environments/production/modules'
/var/log/puppetlabs/puppet: file-list-before-build
	mkdir -p '/var/log/puppetlabs/puppet'
/opt/puppetlabs/facter/facts.d: file-list-before-build
	mkdir -p '/opt/puppetlabs/facter/facts.d'
/etc/puppetlabs/code/environments/production/hieradata: file-list-before-build
	mkdir -p '/etc/puppetlabs/code/environments/production/hieradata'
/etc/puppetlabs/mcollective: file-list-before-build
	mkdir -p '/etc/puppetlabs/mcollective'
/opt/puppetlabs/mcollective/plugins: file-list-before-build
	mkdir -p '/opt/puppetlabs/mcollective/plugins'
/etc/puppetlabs/pxp-agent: file-list-before-build
	mkdir -p '/etc/puppetlabs/pxp-agent'
/etc/puppetlabs/pxp-agent/modules: file-list-before-build
	mkdir -p '/etc/puppetlabs/pxp-agent/modules'
/opt/puppetlabs/pxp-agent/spool: file-list-before-build
	mkdir -p '/opt/puppetlabs/pxp-agent/spool'
/var/log/puppetlabs/pxp-agent: file-list-before-build
	mkdir -p '/var/log/puppetlabs/pxp-agent'

puppet-agent-project: /opt/puppetlabs /opt/puppetlabs/puppet /etc/puppetlabs /opt/puppetlabs/bin /var/log/puppetlabs /var/run/puppetlabs /opt/puppetlabs/puppet/cache /etc/puppetlabs/puppet /opt/puppetlabs/puppet/share/locale /etc/puppetlabs/code /etc/puppetlabs/code/modules /opt/puppetlabs/puppet/modules /etc/puppetlabs/code/environments /etc/puppetlabs/code/environments/production /etc/puppetlabs/code/environments/production/manifests /etc/puppetlabs/code/environments/production/modules /var/log/puppetlabs/puppet /opt/puppetlabs/facter/facts.d /etc/puppetlabs/code/environments/production/hieradata /etc/puppetlabs/mcollective /opt/puppetlabs/mcollective/plugins /etc/puppetlabs/pxp-agent /etc/puppetlabs/pxp-agent/modules /opt/puppetlabs/pxp-agent/spool /var/log/puppetlabs/pxp-agent /opt/puppetlabs/puppet/VERSION file-list-after-build
	touch puppet-agent-project

puppet: puppet-install

puppet-unpack: file-list-before-build
	: nothing to extract && \
	: nothing to extract && \
	: nothing to extract && \
	: nothing to extract
	touch puppet-unpack

puppet-patch: puppet-unpack
	touch puppet-patch

puppet-configure: puppet-patch ruby-2.3.3 facter hiera
	[ -d puppet ] || mkdir -p puppet
	cd puppet && \
	for dir in ./locales/*/ ; do [ -d "$${dir}/LC_MESSAGES" ] || mkdir "$${dir}/LC_MESSAGES" ; msgfmt "$${dir}/puppet.po" -o "$${dir}/LC_MESSAGES/puppet.mo" ; done ;
	touch puppet-configure

puppet-build: puppet-configure
	cd puppet && \
	echo 'd /var/run/puppetlabs 0755 root root -' > puppet-agent.conf
	touch puppet-build

puppet-check: puppet-build
	touch puppet-check

puppet-install: puppet-check
	cd puppet && \
	install -d '/usr/lib/systemd/system' && \
	cp -p 'ext/systemd/puppet.service' '/usr/lib/systemd/system/puppet.service' && \
	install -d '/etc/sysconfig' && \
	cp -p 'ext/redhat/client.sysconfig' '/etc/sysconfig/puppet' && \
	install -d '/usr/lib/tmpfiles.d' && \
	cp -p 'puppet-agent.conf' '/usr/lib/tmpfiles.d/puppet-agent.conf' && \
	/opt/puppetlabs/puppet/bin/ruby install.rb --ruby=/opt/puppetlabs/puppet/bin/ruby --no-check-prereqs --bindir=/opt/puppetlabs/puppet/bin --configdir=/etc/puppetlabs/puppet --sitelibdir=/opt/puppetlabs/puppet/lib/ruby/vendor_ruby --codedir=/etc/puppetlabs/code --vardir=/opt/puppetlabs/puppet/cache --rundir=/var/run/puppetlabs --logdir=/var/log/puppetlabs --localedir=/opt/puppetlabs/puppet/share/locale --configs --quick --no-batch-files --man --mandir=/opt/puppetlabs/puppet/share/man && \
	install -d '/opt/puppetlabs/puppet/share/vim/puppet-vimfiles/ftdetect' && \
	cp -p '../ftdetect_puppet.vim' '/opt/puppetlabs/puppet/share/vim/puppet-vimfiles/ftdetect/puppet.vim' && \
	install -d '/opt/puppetlabs/puppet/share/vim/puppet-vimfiles/ftplugin' && \
	cp -p '../ftplugin_puppet.vim' '/opt/puppetlabs/puppet/share/vim/puppet-vimfiles/ftplugin/puppet.vim' && \
	install -d '/opt/puppetlabs/puppet/share/vim/puppet-vimfiles/indent' && \
	cp -p '../indent_puppet.vim' '/opt/puppetlabs/puppet/share/vim/puppet-vimfiles/indent/puppet.vim' && \
	install -d '/opt/puppetlabs/puppet/share/vim/puppet-vimfiles/syntax' && \
	cp -p '../syntax_puppet.vim' '/opt/puppetlabs/puppet/share/vim/puppet-vimfiles/syntax/puppet.vim' && \
	install -d '/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0/specifications' && \
	cp -p '.gemspec' '/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0/specifications/puppet.gemspec' && \
	install -d '/etc/puppetlabs/code/environments/production' && \
	cp -p 'conf/environment.conf' '/etc/puppetlabs/code/environments/production/environment.conf' && \
	install -d '/opt/puppetlabs/bin' && \
	([[ '/opt/puppetlabs/bin/puppet' -ef '/opt/puppetlabs/puppet/bin/puppet' ]] || ln -s '/opt/puppetlabs/puppet/bin/puppet' '/opt/puppetlabs/bin/puppet')
	touch puppet-install

puppet-clean:
	[ -d puppet ] && cd puppet && /usr/bin/make clean
	[ -e puppet-configure ] && rm puppet-configure
	[ -e puppet-build ] && rm puppet-build
	[ -e puppet-install ] && rm puppet-install

puppet-clobber: puppet-clean
	[ -d puppet ] && rm -r puppet
	[ -e puppet-unpack ] && rm puppet-unpack

facter: facter-install

facter-unpack: file-list-before-build
	export PATH="/opt/puppetlabs/puppet/bin:$(PATH)" && \
	export JAVA_HOME=""
	touch facter-unpack

facter-patch: facter-unpack
	touch facter-patch

facter-configure: facter-patch ruby-2.3.3 openssl leatherman runtime cpp-hocon virt-what augeas openssl curl
	[ -d facter ] || mkdir -p facter
	export PATH="/opt/puppetlabs/puppet/bin:$(PATH)" && \
	export JAVA_HOME="" && \
	cd facter && \
	/opt/pl-build-tools/bin/cmake -DCMAKE_TOOLCHAIN_FILE=/opt/pl-build-tools/pl-build-toolchain.cmake -DLEATHERMAN_GETTEXT=OFF -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_PREFIX_PATH=/opt/puppetlabs/puppet -DCMAKE_INSTALL_RPATH=/opt/puppetlabs/puppet/lib -DCMAKE_INSTALL_PREFIX=/opt/puppetlabs/puppet -DFACTER_PATH=/opt/puppetlabs/puppet/bin -DFACTER_RUBY=/opt/puppetlabs/puppet/lib/$(shell /opt/puppetlabs/puppet/bin/ruby -rrbconfig -e 'print RbConfig::CONFIG["LIBRUBY_SO"]') -DRUBY_LIB_INSTALL=/opt/puppetlabs/puppet/lib/ruby/vendor_ruby -DBOOST_STATIC=ON -DYAMLCPP_STATIC=ON -DWITHOUT_CURL=OFF -DWITHOUT_BLKID=OFF -DWITHOUT_JRUBY=OFF -DAIO_AGENT_VERSION=1.9.3.298 -DINSTALL_BATCH_FILES=NO .
	touch facter-configure

facter-build: facter-configure
	export PATH="/opt/puppetlabs/puppet/bin:$(PATH)" && \
	export JAVA_HOME="" && \
	cd facter && \
	/usr/bin/make -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1)
	touch facter-build

facter-check: facter-build
	export PATH="/opt/puppetlabs/puppet/bin:$(PATH)" && \
	export JAVA_HOME="" && \
	cd facter && \
	ldd lib/libfacter.so && \
	[ $$(ldd lib/libfacter.so | grep -c libstdc++) -eq 0 ] || ldd lib/libfacter.so | grep libstdc++ | grep -v ' /lib' && \
	[ $$(ldd lib/libfacter.so | grep -c libgcc_s) -eq 0 ] || ldd lib/libfacter.so | grep libgcc_s | grep -v ' /lib' && \
	LD_LIBRARY_PATH=/opt/puppetlabs/puppet/lib LIBPATH=/opt/puppetlabs/puppet/lib /usr/bin/make test ARGS=-V
	touch facter-check

facter-install: facter-check
	export PATH="/opt/puppetlabs/puppet/bin:$(PATH)" && \
	export JAVA_HOME="" && \
	cd facter && \
	/usr/bin/make -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1) install && \
	install -d '/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0/specifications' && \
	cp -p '.gemspec' '/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0/specifications/facter.gemspec' && \
	install -d '/opt/puppetlabs/bin' && \
	([[ '/opt/puppetlabs/bin/facter' -ef '/opt/puppetlabs/puppet/bin/facter' ]] || ln -s '/opt/puppetlabs/puppet/bin/facter' '/opt/puppetlabs/bin/facter')
	touch facter-install

facter-clean:
	[ -d facter ] && cd facter && /usr/bin/make clean
	[ -e facter-configure ] && rm facter-configure
	[ -e facter-build ] && rm facter-build
	[ -e facter-install ] && rm facter-install

facter-clobber: facter-clean
	[ -d facter ] && rm -r facter
	[ -e facter-unpack ] && rm facter-unpack

hiera: hiera-install

hiera-unpack: file-list-before-build
	
	touch hiera-unpack

hiera-patch: hiera-unpack
	touch hiera-patch

hiera-configure: hiera-patch ruby-2.3.3 rubygem-deep-merge
	[ -d hiera ] || mkdir -p hiera
	touch hiera-configure

hiera-build: hiera-configure
	touch hiera-build

hiera-check: hiera-build
	touch hiera-check

hiera-install: hiera-check
	cd hiera && \
	/opt/puppetlabs/puppet/bin/ruby install.rb --configs --configdir=/etc/puppetlabs/puppet --man --mandir=/opt/puppetlabs/puppet/share/man --no-batch-files --bindir=/opt/puppetlabs/puppet/bin --sitelibdir=/opt/puppetlabs/puppet/lib/ruby/vendor_ruby --ruby=/opt/puppetlabs/puppet/bin/ruby && \
	install -d '/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0/specifications' && \
	cp -p '.gemspec' '/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0/specifications/hiera.gemspec' && \
	install -d '/opt/puppetlabs/bin' && \
	([[ '/opt/puppetlabs/bin/hiera' -ef '/opt/puppetlabs/puppet/bin/hiera' ]] || ln -s '/opt/puppetlabs/puppet/bin/hiera' '/opt/puppetlabs/bin/hiera')
	touch hiera-install

hiera-clean:
	[ -d hiera ] && cd hiera && /usr/bin/make clean
	[ -e hiera-configure ] && rm hiera-configure
	[ -e hiera-build ] && rm hiera-build
	[ -e hiera-install ] && rm hiera-install

hiera-clobber: hiera-clean
	[ -d hiera ] && rm -r hiera
	[ -e hiera-unpack ] && rm hiera-unpack

leatherman: leatherman-install

leatherman-unpack: file-list-before-build
	
	touch leatherman-unpack

leatherman-patch: leatherman-unpack
	touch leatherman-patch

leatherman-configure: leatherman-patch curl runtime ruby-2.3.3 rubygem-gettext
	[ -d leatherman ] || mkdir -p leatherman
	cd leatherman && \
	/opt/pl-build-tools/bin/cmake -DCMAKE_TOOLCHAIN_FILE=/opt/pl-build-tools/pl-build-toolchain.cmake -DLEATHERMAN_GETTEXT=OFF -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_PREFIX_PATH=/opt/puppetlabs/puppet -DCMAKE_INSTALL_PREFIX=/opt/puppetlabs/puppet -DCMAKE_INSTALL_RPATH=/opt/puppetlabs/puppet/lib -DLEATHERMAN_SHARED=TRUE -DBOOST_STATIC=ON -DLEATHERMAN_USE_CURL=TRUE .
	touch leatherman-configure

leatherman-build: leatherman-configure
	cd leatherman && \
	/usr/bin/make -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1)
	touch leatherman-build

leatherman-check: leatherman-build
	cd leatherman && \
	LEATHERMAN_RUBY=/opt/puppetlabs/puppet/lib/$(shell /opt/puppetlabs/puppet/bin/ruby -rrbconfig -e 'print RbConfig::CONFIG["LIBRUBY_SO"]') LD_LIBRARY_PATH=/opt/puppetlabs/puppet/lib LIBPATH=/opt/puppetlabs/puppet/lib /usr/bin/make test ARGS=-V
	touch leatherman-check

leatherman-install: leatherman-check
	cd leatherman && \
	/usr/bin/make -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1) install
	touch leatherman-install

leatherman-clean:
	[ -d leatherman ] && cd leatherman && /usr/bin/make clean
	[ -e leatherman-configure ] && rm leatherman-configure
	[ -e leatherman-build ] && rm leatherman-build
	[ -e leatherman-install ] && rm leatherman-install

leatherman-clobber: leatherman-clean
	[ -d leatherman ] && rm -r leatherman
	[ -e leatherman-unpack ] && rm leatherman-unpack

cpp-hocon: cpp-hocon-install

cpp-hocon-unpack: file-list-before-build
	
	touch cpp-hocon-unpack

cpp-hocon-patch: cpp-hocon-unpack
	touch cpp-hocon-patch

cpp-hocon-configure: cpp-hocon-patch leatherman
	[ -d cpp-hocon ] || mkdir -p cpp-hocon
	cd cpp-hocon && \
	/opt/pl-build-tools/bin/cmake -DCMAKE_TOOLCHAIN_FILE=/opt/pl-build-tools/pl-build-toolchain.cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_PREFIX_PATH=/opt/puppetlabs/puppet -DCMAKE_INSTALL_PREFIX=/opt/puppetlabs/puppet -DBOOST_STATIC=ON .
	touch cpp-hocon-configure

cpp-hocon-build: cpp-hocon-configure
	cd cpp-hocon && \
	/usr/bin/make -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1) && \
	/usr/bin/make test ARGS=-V
	touch cpp-hocon-build

cpp-hocon-check: cpp-hocon-build
	touch cpp-hocon-check

cpp-hocon-install: cpp-hocon-check
	cd cpp-hocon && \
	/usr/bin/make -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1) install
	touch cpp-hocon-install

cpp-hocon-clean:
	[ -d cpp-hocon ] && cd cpp-hocon && /usr/bin/make clean
	[ -e cpp-hocon-configure ] && rm cpp-hocon-configure
	[ -e cpp-hocon-build ] && rm cpp-hocon-build
	[ -e cpp-hocon-install ] && rm cpp-hocon-install

cpp-hocon-clobber: cpp-hocon-clean
	[ -d cpp-hocon ] && rm -r cpp-hocon
	[ -e cpp-hocon-unpack ] && rm cpp-hocon-unpack

marionette-collective: marionette-collective-install

marionette-collective-unpack: file-list-before-build
	
	touch marionette-collective-unpack

marionette-collective-patch: marionette-collective-unpack
	touch marionette-collective-patch

marionette-collective-configure: marionette-collective-patch ruby-2.3.3 ruby-stomp
	[ -d marionette-collective ] || mkdir -p marionette-collective
	touch marionette-collective-configure

marionette-collective-build: marionette-collective-configure
	touch marionette-collective-build

marionette-collective-check: marionette-collective-build
	touch marionette-collective-check

marionette-collective-install: marionette-collective-check
	cd marionette-collective && \
	install -d '/usr/lib/systemd/system' && \
	cp -p 'ext/aio/redhat/mcollective.service' '/usr/lib/systemd/system/mcollective.service' && \
	install -d '/etc/sysconfig' && \
	cp -p 'ext/aio/redhat/mcollective.sysconfig' '/etc/sysconfig/mcollective' && \
	install -d '/etc/logrotate.d' && \
	cp -p 'ext/aio/redhat/mcollective-systemd.logrotate' '/etc/logrotate.d/mcollective' && \
	/opt/puppetlabs/puppet/bin/ruby install.rb --configdir=/etc/puppetlabs/mcollective --plugindir=/opt/puppetlabs/mcollective/plugins --quick --no-batch-files --bindir=/opt/puppetlabs/puppet/bin --sbindir=/opt/puppetlabs/puppet/bin --sitelibdir=/opt/puppetlabs/puppet/lib/ruby/vendor_ruby --ruby=/opt/puppetlabs/puppet/bin/ruby && \
	install -d '/etc/puppetlabs/mcollective' && \
	cp -p 'ext/aio/common/client.cfg.dist' '/etc/puppetlabs/mcollective/client.cfg' && \
	install -d '/etc/puppetlabs/mcollective' && \
	cp -p 'ext/aio/common/server.cfg.dist' '/etc/puppetlabs/mcollective/server.cfg' && \
	install -d '/opt/puppetlabs/bin' && \
	([[ '/opt/puppetlabs/bin/mco' -ef '/opt/puppetlabs/puppet/bin/mco' ]] || ln -s '/opt/puppetlabs/puppet/bin/mco' '/opt/puppetlabs/bin/mco')
	touch marionette-collective-install

marionette-collective-clean:
	[ -d marionette-collective ] && cd marionette-collective && /usr/bin/make clean
	[ -e marionette-collective-configure ] && rm marionette-collective-configure
	[ -e marionette-collective-build ] && rm marionette-collective-build
	[ -e marionette-collective-install ] && rm marionette-collective-install

marionette-collective-clobber: marionette-collective-clean
	[ -d marionette-collective ] && rm -r marionette-collective
	[ -e marionette-collective-unpack ] && rm marionette-collective-unpack

cpp-pcp-client: cpp-pcp-client-install

cpp-pcp-client-unpack: file-list-before-build
	export PATH="/opt/puppetlabs/puppet/bin:/opt/pl-build-tools/bin:$(PATH)"
	touch cpp-pcp-client-unpack

cpp-pcp-client-patch: cpp-pcp-client-unpack
	touch cpp-pcp-client-patch

cpp-pcp-client-configure: cpp-pcp-client-patch openssl leatherman
	[ -d cpp-pcp-client ] || mkdir -p cpp-pcp-client
	export PATH="/opt/puppetlabs/puppet/bin:/opt/pl-build-tools/bin:$(PATH)" && \
	cd cpp-pcp-client && \
	/opt/pl-build-tools/bin/cmake -DCMAKE_TOOLCHAIN_FILE=/opt/pl-build-tools/pl-build-toolchain.cmake -DLEATHERMAN_GETTEXT=OFF -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_PREFIX_PATH=/opt/puppetlabs/puppet -DCMAKE_INSTALL_PREFIX=/opt/puppetlabs/puppet -DCMAKE_INSTALL_RPATH=/opt/puppetlabs/puppet/lib -DCMAKE_SYSTEM_PREFIX_PATH=/opt/puppetlabs/puppet -DBOOST_STATIC=ON .
	touch cpp-pcp-client-configure

cpp-pcp-client-build: cpp-pcp-client-configure
	export PATH="/opt/puppetlabs/puppet/bin:/opt/pl-build-tools/bin:$(PATH)" && \
	cd cpp-pcp-client && \
	/usr/bin/make -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1)
	touch cpp-pcp-client-build

cpp-pcp-client-check: cpp-pcp-client-build
	touch cpp-pcp-client-check

cpp-pcp-client-install: cpp-pcp-client-check
	export PATH="/opt/puppetlabs/puppet/bin:/opt/pl-build-tools/bin:$(PATH)" && \
	cd cpp-pcp-client && \
	/usr/bin/make -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1) install
	touch cpp-pcp-client-install

cpp-pcp-client-clean:
	[ -d cpp-pcp-client ] && cd cpp-pcp-client && /usr/bin/make clean
	[ -e cpp-pcp-client-configure ] && rm cpp-pcp-client-configure
	[ -e cpp-pcp-client-build ] && rm cpp-pcp-client-build
	[ -e cpp-pcp-client-install ] && rm cpp-pcp-client-install

cpp-pcp-client-clobber: cpp-pcp-client-clean
	[ -d cpp-pcp-client ] && rm -r cpp-pcp-client
	[ -e cpp-pcp-client-unpack ] && rm cpp-pcp-client-unpack

pxp-agent: pxp-agent-install

pxp-agent-unpack: file-list-before-build
	export PATH="/opt/puppetlabs/puppet/bin:/opt/pl-build-tools/bin:$(PATH)"
	touch pxp-agent-unpack

pxp-agent-patch: pxp-agent-unpack
	touch pxp-agent-patch

pxp-agent-configure: pxp-agent-patch openssl leatherman cpp-pcp-client
	[ -d pxp-agent ] || mkdir -p pxp-agent
	export PATH="/opt/puppetlabs/puppet/bin:/opt/pl-build-tools/bin:$(PATH)" && \
	cd pxp-agent && \
	/opt/pl-build-tools/bin/cmake -DCMAKE_TOOLCHAIN_FILE=/opt/pl-build-tools/pl-build-toolchain.cmake -DLEATHERMAN_GETTEXT=OFF -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_PREFIX_PATH=/opt/puppetlabs/puppet -DCMAKE_INSTALL_RPATH=/opt/puppetlabs/puppet/lib -DCMAKE_SYSTEM_PREFIX_PATH=/opt/puppetlabs/puppet -DMODULES_INSTALL_PATH=/opt/puppetlabs/pxp-agent/modules -DCMAKE_INSTALL_PREFIX=/opt/puppetlabs/puppet -DBOOST_STATIC=ON .
	touch pxp-agent-configure

pxp-agent-build: pxp-agent-configure
	export PATH="/opt/puppetlabs/puppet/bin:/opt/pl-build-tools/bin:$(PATH)" && \
	cd pxp-agent && \
	/usr/bin/make -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1)
	touch pxp-agent-build

pxp-agent-check: pxp-agent-build
	touch pxp-agent-check

pxp-agent-install: pxp-agent-check
	export PATH="/opt/puppetlabs/puppet/bin:/opt/pl-build-tools/bin:$(PATH)" && \
	cd pxp-agent && \
	/usr/bin/make -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1) install && \
	install -d '/usr/lib/systemd/system' && \
	cp -p 'ext/systemd/pxp-agent.service' '/usr/lib/systemd/system/pxp-agent.service' && \
	install -d '/etc/sysconfig' && \
	cp -p 'ext/redhat/pxp-agent.sysconfig' '/etc/sysconfig/pxp-agent' && \
	install -d '/etc/logrotate.d' && \
	cp -p 'ext/systemd/pxp-agent.logrotate' '/etc/logrotate.d/pxp-agent'
	touch pxp-agent-install

pxp-agent-clean:
	[ -d pxp-agent ] && cd pxp-agent && /usr/bin/make clean
	[ -e pxp-agent-configure ] && rm pxp-agent-configure
	[ -e pxp-agent-build ] && rm pxp-agent-build
	[ -e pxp-agent-install ] && rm pxp-agent-install

pxp-agent-clobber: pxp-agent-clean
	[ -d pxp-agent ] && rm -r pxp-agent
	[ -e pxp-agent-unpack ] && rm pxp-agent-unpack

augeas: augeas-install

augeas-unpack: file-list-before-build
	export PKG_CONFIG_PATH="/opt/puppetlabs/puppet/lib/pkgconfig" && \
	gunzip -c "augeas-1.4.0.tar.gz" | tar xf -
	touch augeas-unpack

augeas-patch: augeas-unpack
	cd augeas-1.4.0 && \
	/usr/bin/patch --strip=1 --fuzz=0 --ignore-whitespace < $(workdir)/patches/osx-stub-needed-readline-functions.patch && \
	/usr/bin/patch --strip=1 --fuzz=0 --ignore-whitespace < $(workdir)/patches/sudoers-negated-command-alias.patch
	touch augeas-patch

augeas-configure: augeas-patch libxml2
	[ -d augeas-1.4.0 ] || mkdir -p augeas-1.4.0
	export PKG_CONFIG_PATH="/opt/puppetlabs/puppet/lib/pkgconfig" && \
	cd augeas-1.4.0 && \
	./configure --prefix=/opt/puppetlabs/puppet 
	touch augeas-configure

augeas-build: augeas-configure
	export PKG_CONFIG_PATH="/opt/puppetlabs/puppet/lib/pkgconfig" && \
	cd augeas-1.4.0 && \
	/usr/bin/make -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1)
	touch augeas-build

augeas-check: augeas-build
	touch augeas-check

augeas-install: augeas-check
	export PKG_CONFIG_PATH="/opt/puppetlabs/puppet/lib/pkgconfig" && \
	cd augeas-1.4.0 && \
	/usr/bin/make -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1) install
	touch augeas-install

augeas-clean:
	[ -d augeas-1.4.0 ] && cd augeas-1.4.0 && /usr/bin/make clean
	[ -e augeas-configure ] && rm augeas-configure
	[ -e augeas-build ] && rm augeas-build
	[ -e augeas-install ] && rm augeas-install

augeas-clobber: augeas-clean
	[ -d augeas-1.4.0 ] && rm -r augeas-1.4.0
	[ -e augeas-unpack ] && rm augeas-unpack

curl: curl-install

curl-unpack: file-list-before-build
	gunzip -c "curl-7.51.0.tar.gz" | tar xf -
	touch curl-unpack

curl-patch: curl-unpack
	touch curl-patch

curl-configure: curl-patch openssl puppet-ca-bundle
	[ -d curl-7.51.0 ] || mkdir -p curl-7.51.0
	cd curl-7.51.0 && \
	CPPFLAGS='-I/opt/puppetlabs/puppet/include -I/opt/pl-build-tools/include' LDFLAGS='-L/opt/puppetlabs/puppet/lib -L/opt/pl-build-tools/lib -Wl,-rpath=/opt/puppetlabs/puppet/lib' ./configure --prefix=/opt/puppetlabs/puppet --with-ssl=/opt/puppetlabs/puppet --enable-threaded-resolver --disable-ldap --disable-ldaps --with-ca-bundle=/opt/puppetlabs/puppet/ssl/cert.pem 
	touch curl-configure

curl-build: curl-configure
	cd curl-7.51.0 && \
	/usr/bin/make -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1)
	touch curl-build

curl-check: curl-build
	touch curl-check

curl-install: curl-check
	cd curl-7.51.0 && \
	/usr/bin/make -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1) install
	touch curl-install

curl-clean:
	[ -d curl-7.51.0 ] && cd curl-7.51.0 && /usr/bin/make clean
	[ -e curl-configure ] && rm curl-configure
	[ -e curl-build ] && rm curl-build
	[ -e curl-install ] && rm curl-install

curl-clobber: curl-clean
	[ -d curl-7.51.0 ] && rm -r curl-7.51.0
	[ -e curl-unpack ] && rm curl-unpack

ruby-2.3.3: ruby-2.3.3-install

ruby-2.3.3-unpack: file-list-before-build
	export optflags="-O2" && \
	gunzip -c "ruby-2.3.3.tar.gz" | tar xf -
	touch ruby-2.3.3-unpack

ruby-2.3.3-patch: ruby-2.3.3-unpack
	touch ruby-2.3.3-patch

ruby-2.3.3-configure: ruby-2.3.3-patch openssl
	[ -d ruby-2.3.3 ] || mkdir -p ruby-2.3.3
	export optflags="-O2" && \
	cd ruby-2.3.3 && \
	bash configure --enable-shared --enable-bundled-libyaml --disable-install-doc --disable-install-rdoc --prefix=/opt/puppetlabs/puppet --with-opt-dir=/opt/puppetlabs/puppet 
	touch ruby-2.3.3-configure

ruby-2.3.3-build: ruby-2.3.3-configure
	export optflags="-O2" && \
	cd ruby-2.3.3 && \
	/usr/bin/make -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1)
	touch ruby-2.3.3-build

ruby-2.3.3-check: ruby-2.3.3-build
	touch ruby-2.3.3-check

ruby-2.3.3-install: ruby-2.3.3-check
	export optflags="-O2" && \
	cd ruby-2.3.3 && \
	/usr/bin/make -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1) install
	touch ruby-2.3.3-install

ruby-2.3.3-clean:
	[ -d ruby-2.3.3 ] && cd ruby-2.3.3 && /usr/bin/make clean
	[ -e ruby-2.3.3-configure ] && rm ruby-2.3.3-configure
	[ -e ruby-2.3.3-build ] && rm ruby-2.3.3-build
	[ -e ruby-2.3.3-install ] && rm ruby-2.3.3-install

ruby-2.3.3-clobber: ruby-2.3.3-clean
	[ -d ruby-2.3.3 ] && rm -r ruby-2.3.3
	[ -e ruby-2.3.3-unpack ] && rm ruby-2.3.3-unpack

ruby-stomp: ruby-stomp-install

ruby-stomp-unpack: file-list-before-build
	export GEM_HOME="/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0" && \
	export RUBYLIB="/opt/puppetlabs/puppet/lib/ruby/vendor_ruby:$(RUBYLIB)" && \
	: nothing to extract
	touch ruby-stomp-unpack

ruby-stomp-patch: ruby-stomp-unpack
	touch ruby-stomp-patch

ruby-stomp-configure: ruby-stomp-patch ruby-2.3.3
	[ -d ./ ] || mkdir -p ./
	touch ruby-stomp-configure

ruby-stomp-build: ruby-stomp-configure
	touch ruby-stomp-build

ruby-stomp-check: ruby-stomp-build
	touch ruby-stomp-check

ruby-stomp-install: ruby-stomp-check
	export GEM_HOME="/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0" && \
	export RUBYLIB="/opt/puppetlabs/puppet/lib/ruby/vendor_ruby:$(RUBYLIB)" && \
	cd ./ && \
	/opt/puppetlabs/puppet/bin/gem install --no-rdoc --no-ri --local stomp-1.3.3.gem
	cd /opt/puppetlabs/puppet/lib/ruby/gems/2.3.0/gems/stomp-1.3.3 && /usr/bin/patch --strip=1 --fuzz=0 --ignore-whitespace < $(workdir)/patches/verify_client_certs.patch
	touch ruby-stomp-install

ruby-stomp-clean:
	[ -d ./ ] && cd ./ && /usr/bin/make clean
	[ -e ruby-stomp-configure ] && rm ruby-stomp-configure
	[ -e ruby-stomp-build ] && rm ruby-stomp-build
	[ -e ruby-stomp-install ] && rm ruby-stomp-install

ruby-stomp-clobber: ruby-stomp-clean
	[ -d ./ ] && rm -r ./
	[ -e ruby-stomp-unpack ] && rm ruby-stomp-unpack

rubygem-deep-merge: rubygem-deep-merge-install

rubygem-deep-merge-unpack: file-list-before-build
	export GEM_HOME="/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0" && \
	export RUBYLIB="/opt/puppetlabs/puppet/lib/ruby/vendor_ruby:$(RUBYLIB)" && \
	: nothing to extract
	touch rubygem-deep-merge-unpack

rubygem-deep-merge-patch: rubygem-deep-merge-unpack
	touch rubygem-deep-merge-patch

rubygem-deep-merge-configure: rubygem-deep-merge-patch ruby-2.3.3
	[ -d ./ ] || mkdir -p ./
	touch rubygem-deep-merge-configure

rubygem-deep-merge-build: rubygem-deep-merge-configure
	touch rubygem-deep-merge-build

rubygem-deep-merge-check: rubygem-deep-merge-build
	touch rubygem-deep-merge-check

rubygem-deep-merge-install: rubygem-deep-merge-check
	export GEM_HOME="/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0" && \
	export RUBYLIB="/opt/puppetlabs/puppet/lib/ruby/vendor_ruby:$(RUBYLIB)" && \
	cd ./ && \
	/opt/puppetlabs/puppet/bin/gem install --no-rdoc --no-ri --local deep_merge-1.0.1.gem
	touch rubygem-deep-merge-install

rubygem-deep-merge-clean:
	[ -d ./ ] && cd ./ && /usr/bin/make clean
	[ -e rubygem-deep-merge-configure ] && rm rubygem-deep-merge-configure
	[ -e rubygem-deep-merge-build ] && rm rubygem-deep-merge-build
	[ -e rubygem-deep-merge-install ] && rm rubygem-deep-merge-install

rubygem-deep-merge-clobber: rubygem-deep-merge-clean
	[ -d ./ ] && rm -r ./
	[ -e rubygem-deep-merge-unpack ] && rm rubygem-deep-merge-unpack

rubygem-net-ssh: rubygem-net-ssh-install

rubygem-net-ssh-unpack: file-list-before-build
	export GEM_HOME="/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0" && \
	export RUBYLIB="/opt/puppetlabs/puppet/lib/ruby/vendor_ruby:$(RUBYLIB)" && \
	: nothing to extract
	touch rubygem-net-ssh-unpack

rubygem-net-ssh-patch: rubygem-net-ssh-unpack
	touch rubygem-net-ssh-patch

rubygem-net-ssh-configure: rubygem-net-ssh-patch ruby-2.3.3
	[ -d ./ ] || mkdir -p ./
	touch rubygem-net-ssh-configure

rubygem-net-ssh-build: rubygem-net-ssh-configure
	touch rubygem-net-ssh-build

rubygem-net-ssh-check: rubygem-net-ssh-build
	touch rubygem-net-ssh-check

rubygem-net-ssh-install: rubygem-net-ssh-check
	export GEM_HOME="/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0" && \
	export RUBYLIB="/opt/puppetlabs/puppet/lib/ruby/vendor_ruby:$(RUBYLIB)" && \
	cd ./ && \
	/opt/puppetlabs/puppet/bin/gem install --no-rdoc --no-ri --local net-ssh-2.9.2.gem
	touch rubygem-net-ssh-install

rubygem-net-ssh-clean:
	[ -d ./ ] && cd ./ && /usr/bin/make clean
	[ -e rubygem-net-ssh-configure ] && rm rubygem-net-ssh-configure
	[ -e rubygem-net-ssh-build ] && rm rubygem-net-ssh-build
	[ -e rubygem-net-ssh-install ] && rm rubygem-net-ssh-install

rubygem-net-ssh-clobber: rubygem-net-ssh-clean
	[ -d ./ ] && rm -r ./
	[ -e rubygem-net-ssh-unpack ] && rm rubygem-net-ssh-unpack

rubygem-hocon: rubygem-hocon-install

rubygem-hocon-unpack: file-list-before-build
	export GEM_HOME="/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0" && \
	export RUBYLIB="/opt/puppetlabs/puppet/lib/ruby/vendor_ruby:$(RUBYLIB)" && \
	: nothing to extract
	touch rubygem-hocon-unpack

rubygem-hocon-patch: rubygem-hocon-unpack
	touch rubygem-hocon-patch

rubygem-hocon-configure: rubygem-hocon-patch ruby-2.3.3
	[ -d ./ ] || mkdir -p ./
	touch rubygem-hocon-configure

rubygem-hocon-build: rubygem-hocon-configure
	touch rubygem-hocon-build

rubygem-hocon-check: rubygem-hocon-build
	touch rubygem-hocon-check

rubygem-hocon-install: rubygem-hocon-check
	export GEM_HOME="/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0" && \
	export RUBYLIB="/opt/puppetlabs/puppet/lib/ruby/vendor_ruby:$(RUBYLIB)" && \
	cd ./ && \
	/opt/puppetlabs/puppet/bin/gem install --no-rdoc --no-ri --local hocon-1.1.3.gem
	touch rubygem-hocon-install

rubygem-hocon-clean:
	[ -d ./ ] && cd ./ && /usr/bin/make clean
	[ -e rubygem-hocon-configure ] && rm rubygem-hocon-configure
	[ -e rubygem-hocon-build ] && rm rubygem-hocon-build
	[ -e rubygem-hocon-install ] && rm rubygem-hocon-install

rubygem-hocon-clobber: rubygem-hocon-clean
	[ -d ./ ] && rm -r ./
	[ -e rubygem-hocon-unpack ] && rm rubygem-hocon-unpack

rubygem-semantic_puppet: rubygem-semantic_puppet-install

rubygem-semantic_puppet-unpack: file-list-before-build
	export GEM_HOME="/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0" && \
	export RUBYLIB="/opt/puppetlabs/puppet/lib/ruby/vendor_ruby:$(RUBYLIB)" && \
	: nothing to extract
	touch rubygem-semantic_puppet-unpack

rubygem-semantic_puppet-patch: rubygem-semantic_puppet-unpack
	touch rubygem-semantic_puppet-patch

rubygem-semantic_puppet-configure: rubygem-semantic_puppet-patch ruby-2.3.3
	[ -d ./ ] || mkdir -p ./
	touch rubygem-semantic_puppet-configure

rubygem-semantic_puppet-build: rubygem-semantic_puppet-configure
	touch rubygem-semantic_puppet-build

rubygem-semantic_puppet-check: rubygem-semantic_puppet-build
	touch rubygem-semantic_puppet-check

rubygem-semantic_puppet-install: rubygem-semantic_puppet-check
	export GEM_HOME="/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0" && \
	export RUBYLIB="/opt/puppetlabs/puppet/lib/ruby/vendor_ruby:$(RUBYLIB)" && \
	cd ./ && \
	/opt/puppetlabs/puppet/bin/gem install --no-rdoc --no-ri --local semantic_puppet-0.1.2.gem
	touch rubygem-semantic_puppet-install

rubygem-semantic_puppet-clean:
	[ -d ./ ] && cd ./ && /usr/bin/make clean
	[ -e rubygem-semantic_puppet-configure ] && rm rubygem-semantic_puppet-configure
	[ -e rubygem-semantic_puppet-build ] && rm rubygem-semantic_puppet-build
	[ -e rubygem-semantic_puppet-install ] && rm rubygem-semantic_puppet-install

rubygem-semantic_puppet-clobber: rubygem-semantic_puppet-clean
	[ -d ./ ] && rm -r ./
	[ -e rubygem-semantic_puppet-unpack ] && rm rubygem-semantic_puppet-unpack

rubygem-text: rubygem-text-install

rubygem-text-unpack: file-list-before-build
	export GEM_HOME="/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0" && \
	export RUBYLIB="/opt/puppetlabs/puppet/lib/ruby/vendor_ruby:$(RUBYLIB)" && \
	: nothing to extract
	touch rubygem-text-unpack

rubygem-text-patch: rubygem-text-unpack
	touch rubygem-text-patch

rubygem-text-configure: rubygem-text-patch ruby-2.3.3
	[ -d ./ ] || mkdir -p ./
	touch rubygem-text-configure

rubygem-text-build: rubygem-text-configure
	touch rubygem-text-build

rubygem-text-check: rubygem-text-build
	touch rubygem-text-check

rubygem-text-install: rubygem-text-check
	export GEM_HOME="/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0" && \
	export RUBYLIB="/opt/puppetlabs/puppet/lib/ruby/vendor_ruby:$(RUBYLIB)" && \
	cd ./ && \
	/opt/puppetlabs/puppet/bin/gem install --no-rdoc --no-ri --local text-1.3.1.gem
	touch rubygem-text-install

rubygem-text-clean:
	[ -d ./ ] && cd ./ && /usr/bin/make clean
	[ -e rubygem-text-configure ] && rm rubygem-text-configure
	[ -e rubygem-text-build ] && rm rubygem-text-build
	[ -e rubygem-text-install ] && rm rubygem-text-install

rubygem-text-clobber: rubygem-text-clean
	[ -d ./ ] && rm -r ./
	[ -e rubygem-text-unpack ] && rm rubygem-text-unpack

rubygem-locale: rubygem-locale-install

rubygem-locale-unpack: file-list-before-build
	export GEM_HOME="/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0" && \
	export RUBYLIB="/opt/puppetlabs/puppet/lib/ruby/vendor_ruby:$(RUBYLIB)" && \
	: nothing to extract
	touch rubygem-locale-unpack

rubygem-locale-patch: rubygem-locale-unpack
	touch rubygem-locale-patch

rubygem-locale-configure: rubygem-locale-patch ruby-2.3.3
	[ -d ./ ] || mkdir -p ./
	touch rubygem-locale-configure

rubygem-locale-build: rubygem-locale-configure
	touch rubygem-locale-build

rubygem-locale-check: rubygem-locale-build
	touch rubygem-locale-check

rubygem-locale-install: rubygem-locale-check
	export GEM_HOME="/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0" && \
	export RUBYLIB="/opt/puppetlabs/puppet/lib/ruby/vendor_ruby:$(RUBYLIB)" && \
	cd ./ && \
	/opt/puppetlabs/puppet/bin/gem install --no-rdoc --no-ri --local locale-2.1.2.gem
	touch rubygem-locale-install

rubygem-locale-clean:
	[ -d ./ ] && cd ./ && /usr/bin/make clean
	[ -e rubygem-locale-configure ] && rm rubygem-locale-configure
	[ -e rubygem-locale-build ] && rm rubygem-locale-build
	[ -e rubygem-locale-install ] && rm rubygem-locale-install

rubygem-locale-clobber: rubygem-locale-clean
	[ -d ./ ] && rm -r ./
	[ -e rubygem-locale-unpack ] && rm rubygem-locale-unpack

rubygem-gettext: rubygem-gettext-install

rubygem-gettext-unpack: file-list-before-build
	export GEM_HOME="/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0" && \
	export RUBYLIB="/opt/puppetlabs/puppet/lib/ruby/vendor_ruby:$(RUBYLIB)" && \
	: nothing to extract
	touch rubygem-gettext-unpack

rubygem-gettext-patch: rubygem-gettext-unpack
	touch rubygem-gettext-patch

rubygem-gettext-configure: rubygem-gettext-patch ruby-2.3.3
	[ -d ./ ] || mkdir -p ./
	touch rubygem-gettext-configure

rubygem-gettext-build: rubygem-gettext-configure
	touch rubygem-gettext-build

rubygem-gettext-check: rubygem-gettext-build
	touch rubygem-gettext-check

rubygem-gettext-install: rubygem-gettext-check
	export GEM_HOME="/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0" && \
	export RUBYLIB="/opt/puppetlabs/puppet/lib/ruby/vendor_ruby:$(RUBYLIB)" && \
	cd ./ && \
	/opt/puppetlabs/puppet/bin/gem install --no-rdoc --no-ri --local gettext-3.2.2.gem
	touch rubygem-gettext-install

rubygem-gettext-clean:
	[ -d ./ ] && cd ./ && /usr/bin/make clean
	[ -e rubygem-gettext-configure ] && rm rubygem-gettext-configure
	[ -e rubygem-gettext-build ] && rm rubygem-gettext-build
	[ -e rubygem-gettext-install ] && rm rubygem-gettext-install

rubygem-gettext-clobber: rubygem-gettext-clean
	[ -d ./ ] && rm -r ./
	[ -e rubygem-gettext-unpack ] && rm rubygem-gettext-unpack

rubygem-fast_gettext: rubygem-fast_gettext-install

rubygem-fast_gettext-unpack: file-list-before-build
	export GEM_HOME="/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0" && \
	export RUBYLIB="/opt/puppetlabs/puppet/lib/ruby/vendor_ruby:$(RUBYLIB)" && \
	: nothing to extract
	touch rubygem-fast_gettext-unpack

rubygem-fast_gettext-patch: rubygem-fast_gettext-unpack
	touch rubygem-fast_gettext-patch

rubygem-fast_gettext-configure: rubygem-fast_gettext-patch ruby-2.3.3
	[ -d ./ ] || mkdir -p ./
	touch rubygem-fast_gettext-configure

rubygem-fast_gettext-build: rubygem-fast_gettext-configure
	touch rubygem-fast_gettext-build

rubygem-fast_gettext-check: rubygem-fast_gettext-build
	touch rubygem-fast_gettext-check

rubygem-fast_gettext-install: rubygem-fast_gettext-check
	export GEM_HOME="/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0" && \
	export RUBYLIB="/opt/puppetlabs/puppet/lib/ruby/vendor_ruby:$(RUBYLIB)" && \
	cd ./ && \
	/opt/puppetlabs/puppet/bin/gem install --no-rdoc --no-ri --local fast_gettext-1.1.0.gem
	touch rubygem-fast_gettext-install

rubygem-fast_gettext-clean:
	[ -d ./ ] && cd ./ && /usr/bin/make clean
	[ -e rubygem-fast_gettext-configure ] && rm rubygem-fast_gettext-configure
	[ -e rubygem-fast_gettext-build ] && rm rubygem-fast_gettext-build
	[ -e rubygem-fast_gettext-install ] && rm rubygem-fast_gettext-install

rubygem-fast_gettext-clobber: rubygem-fast_gettext-clean
	[ -d ./ ] && rm -r ./
	[ -e rubygem-fast_gettext-unpack ] && rm rubygem-fast_gettext-unpack

rubygem-gettext-setup: rubygem-gettext-setup-install

rubygem-gettext-setup-unpack: file-list-before-build
	export GEM_HOME="/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0" && \
	export RUBYLIB="/opt/puppetlabs/puppet/lib/ruby/vendor_ruby:$(RUBYLIB)" && \
	: nothing to extract
	touch rubygem-gettext-setup-unpack

rubygem-gettext-setup-patch: rubygem-gettext-setup-unpack
	touch rubygem-gettext-setup-patch

rubygem-gettext-setup-configure: rubygem-gettext-setup-patch ruby-2.3.3
	[ -d ./ ] || mkdir -p ./
	touch rubygem-gettext-setup-configure

rubygem-gettext-setup-build: rubygem-gettext-setup-configure
	touch rubygem-gettext-setup-build

rubygem-gettext-setup-check: rubygem-gettext-setup-build
	touch rubygem-gettext-setup-check

rubygem-gettext-setup-install: rubygem-gettext-setup-check
	export GEM_HOME="/opt/puppetlabs/puppet/lib/ruby/gems/2.3.0" && \
	export RUBYLIB="/opt/puppetlabs/puppet/lib/ruby/vendor_ruby:$(RUBYLIB)" && \
	cd ./ && \
	/opt/puppetlabs/puppet/bin/gem install --no-rdoc --no-ri --local gettext-setup-0.20.gem
	touch rubygem-gettext-setup-install

rubygem-gettext-setup-clean:
	[ -d ./ ] && cd ./ && /usr/bin/make clean
	[ -e rubygem-gettext-setup-configure ] && rm rubygem-gettext-setup-configure
	[ -e rubygem-gettext-setup-build ] && rm rubygem-gettext-setup-build
	[ -e rubygem-gettext-setup-install ] && rm rubygem-gettext-setup-install

rubygem-gettext-setup-clobber: rubygem-gettext-setup-clean
	[ -d ./ ] && rm -r ./
	[ -e rubygem-gettext-setup-unpack ] && rm rubygem-gettext-setup-unpack

ruby-shadow: ruby-shadow-install

ruby-shadow-unpack: file-list-before-build
	export PATH="$(PATH):/usr/ccs/bin:/usr/sfw/bin" && \
	export CONFIGURE_ARGS="--vendor" && \
	gunzip -c "ruby-shadow-2.3.3.tar.gz" | tar xf -
	touch ruby-shadow-unpack

ruby-shadow-patch: ruby-shadow-unpack
	touch ruby-shadow-patch

ruby-shadow-configure: ruby-shadow-patch ruby-2.3.3
	[ -d ruby-shadow-2.3.3 ] || mkdir -p ruby-shadow-2.3.3
	touch ruby-shadow-configure

ruby-shadow-build: ruby-shadow-configure
	export PATH="$(PATH):/usr/ccs/bin:/usr/sfw/bin" && \
	export CONFIGURE_ARGS="--vendor" && \
	cd ruby-shadow-2.3.3 && \
	/opt/puppetlabs/puppet/bin/ruby extconf.rb && \
	/usr/bin/make -e -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1)
	touch ruby-shadow-build

ruby-shadow-check: ruby-shadow-build
	touch ruby-shadow-check

ruby-shadow-install: ruby-shadow-check
	export PATH="$(PATH):/usr/ccs/bin:/usr/sfw/bin" && \
	export CONFIGURE_ARGS="--vendor" && \
	cd ruby-shadow-2.3.3 && \
	/usr/bin/make -e -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1) DESTDIR=/ install
	touch ruby-shadow-install

ruby-shadow-clean:
	[ -d ruby-shadow-2.3.3 ] && cd ruby-shadow-2.3.3 && /usr/bin/make clean
	[ -e ruby-shadow-configure ] && rm ruby-shadow-configure
	[ -e ruby-shadow-build ] && rm ruby-shadow-build
	[ -e ruby-shadow-install ] && rm ruby-shadow-install

ruby-shadow-clobber: ruby-shadow-clean
	[ -d ruby-shadow-2.3.3 ] && rm -r ruby-shadow-2.3.3
	[ -e ruby-shadow-unpack ] && rm ruby-shadow-unpack

ruby-augeas: ruby-augeas-install

ruby-augeas-unpack: file-list-before-build
	export PATH="$(PATH):/opt/pl-build-tools/bin:/usr/local/bin:/opt/csw/bin:/usr/ccs/bin:/usr/sfw/bin" && \
	export CONFIGURE_ARGS="--vendor" && \
	export PKG_CONFIG_PATH="/opt/puppetlabs/puppet/lib/pkgconfig:/usr/lib/pkgconfig" && \
	gunzip -c "ruby-augeas-0.5.0.tgz" | tar xf -
	touch ruby-augeas-unpack

ruby-augeas-patch: ruby-augeas-unpack
	touch ruby-augeas-patch

ruby-augeas-configure: ruby-augeas-patch ruby-2.3.3 augeas
	[ -d ruby-augeas-0.5.0 ] || mkdir -p ruby-augeas-0.5.0
	touch ruby-augeas-configure

ruby-augeas-build: ruby-augeas-configure
	export PATH="$(PATH):/opt/pl-build-tools/bin:/usr/local/bin:/opt/csw/bin:/usr/ccs/bin:/usr/sfw/bin" && \
	export CONFIGURE_ARGS="--vendor" && \
	export PKG_CONFIG_PATH="/opt/puppetlabs/puppet/lib/pkgconfig:/usr/lib/pkgconfig" && \
	cd ruby-augeas-0.5.0 && \
	/opt/puppetlabs/puppet/bin/ruby ext/augeas/extconf.rb && \
	/usr/bin/make -e -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1)
	touch ruby-augeas-build

ruby-augeas-check: ruby-augeas-build
	touch ruby-augeas-check

ruby-augeas-install: ruby-augeas-check
	export PATH="$(PATH):/opt/pl-build-tools/bin:/usr/local/bin:/opt/csw/bin:/usr/ccs/bin:/usr/sfw/bin" && \
	export CONFIGURE_ARGS="--vendor" && \
	export PKG_CONFIG_PATH="/opt/puppetlabs/puppet/lib/pkgconfig:/usr/lib/pkgconfig" && \
	cd ruby-augeas-0.5.0 && \
	install -d '/opt/puppetlabs/puppet/lib/ruby/vendor_ruby' && \
	cp -p 'lib/augeas.rb' '/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/augeas.rb' && \
	/usr/bin/make -e -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1) DESTDIR=/ install
	touch ruby-augeas-install

ruby-augeas-clean:
	[ -d ruby-augeas-0.5.0 ] && cd ruby-augeas-0.5.0 && /usr/bin/make clean
	[ -e ruby-augeas-configure ] && rm ruby-augeas-configure
	[ -e ruby-augeas-build ] && rm ruby-augeas-build
	[ -e ruby-augeas-install ] && rm ruby-augeas-install

ruby-augeas-clobber: ruby-augeas-clean
	[ -d ruby-augeas-0.5.0 ] && rm -r ruby-augeas-0.5.0
	[ -e ruby-augeas-unpack ] && rm ruby-augeas-unpack

openssl: openssl-install

openssl-unpack: file-list-before-build
	export PATH="/opt/pl-build-tools/bin:$(PATH):/usr/local/bin" && \
	gunzip -c "openssl-1.0.2j.tar.gz" | tar xf -
	touch openssl-unpack

openssl-patch: openssl-unpack
	touch openssl-patch

openssl-configure: openssl-patch
	[ -d openssl-1.0.2j ] || mkdir -p openssl-1.0.2j
	export PATH="/opt/pl-build-tools/bin:$(PATH):/usr/local/bin" && \
	cd openssl-1.0.2j && \
	./Configure --prefix=/opt/puppetlabs/puppet --libdir=lib --openssldir=/opt/puppetlabs/puppet/ssl shared no-asm linux-x86_64 no-camellia enable-seed enable-tlsext enable-rfc3779 enable-cms no-md2 no-mdc2 no-rc5 no-ec2m no-gost no-srp no-ssl2 no-ssl2-method no-ssl3 -I/opt/puppetlabs/puppet/include -I/opt/pl-build-tools/include -L/opt/puppetlabs/puppet/lib -L/opt/pl-build-tools/lib -Wl,-rpath=/opt/puppetlabs/puppet/lib -Wl,-z,relro
	touch openssl-configure

openssl-build: openssl-configure
	export PATH="/opt/pl-build-tools/bin:$(PATH):/usr/local/bin" && \
	cd openssl-1.0.2j && \
	/usr/bin/make depend && \
	/usr/bin/make
	touch openssl-build

openssl-check: openssl-build
	touch openssl-check

openssl-install: openssl-check
	export PATH="/opt/pl-build-tools/bin:$(PATH):/usr/local/bin" && \
	cd openssl-1.0.2j && \
	/usr/bin/make INSTALL_PREFIX=/ install && \
	install -d '/opt/puppetlabs/puppet/share/doc/openssl-1.0.2j' && \
	cp -p 'LICENSE' '/opt/puppetlabs/puppet/share/doc/openssl-1.0.2j/LICENSE'
	touch openssl-install

openssl-clean:
	[ -d openssl-1.0.2j ] && cd openssl-1.0.2j && /usr/bin/make clean
	[ -e openssl-configure ] && rm openssl-configure
	[ -e openssl-build ] && rm openssl-build
	[ -e openssl-install ] && rm openssl-install

openssl-clobber: openssl-clean
	[ -d openssl-1.0.2j ] && rm -r openssl-1.0.2j
	[ -e openssl-unpack ] && rm openssl-unpack

puppet-ca-bundle: puppet-ca-bundle-install

puppet-ca-bundle-unpack: file-list-before-build
	
	touch puppet-ca-bundle-unpack

puppet-ca-bundle-patch: puppet-ca-bundle-unpack
	touch puppet-ca-bundle-patch

puppet-ca-bundle-configure: puppet-ca-bundle-patch openssl
	[ -d puppet-ca-bundle ] || mkdir -p puppet-ca-bundle
	touch puppet-ca-bundle-configure

puppet-ca-bundle-build: puppet-ca-bundle-configure
	touch puppet-ca-bundle-build

puppet-ca-bundle-check: puppet-ca-bundle-build
	touch puppet-ca-bundle-check

puppet-ca-bundle-install: puppet-ca-bundle-check
	cd puppet-ca-bundle && \
	/usr/bin/make install OPENSSL=/opt/puppetlabs/puppet/bin/openssl USER=0 GROUP=0 DESTDIR=/opt/puppetlabs/puppet/ssl && \
	/usr/bin/make keystore OPENSSL=/opt/puppetlabs/puppet/bin/openssl DESTDIR=/opt/puppetlabs/puppet/ssl
	touch puppet-ca-bundle-install

puppet-ca-bundle-clean:
	[ -d puppet-ca-bundle ] && cd puppet-ca-bundle && /usr/bin/make clean
	[ -e puppet-ca-bundle-configure ] && rm puppet-ca-bundle-configure
	[ -e puppet-ca-bundle-build ] && rm puppet-ca-bundle-build
	[ -e puppet-ca-bundle-install ] && rm puppet-ca-bundle-install

puppet-ca-bundle-clobber: puppet-ca-bundle-clean
	[ -d puppet-ca-bundle ] && rm -r puppet-ca-bundle
	[ -e puppet-ca-bundle-unpack ] && rm puppet-ca-bundle-unpack

libxml2: libxml2-install

libxml2-unpack: file-list-before-build
	export LDFLAGS="-L/opt/puppetlabs/puppet/lib -L/opt/pl-build-tools/lib -Wl,-rpath=/opt/puppetlabs/puppet/lib" && \
	export CFLAGS="-I/opt/puppetlabs/puppet/include -I/opt/pl-build-tools/include" && \
	gunzip -c "libxml2-2.9.4.tar.gz" | tar xf -
	touch libxml2-unpack

libxml2-patch: libxml2-unpack
	touch libxml2-patch

libxml2-configure: libxml2-patch
	[ -d libxml2-2.9.4 ] || mkdir -p libxml2-2.9.4
	export LDFLAGS="-L/opt/puppetlabs/puppet/lib -L/opt/pl-build-tools/lib -Wl,-rpath=/opt/puppetlabs/puppet/lib" && \
	export CFLAGS="-I/opt/puppetlabs/puppet/include -I/opt/pl-build-tools/include" && \
	cd libxml2-2.9.4 && \
	./configure --prefix=/opt/puppetlabs/puppet --without-python 
	touch libxml2-configure

libxml2-build: libxml2-configure
	export LDFLAGS="-L/opt/puppetlabs/puppet/lib -L/opt/pl-build-tools/lib -Wl,-rpath=/opt/puppetlabs/puppet/lib" && \
	export CFLAGS="-I/opt/puppetlabs/puppet/include -I/opt/pl-build-tools/include" && \
	cd libxml2-2.9.4 && \
	/usr/bin/make VERBOSE=1 -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1)
	touch libxml2-build

libxml2-check: libxml2-build
	touch libxml2-check

libxml2-install: libxml2-check
	export LDFLAGS="-L/opt/puppetlabs/puppet/lib -L/opt/pl-build-tools/lib -Wl,-rpath=/opt/puppetlabs/puppet/lib" && \
	export CFLAGS="-I/opt/puppetlabs/puppet/include -I/opt/pl-build-tools/include" && \
	cd libxml2-2.9.4 && \
	/usr/bin/make VERBOSE=1 -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1) install && \
	rm -rf /opt/puppetlabs/puppet/share/gtk-doc && \
	rm -rf /opt/puppetlabs/puppet/share/doc/libxml2*
	touch libxml2-install

libxml2-clean:
	[ -d libxml2-2.9.4 ] && cd libxml2-2.9.4 && /usr/bin/make clean
	[ -e libxml2-configure ] && rm libxml2-configure
	[ -e libxml2-build ] && rm libxml2-build
	[ -e libxml2-install ] && rm libxml2-install

libxml2-clobber: libxml2-clean
	[ -d libxml2-2.9.4 ] && rm -r libxml2-2.9.4
	[ -e libxml2-unpack ] && rm libxml2-unpack

libxslt: libxslt-install

libxslt-unpack: file-list-before-build
	export LDFLAGS="-L/opt/puppetlabs/puppet/lib -L/opt/pl-build-tools/lib -Wl,-rpath=/opt/puppetlabs/puppet/lib" && \
	export CFLAGS="-I/opt/puppetlabs/puppet/include -I/opt/pl-build-tools/include" && \
	gunzip -c "libxslt-1.1.29.tar.gz" | tar xf -
	touch libxslt-unpack

libxslt-patch: libxslt-unpack
	touch libxslt-patch

libxslt-configure: libxslt-patch libxml2
	[ -d libxslt-1.1.29 ] || mkdir -p libxslt-1.1.29
	export LDFLAGS="-L/opt/puppetlabs/puppet/lib -L/opt/pl-build-tools/lib -Wl,-rpath=/opt/puppetlabs/puppet/lib" && \
	export CFLAGS="-I/opt/puppetlabs/puppet/include -I/opt/pl-build-tools/include" && \
	cd libxslt-1.1.29 && \
	./configure --prefix=/opt/puppetlabs/puppet --docdir=/tmp --with-libxml-prefix=/opt/puppetlabs/puppet 
	touch libxslt-configure

libxslt-build: libxslt-configure
	export LDFLAGS="-L/opt/puppetlabs/puppet/lib -L/opt/pl-build-tools/lib -Wl,-rpath=/opt/puppetlabs/puppet/lib" && \
	export CFLAGS="-I/opt/puppetlabs/puppet/include -I/opt/pl-build-tools/include" && \
	cd libxslt-1.1.29 && \
	/usr/bin/make VERBOSE=1 -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1)
	touch libxslt-build

libxslt-check: libxslt-build
	touch libxslt-check

libxslt-install: libxslt-check
	export LDFLAGS="-L/opt/puppetlabs/puppet/lib -L/opt/pl-build-tools/lib -Wl,-rpath=/opt/puppetlabs/puppet/lib" && \
	export CFLAGS="-I/opt/puppetlabs/puppet/include -I/opt/pl-build-tools/include" && \
	cd libxslt-1.1.29 && \
	/usr/bin/make VERBOSE=1 -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1) install && \
	rm -rf /opt/puppetlabs/puppet/share/gtk-doc && \
	rm -rf /opt/puppetlabs/puppet/share/doc/libxslt*
	touch libxslt-install

libxslt-clean:
	[ -d libxslt-1.1.29 ] && cd libxslt-1.1.29 && /usr/bin/make clean
	[ -e libxslt-configure ] && rm libxslt-configure
	[ -e libxslt-build ] && rm libxslt-build
	[ -e libxslt-install ] && rm libxslt-install

libxslt-clobber: libxslt-clean
	[ -d libxslt-1.1.29 ] && rm -r libxslt-1.1.29
	[ -e libxslt-unpack ] && rm libxslt-unpack

virt-what: virt-what-install

virt-what-unpack: file-list-before-build
	gunzip -c "virt-what-1.14.tar.gz" | tar xf -
	touch virt-what-unpack

virt-what-patch: virt-what-unpack
	touch virt-what-patch

virt-what-configure: virt-what-patch
	[ -d virt-what-1.14 ] || mkdir -p virt-what-1.14
	cd virt-what-1.14 && \
	./configure --prefix=/opt/puppetlabs/puppet --sbindir=/opt/puppetlabs/puppet/bin --libexecdir=/opt/puppetlabs/puppet/lib/virt-what 
	touch virt-what-configure

virt-what-build: virt-what-configure
	cd virt-what-1.14 && \
	/usr/bin/make -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1)
	touch virt-what-build

virt-what-check: virt-what-build
	touch virt-what-check

virt-what-install: virt-what-check
	cd virt-what-1.14 && \
	/usr/bin/make -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1) install
	touch virt-what-install

virt-what-clean:
	[ -d virt-what-1.14 ] && cd virt-what-1.14 && /usr/bin/make clean
	[ -e virt-what-configure ] && rm virt-what-configure
	[ -e virt-what-build ] && rm virt-what-build
	[ -e virt-what-install ] && rm virt-what-install

virt-what-clobber: virt-what-clean
	[ -d virt-what-1.14 ] && rm -r virt-what-1.14
	[ -e virt-what-unpack ] && rm virt-what-unpack

dmidecode: dmidecode-install

dmidecode-unpack: file-list-before-build
	export LDFLAGS="-L/opt/puppetlabs/puppet/lib -L/opt/pl-build-tools/lib -Wl,-rpath=/opt/puppetlabs/puppet/lib" && \
	export CFLAGS="-I/opt/puppetlabs/puppet/include -I/opt/pl-build-tools/include" && \
	gunzip -c "dmidecode-2.12.tar.gz" | tar xf -
	touch dmidecode-unpack

dmidecode-patch: dmidecode-unpack
	cd dmidecode-2.12 && \
	/usr/bin/patch --strip=1 --fuzz=0 --ignore-whitespace < $(workdir)/patches/dmidecode-1.173.patch && \
	/usr/bin/patch --strip=1 --fuzz=0 --ignore-whitespace < $(workdir)/patches/dmidecode-1.175.patch && \
	/usr/bin/patch --strip=1 --fuzz=0 --ignore-whitespace < $(workdir)/patches/dmidecode-1.176.patch && \
	/usr/bin/patch --strip=1 --fuzz=0 --ignore-whitespace < $(workdir)/patches/dmidecode-1.177.patch && \
	/usr/bin/patch --strip=1 --fuzz=0 --ignore-whitespace < $(workdir)/patches/dmidecode-1.181.patch && \
	/usr/bin/patch --strip=1 --fuzz=0 --ignore-whitespace < $(workdir)/patches/dmidecode-1.182.patch && \
	/usr/bin/patch --strip=1 --fuzz=0 --ignore-whitespace < $(workdir)/patches/dmidecode-1.195.patch && \
	/usr/bin/patch --strip=1 --fuzz=0 --ignore-whitespace < $(workdir)/patches/dmidecode-install-to-bin.patch
	touch dmidecode-patch

dmidecode-configure: dmidecode-patch
	[ -d dmidecode-2.12 ] || mkdir -p dmidecode-2.12
	touch dmidecode-configure

dmidecode-build: dmidecode-configure
	export LDFLAGS="-L/opt/puppetlabs/puppet/lib -L/opt/pl-build-tools/lib -Wl,-rpath=/opt/puppetlabs/puppet/lib" && \
	export CFLAGS="-I/opt/puppetlabs/puppet/include -I/opt/pl-build-tools/include" && \
	cd dmidecode-2.12 && \
	/usr/bin/make -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1)
	touch dmidecode-build

dmidecode-check: dmidecode-build
	touch dmidecode-check

dmidecode-install: dmidecode-check
	export LDFLAGS="-L/opt/puppetlabs/puppet/lib -L/opt/pl-build-tools/lib -Wl,-rpath=/opt/puppetlabs/puppet/lib" && \
	export CFLAGS="-I/opt/puppetlabs/puppet/include -I/opt/pl-build-tools/include" && \
	cd dmidecode-2.12 && \
	/usr/bin/make prefix=/opt/puppetlabs/puppet -j$(shell expr $(shell /bin/grep -c 'processor' /proc/cpuinfo) + 1) install && \
	rm -f /opt/puppetlabs/puppet/bin/vpddecode /opt/puppetlabs/puppet/bin/biosdecode /opt/puppetlabs/puppet/bin/ownership && \
	rm -f /opt/puppetlabs/puppet/share/man/man8/ownership.8 /opt/puppetlabs/puppet/share/man/man8/biosdecode.8 /opt/puppetlabs/puppet/share/man/man8/vpddecode.8
	touch dmidecode-install

dmidecode-clean:
	[ -d dmidecode-2.12 ] && cd dmidecode-2.12 && /usr/bin/make clean
	[ -e dmidecode-configure ] && rm dmidecode-configure
	[ -e dmidecode-build ] && rm dmidecode-build
	[ -e dmidecode-install ] && rm dmidecode-install

dmidecode-clobber: dmidecode-clean
	[ -d dmidecode-2.12 ] && rm -r dmidecode-2.12
	[ -e dmidecode-unpack ] && rm dmidecode-unpack

shellpath: shellpath-install

shellpath-unpack: file-list-before-build
	: no source, so nothing to extract && \
	: nothing to extract && \
	: nothing to extract
	touch shellpath-unpack

shellpath-patch: shellpath-unpack
	touch shellpath-patch

shellpath-configure: shellpath-patch
	[ -d ./ ] || mkdir -p ./
	touch shellpath-configure

shellpath-build: shellpath-configure
	touch shellpath-build

shellpath-check: shellpath-build
	touch shellpath-check

shellpath-install: shellpath-check
	cd ./ && \
	install -d '/etc/profile.d' && \
	cp -p './puppet-agent.sh' '/etc/profile.d/puppet-agent.sh' && \
	install -d '/etc/profile.d' && \
	cp -p './puppet-agent.csh' '/etc/profile.d/puppet-agent.csh'
	touch shellpath-install

shellpath-clean:
	[ -d ./ ] && cd ./ && /usr/bin/make clean
	[ -e shellpath-configure ] && rm shellpath-configure
	[ -e shellpath-build ] && rm shellpath-build
	[ -e shellpath-install ] && rm shellpath-install

shellpath-clobber: shellpath-clean
	[ -d ./ ] && rm -r ./
	[ -e shellpath-unpack ] && rm shellpath-unpack

runtime: runtime-install

runtime-unpack: file-list-before-build
	: no source, so nothing to extract && \
	: nothing to extract
	touch runtime-unpack

runtime-patch: runtime-unpack
	touch runtime-patch

runtime-configure: runtime-patch
	[ -d ./ ] || mkdir -p ./
	touch runtime-configure

runtime-build: runtime-configure
	touch runtime-build

runtime-check: runtime-build
	touch runtime-check

runtime-install: runtime-check
	cd ./ && \
	bash runtime.sh /opt/pl-build-tools/lib64
	touch runtime-install

runtime-clean:
	[ -d ./ ] && cd ./ && /usr/bin/make clean
	[ -e runtime-configure ] && rm runtime-configure
	[ -e runtime-build ] && rm runtime-build
	[ -e runtime-install ] && rm runtime-install

runtime-clobber: runtime-clean
	[ -d ./ ] && rm -r ./
	[ -e runtime-unpack ] && rm runtime-unpack

ruby-selinux: ruby-selinux-install

ruby-selinux-unpack: file-list-before-build
	gunzip -c "libselinux-2.0.94.tar.gz" | tar xf -
	touch ruby-selinux-unpack

ruby-selinux-patch: ruby-selinux-unpack
	touch ruby-selinux-patch

ruby-selinux-configure: ruby-selinux-patch ruby-2.3.3
	[ -d libselinux-2.0.94 ] || mkdir -p libselinux-2.0.94
	touch ruby-selinux-configure

ruby-selinux-build: ruby-selinux-configure
	cd libselinux-2.0.94 && \
	export RUBYHDRDIR=$(shell /opt/puppetlabs/puppet/bin/ruby -rrbconfig -e 'puts RbConfig::CONFIG["rubyhdrdir"]') && \
	export VENDORARCHDIR=$(shell /opt/puppetlabs/puppet/bin/ruby -rrbconfig -e 'puts RbConfig::CONFIG["vendorarchdir"]') && \
	export ARCHDIR=$${RUBYHDRDIR}/$(shell /opt/puppetlabs/puppet/bin/ruby -rrbconfig -e 'puts RbConfig::CONFIG["arch"]') && \
	export INCLUDESTR="-I/opt/puppetlabs/puppet/include -I$${RUBYHDRDIR} -I$${ARCHDIR}" && \
	cp -pr src/{selinuxswig_ruby.i,selinuxswig.i} . && \
	swig -Wall -ruby -I/usr/include -o selinuxswig_ruby_wrap.c -outdir ./ selinuxswig_ruby.i && \
	/opt/pl-build-tools/bin/gcc $${INCLUDESTR} -I/usr/include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -DSHARED -c -o selinuxswig_ruby_wrap.lo selinuxswig_ruby_wrap.c && \
	/opt/pl-build-tools/bin/gcc $${INCLUDESTR} -I/usr/include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -shared -o _rubyselinux.so selinuxswig_ruby_wrap.lo -lselinux -Wl,-soname,_rubyselinux.so
	touch ruby-selinux-build

ruby-selinux-check: ruby-selinux-build
	touch ruby-selinux-check

ruby-selinux-install: ruby-selinux-check
	cd libselinux-2.0.94 && \
	export VENDORARCHDIR=$(shell /opt/puppetlabs/puppet/bin/ruby -rrbconfig -e 'puts RbConfig::CONFIG["vendorarchdir"]') && \
	install -d $${VENDORARCHDIR} && \
	install -p -m755 _rubyselinux.so $${VENDORARCHDIR}/selinux.so
	touch ruby-selinux-install

ruby-selinux-clean:
	[ -d libselinux-2.0.94 ] && cd libselinux-2.0.94 && /usr/bin/make clean
	[ -e ruby-selinux-configure ] && rm ruby-selinux-configure
	[ -e ruby-selinux-build ] && rm ruby-selinux-build
	[ -e ruby-selinux-install ] && rm ruby-selinux-install

ruby-selinux-clobber: ruby-selinux-clean
	[ -d libselinux-2.0.94 ] && rm -r libselinux-2.0.94
	[ -e ruby-selinux-unpack ] && rm ruby-selinux-unpack

clean: puppet-clean facter-clean hiera-clean 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment