# $FreeBSD: head/sysutils/puppet5/Makefile 566817 2021-02-28 21:27:55Z romain $ PORTNAME= puppet PORTVERSION= 5.5.22 PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= https://downloads.puppetlabs.com/puppet/ PKGNAMESUFFIX= 5 MAINTAINER= puppet@FreeBSD.org COMMENT= Configuration management framework written in Ruby LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE DEPRECATED= Puppet 5 has reached EOL EXPIRATION_DATE=2021-07-01 # maybe a newer version like puppet 6.x or 7.x must be used to work with ruby 2.7 BROKEN_RUBY27= yes RUN_DEPENDS= rubygem-fast_gettext1>=1.1.2:devel/rubygem-fast_gettext1 \ rubygem-hiera>=3.2.1:sysutils/rubygem-hiera \ rubygem-locale>=2.1:devel/rubygem-locale \ rubygem-multi_json>=1.10:devel/rubygem-multi_json USES= cpe CPE_VENDOR= puppetlabs CONFLICTS_INSTALL= puppet6-* puppet7-* NO_ARCH= yes NO_BUILD= yes USE_RUBY= yes USE_RC_SUBR= puppet puppetmaster PORTDOCS= LICENSE README.md PORTEXAMPLES= * USERS= puppet GROUPS= puppet SUB_FILES+= pkg-message SUB_LIST= RUBY=${RUBY} OPTIONS_DEFINE= DOCS EXAMPLES OPTIONS_DEFAULT= CFACTER OPTIONS_RADIO= FACTER OPTIONS_RADIO_FACTER= CFACTER RFACTER RFACTER_DESC= Use facter 4.x (future facter, written in Ruby) CFACTER_DESC= Use facter 3.x (written in C++) RFACTER_BUILD_DEPENDS= rubygem-facter>=4.0:sysutils/rubygem-facter RFACTER_RUN_DEPENDS= rubygem-facter>=4.0:sysutils/rubygem-facter CFACTER_BUILD_DEPENDS= facter>=3.0:sysutils/facter CFACTER_RUN_DEPENDS= facter>=3.0:sysutils/facter post-patch: @${REINPLACE_CMD} -e "s|/etc/puppetlabs/puppet|${ETCDIR}|" \ ${WRKSRC}/install.rb \ ${WRKSRC}/lib/puppet/reference/configuration.rb \ ${WRKSRC}/lib/puppet/util/run_mode.rb @${REINPLACE_CMD} -e "s|/etc/puppetlabs/code|${ETCDIR}|" \ ${WRKSRC}/install.rb \ ${WRKSRC}/lib/puppet/reference/configuration.rb \ ${WRKSRC}/lib/puppet/util/run_mode.rb @${REINPLACE_CMD} -e "s|/opt/puppetlabs/puppet/cache|/var/puppet|" \ ${WRKSRC}/install.rb \ ${WRKSRC}/lib/puppet/reference/configuration.rb \ ${WRKSRC}/lib/puppet/util/run_mode.rb @${REINPLACE_CMD} -e "s|/var/run/puppetlabs|/var/run/puppet|" \ ${WRKSRC}/install.rb \ ${WRKSRC}/lib/puppet/util/run_mode.rb @${REINPLACE_CMD} -e "s|/var/log/puppetlabs/puppet|/var/log/puppet|" \ ${WRKSRC}/install.rb \ ${WRKSRC}/lib/puppet/util/run_mode.rb @${REINPLACE_CMD} -e "s|/opt/puppetlabs/puppet/modules|${ETCDIR}/modules|" \ ${WRKSRC}/lib/puppet/defaults.rb @${REINPLACE_CMD} -e "s|/opt/puppetlabs/puppet/bin/gem|${LOCALBASE}/bin/gem|" \ ${WRKSRC}/lib/puppet/provider/package/puppet_gem.rb @${REINPLACE_CMD} -e "s|\$$confdir/ssl|/var/puppet/ssl|" \ ${WRKSRC}/lib/puppet/defaults.rb @${REINPLACE_CMD} -e "s|\.\./\.\./\.\./locales|../locales|" \ ${WRKSRC}/lib/puppet/gettext/config.rb @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" \ ${WRKSRC}/ext/rack/config.ru do-install: @cd ${WRKSRC} && ${SETENV} PREFIX=${PREFIX} LC_ALL=C.UTF-8 ${RUBY} ${WRKSRC}/install.rb --no-configs --destdir=${STAGEDIR} \ --localedir=${RUBY_SITELIBDIR}/puppet/locales post-install: ${MKDIR} ${STAGEDIR}${ETCDIR}/manifests ${MKDIR} ${STAGEDIR}${ETCDIR}/modules ${MKDIR} ${STAGEDIR}/var/puppet ${INSTALL_DATA} ${WRKSRC}/conf/auth.conf ${STAGEDIR}${ETCDIR}/auth.conf-dist ${SETENV} LC_ALL=C.UTF-8 ${RUBY} -I ${STAGEDIR}/${RUBY_SITELIBDIR} ${STAGEDIR}${PREFIX}/bin/puppet agent --genconfig \ --confdir=${ETCDIR} \ --rundir=/var/run/puppet \ --vardir=/var/puppet \ --logdir=/var/log/puppet \ --codedir=${ETCDIR} \ > ${STAGEDIR}${ETCDIR}/puppet.conf-dist @${ECHO} ${STAGEDIR}${RUBY_SITELIBDIR}/puppet.rb | \ ${SED} 's,^${STAGEDIR}${PREFIX}/,,' >> ${TMPPLIST} @${FIND} ${STAGEDIR}${RUBY_SITELIBDIR}/${PORTNAME} -type f | \ ${SED} 's,^${STAGEDIR}${PREFIX}/,,' >> ${TMPPLIST} @${MKDIR} ${STAGEDIR}${WWWDIR} ${INSTALL_DATA} ${WRKSRC}/ext/rack/config.ru ${STAGEDIR}${WWWDIR} post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} post-install-EXAMPLES-on: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/ext/rack/example-passenger-vhost.conf ${STAGEDIR}${EXAMPLESDIR} .include