freebsd-ports/sysutils/mcollective/Makefile
Muhammad Moinur Rahman 18c6e18276 Mk/**ruby.mk: Switch from USE_RUBY=yes to USES=ruby
Switch from Mk/bsd.ruby.mk to Mk/Uses/ruby.mk

Notable changes are.

- Mk/bsd.ruby.mk is moved to Mk/Uses/ruby.mk.
- USE_RUBY=yes is replaced with USES=ruby.
- USE_RUBY_EXTCONF is replaced with USES=ruby:extconf.
- USE_RUBY_RDOC is replaced with USES=ruby:rdoc.
- USE_RUBY_SETUP is replaces with USES=ruby:setup.
- RUBY_NO_BUILD_DEPENDS and RUBY_NO_RUN_DEPENDS are replaced with
  USES=ruby:{build,none,run}.
- RUBY_REQUIRE isn't used anywhere, so removed.
- USES=gem now implies USES=ruby.

This is mainly the work of yasu@ at https://reviews.freebsd.org/D27863

I have just made some cosmetic changes and ran exp-run to test that the
tree is not in a BROKEN state.

Approved by:	portmgr
Differential Revision:	https://reviews.freebsd.org/D37925
2023-01-14 17:08:33 -06:00

54 lines
1.4 KiB
Makefile

PORTNAME= mcollective
PORTVERSION= 2.12.5
CATEGORIES= sysutils
MASTER_SITES= https://downloads.puppetlabs.com/${PORTNAME}/
MAINTAINER= puppet@FreeBSD.org
COMMENT= Modern scalable datacenter orchestration framework
WWW= http://docs.puppetlabs.com/mcollective/
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/COPYING
BROKEN_RUBY30= yes
BROKEN_RUBY31= yes
RUN_DEPENDS= rubygem-stomp>=0:devel/rubygem-stomp
USES= cpe ruby shebangfix
CPE_VENDOR= puppet
NO_BUILD= yes
USE_RC_SUBR= mcollectived
SHEBANG_FILES= bin/mcollectived bin/mco
CFG_FILES= client.cfg data-help.erb discovery-help.erb facts.yaml \
metadata-help.erb rpc-help.erb server.cfg
# don't make .bak files
REINPLACE_ARGS= -i ""
SCRIPTS= mco
SUB_LIST+= RUBY=${RUBY}
OPTIONS_DEFINE= DOCS
post-patch:
@${REINPLACE_CMD} -e "s|/etc/mcollective|${ETCDIR}|" \
${WRKSRC}/bin/mcollectived \
${WRKSRC}/etc/server.cfg.dist \
${WRKSRC}/etc/client.cfg.dist \
${WRKSRC}/lib/mcollective/config.rb \
${WRKSRC}/lib/mcollective/util.rb \
${WRKSRC}/lib/mcollective/rpc.rb
@${REINPLACE_CMD} -e "s|/usr/libexec/mcollective|${PREFIX}/share|" \
${WRKSRC}/etc/server.cfg.dist \
${WRKSRC}/etc/client.cfg.dist
do-install:
cd ${WRKSRC} ; ${RUBY} install.rb --destdir=${STAGEDIR} --configdir=${ETCDIR} --plugindir=${DATADIR}
.for cfg in ${CFG_FILES}
${MV} ${STAGEDIR}${ETCDIR}/${cfg} ${STAGEDIR}${ETCDIR}/${cfg}.sample
.endfor
.include <bsd.port.mk>