freebsd-ports/sysutils/puppet37/Makefile
Michael Moll 1553fe44ee sysutils/rubygem-hiera: update to 3.0.1
- this is paving the way for a Puppet 4.x port
- preserve 1.3.4 as sysutils/rubygem-hiera1
- use sysutils/rubygem-hiera1 in dependent ports
- change maintainer to ruby@

Approved by:	robak (maintainer)
Differential Revision:	https://reviews.freebsd.org/D3359
2015-08-13 16:22:54 +00:00

78 lines
2.6 KiB
Makefile

# Created by: Tomoyuki Sakurai <cherry@trombik.mine.nu>
# $FreeBSD$
PORTNAME= puppet
PORTVERSION= 3.7.5
PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://downloads.puppetlabs.com/puppet/
PKGNAMESUFFIX= 37
MAINTAINER= bapt@FreeBSD.org
COMMENT= Configuration management framework written in Ruby
LICENSE= APACHE20
BUILD_DEPENDS= rubygem-facter>=0:${PORTSDIR}/sysutils/rubygem-facter \
rubygem-hiera1>=0:${PORTSDIR}/sysutils/rubygem-hiera1
RUN_DEPENDS= rubygem-facter>=0:${PORTSDIR}/sysutils/rubygem-facter \
rubygem-ruby-augeas>=0:${PORTSDIR}/textproc/rubygem-ruby-augeas \
rubygem-hiera1>=0:${PORTSDIR}/sysutils/rubygem-hiera1
USES= cpe
CPE_VENDOR= puppetlabs
CONFLICTS_INSTALL= puppet-*
NO_BUILD= yes
USE_RUBY= yes
USE_RUBY_FEATURES= iconv
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
.include <bsd.port.pre.mk>
# puppet 4.x should support ruby 2.2.x
.if ${RUBY_VER} >= 2.2
BROKEN= Does not work with Ruby 2.2
.endif
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:
${SETENV} ${MAKE_ENV}${RUBY} ${WRKSRC}/install.rb --no-configs --destdir=${STAGEDIR}
${MKDIR} ${STAGEDIR}${ETCDIR}/manifests ${STAGEDIR}${ETCDIR}/modules \
${STAGEDIR}/var/puppet ${STAGEDIR}${WWWDIR} \
${STAGEDIR}${DOCSDIR} ${STAGEDIR}${EXAMPLESDIR}
${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
${INSTALL_DATA} ${WRKSRC}/ext/rack/config.ru ${STAGEDIR}${WWWDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/ext/rack/example-passenger-vhost.conf ${STAGEDIR}${EXAMPLESDIR}
.include <bsd.port.post.mk>