aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/mcollective/Makefile
blob: 681cd0f85f8cb6cec29eb410b0e192885d639b98 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# New ports collection makefile for:    mcollective
# Date created:     2011-08-09
# Whom:         Russell Jackson <raj@csub.edu>
#
# $FreeBSD$
#

PORTNAME=   mcollective
PORTVERSION=    1.3.1
CATEGORIES= sysutils
MASTER_SITES=   http://downloads.puppetlabs.com/${PORTNAME}/
EXTRACT_SUFX=   .tgz

MAINTAINER= swills@FreeBSD.org
COMMENT=    A modern scalable datacenter orchestration framework

RUN_DEPENDS=    rubygem-stomp>=0:${PORTSDIR}/devel/rubygem-stomp

NO_BUILD=   yes
USE_RUBY=   yes
USE_RC_SUBR=    mcollectived

# don't make .bak files
REINPLACE_ARGS= -i ""

SCRIPTS=    mco \
        mc-call-agent \
        mc-controller \
        mc-facts \
        mc-find-hosts \
        mc-inventory \
        mc-ping \
        mc-rpc

do-patch:
    @${REINPLACE_CMD} -e "s|/etc/mcollective|${ETCDIR}|" \
        ${WRKSRC}/mcollectived.rb \
        ${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}/lib && ${COPYTREE_SHARE} \* ${RUBY_SITELIBDIR})
    ${MKDIR} ${DATADIR}
    @(cd ${WRKSRC}/plugins/mcollective && ${COPYTREE_SHARE} \* ${DATADIR})

.for script in ${SCRIPTS}
    ${INSTALL_SCRIPT} ${WRKSRC}/${script} ${PREFIX}/bin/
.endfor
    ${INSTALL_SCRIPT} ${WRKSRC}/mcollectived.rb ${PREFIX}/sbin/mcollectived

    ${MKDIR} ${ETCDIR}
    ${INSTALL_DATA} ${WRKSRC}/etc/client.cfg.dist ${ETCDIR}
    ${INSTALL_DATA} ${WRKSRC}/etc/server.cfg.dist ${ETCDIR}

.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    (cd ${WRKSRC}/doc && ${COPYTREE_SHARE} \* ${DOCSDIR})
.endif

.include <bsd.port.mk>