# Created by: Tomoyuki Sakurai # $FreeBSD: head/sysutils/puppet38/Makefile 412349 2016-04-01 14:25:16Z mat $ PORTNAME= puppet PORTVERSION= 3.8.7 PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= http://downloads.puppetlabs.com/puppet/ PKGNAMESUFFIX= 38 MAINTAINER= ruby@FreeBSD.org COMMENT= Configuration management framework written in Ruby LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= rubygem-facter>=0:sysutils/rubygem-facter \ rubygem-hiera>=0:sysutils/rubygem-hiera RUN_DEPENDS= rubygem-facter>=0:sysutils/rubygem-facter \ rubygem-ruby-augeas>=0:textproc/rubygem-ruby-augeas \ rubygem-hiera>=0:sysutils/rubygem-hiera USES= cpe CPE_VENDOR= puppetlabs CONFLICTS_INSTALL= puppet37-* puppet4-* NO_BUILD= yes NO_ARCH= 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 post-patch: @${REINPLACE_CMD} -e "s|/etc/puppet|${ETCDIR}|" \ ${WRKSRC}/install.rb \ ${WRKSRC}/lib/puppet/reference/configuration.rb \ ${WRKSRC}/lib/puppet/defaults.rb \ ${WRKSRC}/lib/puppet/util/run_mode.rb @${REINPLACE_CMD} -e "s|/var/lib/puppet|/var/puppet|" \ ${WRKSRC}/lib/puppet/reference/configuration.rb \ ${WRKSRC}/lib/puppet/util/run_mode.rb @${REINPLACE_CMD} -e "s|\$$vardir/run|/var/run/puppet|" \ ${WRKSRC}/lib/puppet/util/run_mode.rb @${REINPLACE_CMD} -e "s|\$$confdir/ssl|/var/puppet/ssl|" \ ${WRKSRC}/lib/puppet/defaults.rb @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" \ ${WRKSRC}/ext/rack/config.ru do-install: @cd ${WRKSRC} && ${SETENV} PREFIX=${PREFIX} ${RUBY} ${WRKSRC}/install.rb --no-configs --destdir=${STAGEDIR} 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 ${RUBY} -I ${STAGEDIR}/${RUBY_SITELIBDIR} ${STAGEDIR}${PREFIX}/bin/puppet agent --genconfig \ --confdir=${ETCDIR} \ --rundir=/var/run/puppet \ --vardir=/var/puppet \ --logdir=/var/log/puppet \ > ${STAGEDIR}${ETCDIR}/puppet.conf-dist @${ECHO} ${STAGEDIR}${RUBY_SITELIBDIR}/puppet.rb | \ ${SED} 's,^${STAGEDIR}${PREFIX}/,,' >> ${TMPPLIST} @${ECHO} ${STAGEDIR}${RUBY_SITELIBDIR}/semver.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