summaryrefslogtreecommitdiffstats
path: root/net-mgmt/pandorafms_agent/Makefile
blob: 3645f1bb2ba3e66e4b0cbffa76c49ded20d915dc (plain)
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
# Created by: KIKUCHI Koichiro <koichiro@rworks.jp>
# $FreeBSD$

PORTNAME=	pandora_agent
CATEGORIES=	net-mgmt

MAINTAINER=	koichiro@rworks.jp
COMMENT=	Pandora FMS agent, Perl version

LICENSE=	${PANDORA_LICENSE}
LICENSE_FILE=	${PANDORA_LICENSE_FILE}

OPTIONS_DEFINE=		DOCS TENTACLE_SERVER
OPTIONS_DEFAULT=	TENTACLE_SERVER
TENTACLE_SERVER_DESC=	Install tentalce_server

USES=		perl5 shebangfix
SHEBANG_FILES=	plugins/pandora_netusage

SUB_FILES=	pkg-message

.include "${.CURDIR}/../pandorafms_server/bsd.pandora.mk"

PORTDOCS+=	README
PANDORA_INSTALLER_ARGS+=	--fakeroot

.include <bsd.port.pre.mk>

.if ${PORT_OPTIONS:MTENTACLE_SERVER}
CONFLICTS=	pandora_server-[45]*
PLIST_SUB+=	TENTACLE_SERVER=""
.else
PLIST_SUB+=	TENTACLE_SERVER="@comment "
PANDORA_INSTALLER_ARGS+=	--no-tentacle-server
.endif

PANDORA_INSTALLER_ARGS+=	${STAGEDIR} root ${PERL}

post-patch:
	@${REINPLACE_CMD} -e '\|PREFIX=|s|=[^;]*|=${PREFIX}|' ${WRKSRC}/pandora_agent_installer

post-install:
	@${RM} ${STAGEDIR}${LOGDIR}/pandora_agent.log
	@${RM} ${STAGEDIR}${DATADIR}/collections/.empty
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for x in ${PORTDOCS}
	${INSTALL_DATA} ${WRKSRC}/${x} ${STAGEDIR}${DOCSDIR}
.endfor
	@${MV} ${STAGEDIR}${ETCDIR}/pandora_agent.conf ${STAGEDIR}${ETCDIR}/pandora_agent.conf.sample

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud