2013-09-21 01:05:58 +02:00
|
|
|
# Created by: Tomoyuki Sakurai <cherry@trombik.mine.nu>
|
2007-03-06 21:13:56 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= puppet
|
2015-08-08 22:44:11 +02:00
|
|
|
PORTVERSION= 3.8.2
|
2015-08-13 18:22:54 +02:00
|
|
|
PORTREVISION= 1
|
2007-03-06 21:13:56 +01:00
|
|
|
CATEGORIES= sysutils
|
2011-08-13 01:57:19 +02:00
|
|
|
MASTER_SITES= http://downloads.puppetlabs.com/puppet/
|
2007-03-06 21:13:56 +01:00
|
|
|
|
2011-10-31 23:36:25 +01:00
|
|
|
MAINTAINER= swills@FreeBSD.org
|
2014-03-24 16:00:23 +01:00
|
|
|
COMMENT= Configuration management framework written in Ruby
|
2007-03-06 21:13:56 +01:00
|
|
|
|
2013-12-30 21:55:18 +01:00
|
|
|
LICENSE= APACHE20
|
2013-12-18 03:45:40 +01:00
|
|
|
|
2014-07-02 18:34:13 +02:00
|
|
|
BUILD_DEPENDS= rubygem-facter>=0:${PORTSDIR}/sysutils/rubygem-facter \
|
2015-08-13 18:22:54 +02:00
|
|
|
rubygem-hiera1>=0:${PORTSDIR}/sysutils/rubygem-hiera1
|
2013-03-17 21:14:31 +01:00
|
|
|
RUN_DEPENDS= rubygem-facter>=0:${PORTSDIR}/sysutils/rubygem-facter \
|
2015-05-24 02:05:37 +02:00
|
|
|
rubygem-ruby-augeas>=0:${PORTSDIR}/textproc/rubygem-ruby-augeas \
|
2015-08-13 18:22:54 +02:00
|
|
|
rubygem-hiera1>=0:${PORTSDIR}/sysutils/rubygem-hiera1
|
2007-03-06 21:13:56 +01:00
|
|
|
|
2015-04-22 13:03:39 +02:00
|
|
|
USES= cpe
|
|
|
|
CPE_VENDOR= puppetlabs
|
2015-09-25 15:15:46 +02:00
|
|
|
CONFLICTS_INSTALL= puppet37-* puppet4-*
|
2007-03-06 21:13:56 +01:00
|
|
|
NO_BUILD= yes
|
|
|
|
USE_RUBY= yes
|
2011-08-13 01:57:19 +02:00
|
|
|
USE_RUBY_FEATURES= iconv
|
2010-08-04 19:06:24 +02:00
|
|
|
USE_RC_SUBR= puppet puppetmaster
|
2012-10-22 15:39:41 +02:00
|
|
|
PORTDOCS= LICENSE README.md
|
2009-03-31 16:00:15 +02:00
|
|
|
PORTEXAMPLES= *
|
2012-06-03 02:57:59 +02:00
|
|
|
USERS= puppet
|
|
|
|
GROUPS= puppet
|
|
|
|
SUB_FILES+= pkg-message
|
2013-01-06 17:26:53 +01:00
|
|
|
SUB_LIST= RUBY=${RUBY}
|
2009-03-31 16:00:15 +02:00
|
|
|
|
2013-12-18 03:45:40 +01:00
|
|
|
OPTIONS_DEFINE= DOCS EXAMPLES
|
2012-10-14 16:05:53 +02:00
|
|
|
OPTIONS_DEFAULT= PACKAGE_ORIGIN
|
2015-04-11 22:04:12 +02:00
|
|
|
OPTIONS_RADIO= PATCHES
|
|
|
|
OPTIONS_RADIO_PATCHES= PACKAGE_ORIGIN PACKAGE_ROOT
|
2012-10-14 16:05:53 +02:00
|
|
|
PACKAGE_ORIGIN_DESC= Use port origin as package name
|
2014-03-10 10:20:24 +01:00
|
|
|
PACKAGE_ROOT_DESC= Use PACKAGEROOT instead of PACKAGESITE
|
2013-12-18 03:45:40 +01:00
|
|
|
PATCHES_DESC= Optional exclusive patches
|
2010-08-04 19:06:24 +02:00
|
|
|
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
2012-10-14 16:05:53 +02:00
|
|
|
.if ${PORT_OPTIONS:MPACKAGE_ROOT}
|
2012-10-14 16:39:47 +02:00
|
|
|
.if ! ${PORT_OPTIONS:MPACKAGE_ORIGIN}
|
2011-12-05 04:23:43 +01:00
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/optpatch-package_root
|
|
|
|
.else
|
2015-02-21 20:15:58 +01:00
|
|
|
BROKEN= PACKAGE_ROOT option patch is incompatible with PACKAGE_ORIGIN patch.
|
2011-12-05 04:23:43 +01:00
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
2007-03-06 21:13:56 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2013-04-29 03:49:03 +02:00
|
|
|
.if ${PORT_OPTIONS:MPACKAGE_ORIGIN}
|
|
|
|
EXTRA_PATCHES+= ${FILESDIR}/optpatch-package_origin
|
2014-08-29 23:30:38 +02:00
|
|
|
RUN_DEPENDS+= rubygem-bzip2-ruby>=0:${PORTSDIR}/archivers/rubygem-bzip2-ruby
|
2013-04-29 03:49:03 +02:00
|
|
|
.endif
|
|
|
|
|
2007-05-27 13:31:25 +02:00
|
|
|
post-patch:
|
2010-12-12 00:49:52 +01:00
|
|
|
@${REINPLACE_CMD} -e "s|/etc/puppet|${ETCDIR}|" \
|
|
|
|
${WRKSRC}/install.rb \
|
2010-08-04 19:06:24 +02:00
|
|
|
${WRKSRC}/lib/puppet/reference/configuration.rb \
|
|
|
|
${WRKSRC}/lib/puppet/defaults.rb \
|
|
|
|
${WRKSRC}/lib/puppet/util/run_mode.rb
|
2012-06-03 02:57:59 +02:00
|
|
|
@${REINPLACE_CMD} -e "s|/var/lib/puppet|/var/puppet|" \
|
2010-08-04 19:06:24 +02:00
|
|
|
${WRKSRC}/lib/puppet/reference/configuration.rb \
|
|
|
|
${WRKSRC}/lib/puppet/util/run_mode.rb
|
2012-06-03 02:57:59 +02:00
|
|
|
@${REINPLACE_CMD} -e "s|\$$vardir/run|/var/run/puppet|" \
|
2010-08-04 19:06:24 +02:00
|
|
|
${WRKSRC}/lib/puppet/util/run_mode.rb
|
2012-06-15 18:04:33 +02:00
|
|
|
@${REINPLACE_CMD} -e "s|\$$confdir/ssl|/var/puppet/ssl|" \
|
2009-03-31 16:00:15 +02:00
|
|
|
${WRKSRC}/lib/puppet/defaults.rb
|
2013-12-20 19:47:43 +01:00
|
|
|
@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" \
|
2014-01-15 18:01:38 +01:00
|
|
|
${WRKSRC}/ext/rack/config.ru
|
2008-07-24 21:19:49 +02:00
|
|
|
|
2007-03-06 21:13:56 +01:00
|
|
|
do-install:
|
2013-12-18 03:45:40 +01:00
|
|
|
@cd ${WRKSRC} && ${SETENV} PREFIX=${PREFIX} ${RUBY} ${WRKSRC}/install.rb --no-configs --destdir=${STAGEDIR}
|
2007-03-06 21:13:56 +01:00
|
|
|
|
2007-04-13 15:37:08 +02:00
|
|
|
post-install:
|
2015-02-21 20:15:58 +01:00
|
|
|
${MKDIR} ${STAGEDIR}${ETCDIR}/manifests
|
2013-12-18 03:45:40 +01:00
|
|
|
${MKDIR} ${STAGEDIR}${ETCDIR}/modules
|
|
|
|
${MKDIR} ${STAGEDIR}/var/puppet
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/conf/auth.conf ${STAGEDIR}${ETCDIR}/auth.conf-dist
|
2015-02-21 20:15:58 +01:00
|
|
|
${RUBY} -I ${STAGEDIR}/${RUBY_SITELIBDIR} ${STAGEDIR}${PREFIX}/bin/puppet agent --genconfig \
|
2010-12-12 00:49:52 +01:00
|
|
|
--confdir=${ETCDIR} \
|
2013-01-06 17:26:53 +01:00
|
|
|
--rundir=/var/run/puppet \
|
2013-12-18 03:45:40 +01:00
|
|
|
--vardir=/var/puppet \
|
2013-01-06 17:26:53 +01:00
|
|
|
--logdir=/var/log/puppet \
|
2013-12-18 03:45:40 +01:00
|
|
|
> ${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}
|
|
|
|
@${FIND} ${STAGEDIR}${RUBY_SITELIBDIR}/${PORTNAME} -type d | ${SORT} -r | \
|
|
|
|
${SED} 's,^${STAGEDIR}${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
|
2014-06-16 14:07:32 +02:00
|
|
|
@${MKDIR} ${STAGEDIR}${WWWDIR}
|
2014-01-15 18:01:38 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/ext/rack/config.ru ${STAGEDIR}${WWWDIR}
|
2013-12-18 03:45:40 +01:00
|
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
|
|
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
|
|
|
|
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
|
|
|
|
cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
|
2014-01-15 20:00:14 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/ext/rack/example-passenger-vhost.conf ${STAGEDIR}${EXAMPLESDIR}
|
2007-04-13 15:37:08 +02:00
|
|
|
|
2007-03-06 21:13:56 +01:00
|
|
|
.include <bsd.port.post.mk>
|