aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/pandorafms_agent/Makefile
diff options
context:
space:
mode:
authorMotoyuki Konno <motoyuki@FreeBSD.org>2012-04-21 12:27:40 +0000
committerMotoyuki Konno <motoyuki@FreeBSD.org>2012-04-21 12:27:40 +0000
commitc679424d1752dd4aa64d1f82b2e88214fc7364d1 (patch)
tree44b1b2129b0416abbaaba16b0b253378bbd9e8f2 /net-mgmt/pandorafms_agent/Makefile
parent9a915cc5a2b7476fb468a56d7b254ddcab299118 (diff)
downloadports-c679424d1752dd4aa64d1f82b2e88214fc7364d1.tar.gz
ports-c679424d1752dd4aa64d1f82b2e88214fc7364d1.zip
Add Pandora FMS 4.0.1 - a Flexible Monitoring System.
WMI client 1.3.16 - a WMI (Windows Management Instrumentation) client which is needed for Pandora FMS. Submitted by: KIKUCHI Koichiro <koichiro@rworks.jp> Junichi Satoh <junichi@junichi.org> WWW; http://pandorafms.org/ Feature safe: yes
Notes
Notes: svn path=/head/; revision=295185
Diffstat (limited to 'net-mgmt/pandorafms_agent/Makefile')
-rw-r--r--net-mgmt/pandorafms_agent/Makefile90
1 files changed, 90 insertions, 0 deletions
diff --git a/net-mgmt/pandorafms_agent/Makefile b/net-mgmt/pandorafms_agent/Makefile
new file mode 100644
index 000000000000..54fb48795987
--- /dev/null
+++ b/net-mgmt/pandorafms_agent/Makefile
@@ -0,0 +1,90 @@
+# New ports collection makefile for: pandorafms_agent
+# Date created: 2011-11-22
+# Whom: KIKUCHI Koichiro <koichiro@rworks.jp>
+#
+# $FreeBSD$
+#
+
+PORTNAME= pandora_agent
+PORTVERSION= ${PANDORA_VERSION}
+CATEGORIES= net-mgmt
+
+MAINTAINER= koichiro@rworks.jp
+COMMENT= Pandora FMS agent, Perl version
+
+LICENSE= ${PANDORA_LICENSE}
+LICENSE_FILE= ${PANDORA_LICENSE_FILE}
+
+OPTIONS= TENTACLE_SERVER "Install tentalce_server" on
+
+USE_PERL5= 5.8+
+SUB_LIST+= PERL="${PERL}"
+
+MAN1= pandora_agent.1 tentacle_client.1
+MANCOMPRESSED= yes
+
+SUB_FILES= pkg-message
+USE_RC_SUBR= ${PORTNAME}
+
+.include "${.CURDIR}/../pandorafms_server/bsd.pandora.mk"
+
+PORTDOCS+= README
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_TENTACLE_SERVER)
+CONFLICTS= pandora_server-4*
+PLIST_SUB+= TENTACLE_SERVER=""
+.else
+PLIST_SUB+= TENTACLE_SERVER="@comment "
+.endif
+
+post-patch:
+.if !defined(WITH_TENTACLE_SERVER)
+ @${REINPLACE_CMD} \
+ -e '/TENTACLE_SERVER/s/^/#/' \
+ ${WRKSRC}/pandora_agent_installer
+.endif
+.if defined(NO_INSTALL_MANPAGES)
+ @${REINPLACE_CMD} \
+ -e '/PANDORA_MAN/s/^/#/' \
+ ${WRKSRC}/pandora_agent_installer
+.endif
+ @${REINPLACE_CMD} -E \
+ -e 's|%%PREFIX%%|${PREFIX}|g' \
+ -e 's|%%DATADIR%%|${DATADIR}|g' \
+ -e 's|%%MAN1PREFIX%%|${MAN1PREFIX}|g' \
+ -e 's|%%PANDORA_ETCDIR%%|${PANDORA_ETCDIR}|g' \
+ -e 's|%%PANDORA_HOMEDIR%%|${PANDORA_HOMEDIR}|g' \
+ ${WRKSRC}/pandora_agent_installer
+ @${REINPLACE_CMD} -i "" \
+ -e 's,/bin/bash,/bin/sh,' \
+ -e 's,md5sum,md5 -r,' \
+ ${WRKSRC}/plugins/files_indir
+ @${REINPLACE_CMD} -i "" \
+ -e 's,/usr/bin/perl,${PERL},g' \
+ `${GREP} -lr /usr/bin/perl ${WRKSRC} | ${GREP} -v pandora_agent_installer`
+ @${REINPLACE_CMD} -i "" \
+ -e 's,/usr/local,${PREFIX},g' \
+ ${WRKSRC}/plugins/pandora_update
+ @${REINPLACE_CMD} \
+ -e 's,`ifconfig ,`/sbin/ifconfig ,g' \
+ -e 's,tentacle_client ,${PREFIX}/bin/tentacle_client ,g' \
+ ${WRKSRC}/pandora_agent
+
+do-install:
+ @cd ${WRKSRC} && ${SH} pandora_agent_installer --force-install
+
+post-install:
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+.for x in ${PORTDOCS}
+ @${INSTALL_DATA} ${WRKSRC}/${x} ${DOCSDIR}
+.endfor
+.endif
+ @if [ ! -e ${ETCDIR}/pandora_agent.conf ]; then \
+ cd ${ETCDIR} && ${CP} -p pandora_agent.conf.sample pandora_agent.conf; \
+ fi
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>