aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/nagios-check_bacula
diff options
context:
space:
mode:
authorWesley Shields <wxs@FreeBSD.org>2010-07-17 01:00:47 +0000
committerWesley Shields <wxs@FreeBSD.org>2010-07-17 01:00:47 +0000
commit79500e568bbb144013ced434c2bb56382be10035 (patch)
tree20f425639f79404a852d8f8f997c203ebda5d2df /net-mgmt/nagios-check_bacula
parent5acb272f54efddc2d68de2d0075bc7d4547fe089 (diff)
downloadports-79500e568bbb144013ced434c2bb56382be10035.tar.gz
ports-79500e568bbb144013ced434c2bb56382be10035.zip
Notes
Diffstat (limited to 'net-mgmt/nagios-check_bacula')
-rw-r--r--net-mgmt/nagios-check_bacula/Makefile40
-rw-r--r--net-mgmt/nagios-check_bacula/pkg-plist2
2 files changed, 29 insertions, 13 deletions
diff --git a/net-mgmt/nagios-check_bacula/Makefile b/net-mgmt/nagios-check_bacula/Makefile
index c687105b74c2..08aaf4aea22c 100644
--- a/net-mgmt/nagios-check_bacula/Makefile
+++ b/net-mgmt/nagios-check_bacula/Makefile
@@ -5,34 +5,50 @@
# $FreeBSD$
#
-PORTNAME= check_bacula
-PORTVERSION= 5.0.0
+PORTNAME= bacula
+PKGNAMEPREFIX= nagios-check_
CATEGORIES= net-mgmt
-MASTER_SITES= SF/bacula/bacula/${PORTVERSION}
-PKGNAMEPREFIX= nagios-
-DISTNAME= bacula-${PORTVERSION}
+UNIQUENAME= ${PKGNAMEPREFIX}${PORTNAME}
MAINTAINER= freebsd@troback.com
COMMENT= Nagios plugin for Bacula
-WRKSRC= ${WRKDIR}/bacula-${PORTVERSION}
+WITH_NAGIOS_CHECK_ONLY= yes
+MASTERDIR= ${.CURDIR}/../../sysutils/bacula-server
+PLIST= ${.CURDIR}/pkg-plist
+
CONFIGURE_ARGS= --enable-client-only \
--disable-build-dird \
--disable-build-stored \
- --disable-nls
-GNU_CONFIGURE= yes
-USE_LDCONFIG= yes
+ --disable-nls \
+ --disable-xatt
+
+.include "${MASTERDIR}/Makefile"
.include <bsd.port.pre.mk>
+.if exists(${LOCALBASE}/lib/libbac.so.${PORTVERSION:R:R})
+LIB_DEPENDS+= bac.${PORTVERSION:R:R}:${PORTSDIR}/sysutils/bacula-client
+WITHOUT_LIBBAC= YES
+PLIST_SUB+= INDEP="@comment "
+.else
+PLIST_SUB+= INDEP=""
+.endif
+
+pre-everything::
+ @${ECHO_MSG} "===> Building nagios check only."
+
post-build:
${MAKE} -C ${WRKSRC}/examples/nagios/check_bacula
do-install:
@${MKDIR} ${PREFIX}/libexec/nagios
${INSTALL_PROGRAM} ${WRKSRC}/examples/nagios/check_bacula/.libs/check_bacula \
- ${PREFIX}/libexec/nagios/
- ${INSTALL_PROGRAM} ${WRKSRC}/src/lib/.libs/libbac.so.1 \
- ${PREFIX}/lib
+ ${PREFIX}/libexec/nagios
+.if !defined(WITHOUT_LIBBAC)
+ @${ECHO_MSG} "===> Installing libbac.so.${PORTVERSION:R:R} "
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/lib/.libs/libbac.so.${PORTVERSION:R:R} \
+ ${PREFIX}/lib
+.endif
.include <bsd.port.post.mk>
diff --git a/net-mgmt/nagios-check_bacula/pkg-plist b/net-mgmt/nagios-check_bacula/pkg-plist
index 3baf04a7bb8d..a98ab876f0c5 100644
--- a/net-mgmt/nagios-check_bacula/pkg-plist
+++ b/net-mgmt/nagios-check_bacula/pkg-plist
@@ -1,3 +1,3 @@
libexec/nagios/check_bacula
-lib/libbac.so.1
+%%INDEP%%lib/libbac.so.%%MAJOR%%
@dirrmtry libexec/nagios