mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-30 01:15:52 +00:00
4ce569184b
- Fix issue with deprecated command use in puppetmaster rc script - Fix issue with puppetmaster startup bug triggered by "factdest" being defined in dist config. PR: ports/159801 Submitted by: Russell Jackson <raj@csub.edu> (maintainer)
115 lines
3.8 KiB
Makefile
115 lines
3.8 KiB
Makefile
# New ports collection makefile for: rubygem-puppet
|
|
# Date created: 2007-03-03
|
|
# Whom: Tomoyuki Sakurai <cherry@trombik.mine.nu>
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PORTNAME= puppet
|
|
PORTVERSION= 2.7.3
|
|
CATEGORIES= sysutils
|
|
MASTER_SITES= http://downloads.puppetlabs.com/puppet/
|
|
|
|
MAINTAINER= raj@csub.edu
|
|
COMMENT= A configuration management framework written in Ruby
|
|
|
|
RUN_DEPENDS= facter>=0:${PORTSDIR}/sysutils/facter \
|
|
rubygem-ruby-augeas>=0:${PORTSDIR}/textproc/rubygem-augeas
|
|
|
|
CONFLICTS= puppet-devel-[0-9]*
|
|
|
|
NO_BUILD= yes
|
|
USE_RUBY= yes
|
|
USE_RUBY_FEATURES= iconv
|
|
USE_RC_SUBR= puppet puppetmaster
|
|
PORTDOCS= CHANGELOG LICENSE README.md
|
|
PORTEXAMPLES= *
|
|
PUPPET_USER:= puppet
|
|
PUPPET_GROUP:= ${PUPPET_USER}
|
|
PUPPET_VARDIR:= /var/${PORTNAME}
|
|
PUPPET_RUNDIR:= /var/run/${PORTNAME}
|
|
SUB_FILES+= pkg-install pkg-message pkg-deinstall
|
|
SUB_LIST+= PUPPET_USER="${PUPPET_USER}" \
|
|
PUPPET_GROUP="${PUPPET_GROUP}" \
|
|
PUPPET_VARDIR="${PUPPET_VARDIR}" \
|
|
PUPPET_RUNDIR="${PUPPET_RUNDIR}"
|
|
|
|
MANCOMPRESSED= yes
|
|
MAN5= puppet.conf.5
|
|
MAN8= filebucket.8 pi.8 puppet.8 puppetca.8 puppetd.8 \
|
|
puppetdoc.8 puppetmasterd.8 puppetrun.8 ralsh.8 puppetqd.8 \
|
|
puppet-agent.8 puppet-apply.8 puppet-catalog.8 puppet-cert.8 \
|
|
puppet-certificate.8 puppet-certificate_request.8 \
|
|
puppet-certificate_revocation_list.8 puppet-config.8 \
|
|
puppet-describe.8 puppet-device.8 puppet-doc.8 puppet-facts.8 \
|
|
puppet-file.8 puppet-filebucket.8 puppet-help.8 puppet-inspect.8 \
|
|
puppet-key.8 puppet-kick.8 puppet-man.8 puppet-master.8 \
|
|
puppet-node.8 puppet-parser.8 puppet-plugin.8 puppet-queue.8 \
|
|
puppet-report.8 puppet-resource.8 puppet-resource_type.8 \
|
|
puppet-secret_agent.8 puppet-status.8
|
|
|
|
OPTIONS= MONGREL "Run puppet server as a mongrel service" Off \
|
|
PACKAGE_ORIGIN "Use port origin as package name" On
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
.if defined(WITH_MONGREL)
|
|
RUN_DEPENDS+= rubygem-mongrel>=0:${PORTSDIR}/www/rubygem-mongrel
|
|
.endif
|
|
|
|
.if defined(WITH_PACKAGE_ORIGIN)
|
|
EXTRA_PATCHES+= ${FILESDIR}/optpatch-package_origin
|
|
RUN_DEPENDS+= rubygem-bzip2>=0:${PORTSDIR}/archivers/rubygem-bzip2
|
|
.endif
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
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|${PUPPET_VARDIR}|" \
|
|
${WRKSRC}/lib/puppet/reference/configuration.rb \
|
|
${WRKSRC}/lib/puppet/util/run_mode.rb
|
|
@${REINPLACE_CMD} -e "s|\$$vardir/run|${PUPPET_RUNDIR}|" \
|
|
${WRKSRC}/lib/puppet/util/run_mode.rb
|
|
@${REINPLACE_CMD} -e "s|\$$confdir/ssl|${PUPPET_VARDIR}/ssl|" \
|
|
${WRKSRC}/lib/puppet/defaults.rb
|
|
|
|
pre-install:
|
|
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
|
|
|
do-install:
|
|
@cd ${WRKSRC} && ${SETENV} PREFIX=${PREFIX} ${RUBY} ${WRKSRC}/install.rb --no-configs
|
|
|
|
post-install:
|
|
${INSTALL} -d ${ETCDIR}
|
|
${INSTALL} -m 0644 ${WRKSRC}/conf/auth.conf ${ETCDIR}/auth.conf-dist
|
|
${RUBY} -I ${RUBY_SITELIBDIR} ${PREFIX}/bin/puppet --genconfig \
|
|
--confdir=${ETCDIR} \
|
|
--rundir=${PUPPET_RUNDIR} | \
|
|
${SED} -e 's/genconfig = true/# genconfig = false/' | \
|
|
${SED} -e 's/factdest =/# factdest =/' \
|
|
> ${ETCDIR}/puppet.conf-dist
|
|
@${ECHO} ${RUBY_SITELIBDIR}/puppet.rb | \
|
|
${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
|
|
@${ECHO} ${RUBY_SITELIBDIR}/semver.rb | \
|
|
${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
|
|
@${FIND} ${RUBY_SITELIBDIR}/${PORTNAME} -type f | \
|
|
${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
|
|
@${FIND} ${RUBY_SITELIBDIR}/${PORTNAME} -type d | ${SORT} -r | \
|
|
${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
|
|
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
|
.if !defined(NOPORTDOCS)
|
|
${INSTALL} -d ${DOCSDIR}
|
|
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
|
|
.endif
|
|
.if !defined(NOPORTEXAMPLES)
|
|
cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${EXAMPLESDIR}
|
|
.endif
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
.include <bsd.port.post.mk>
|