freebsd-ports/sysutils/bacula-server/Makefile.common
Ruslan Makhmatkhanov 9a5c27ecff - clean up bacula-* ports (Makefile and pkg-message files)
- now bacula-docs just installs pdf files
- add bacula-server/Makefile.common with -bat, -client-static and nagios_check-
  stuff (another bacula slave ports can use it too)
- remove pkg-plist from bacula-bat and nagios-check_bacula
- now bacula-server, bacula-bat and nagios-check_bacula depend of bacula-client.
  It avoids some conflicts when we want to install all bacula ports in the same
  system
- remove the OPTION to install static version of bacula-client. Now it is a new
  port
- few other minor changes

while here:
- trim Makefile headers
- remove indefinite articles in COMMENT
- convert to optionsng

PR:		167700
Submitted by:	acm (original patch), Dan Langille <dan@langille.org> (maintainer)
2012-12-16 16:32:45 +00:00

63 lines
2 KiB
Text

PLIST= ${WRKDIR}/pkg-plist
.if ${PKGNAMESUFFIX} == "-bat"
.if defined(WITH_OPENSSL)
.include "${PORTSDIR}/Mk/bsd.openssl.mk"
CONFIGURE_ARGS+= --with-openssl=${OPENSSLBASE}
.else
CONFIGURE_ARGS+= --with-openssl="no"
.endif
.endif
pre-everything::
.if ${PKGNAMESUFFIX} == "-bat"
@${ECHO_MSG} "===> Building bat the GUI interface for Bacula."
.endif
.if ${PKGNAMEPREFIX} == "nagios-check_"
@${ECHO_MSG} "===> Building nagios check only."
.endif
.if ${PKGNAMESUFFIX} == "-client-static"
@${ECHO_MSG} "===> Building static version of fd."
.endif
post-patch:
# Change $(ECHO) to echo in some Makefile.in files
@${REINPLACE_CMD} -e 's|$$(ECHO)|echo|g' ${WRKSRC}/src/filed/Makefile.in \
${WRKSRC}/src/console/Makefile.in
post-build:
.if ${PKGNAMEPREFIX} == "nagios-check_"
${MAKE} -C ${WRKSRC}/examples/nagios/check_bacula
.endif
pre-install:
@${RM} -f ${PLIST}
.if ${PKGNAMESUFFIX} == "-bat"
@${ECHO_CMD} "etc/bat.conf.sample" >> ${PLIST}
@${ECHO_CMD} "sbin/bat" >> ${PLIST}
.endif
.if ${PKGNAMEPREFIX} == "nagios-check_"
@${ECHO_CMD} "libexec/nagios/check_bacula" >> ${PLIST}
@${ECHO_CMD} "@dirrmtry libexec/nagios" >> ${PLIST}
.endif
.if ${PKGNAMESUFFIX} == "-client-static"
@${ECHO_CMD} "sbin/bacula-fd-static" >> ${PLIST}
@${ECHO_CMD} "sbin/bconsole-static" >> ${PLIST}
.endif
do-install:
.if ${PKGNAMESUFFIX} == "-bat"
# Install config files and preserve existing ones
${INSTALL_SCRIPT} ${WRKSRC}/src/qt-console/bat.conf ${PREFIX}/etc/bat.conf.sample
${INSTALL_MAN} ${WRKSRC}/manpages/bat.1 ${PREFIX}/man/man1/
${INSTALL_PROGRAM} ${WRKSRC}/src/qt-console/bat ${PREFIX}/sbin
.endif
.if ${PKGNAMEPREFIX} == "nagios-check_"
@${MKDIR} ${PREFIX}/libexec/nagios
${INSTALL_PROGRAM} ${WRKSRC}/examples/nagios/check_bacula/check_bacula \
${PREFIX}/libexec/nagios
.endif
.if ${PKGNAMESUFFIX} == "-client-static"
${INSTALL_PROGRAM} ${WRKSRC}/src/filed/static-bacula-fd ${PREFIX}/sbin/bacula-fd-static
${INSTALL_PROGRAM} ${WRKSRC}/src/console/static-bconsole ${PREFIX}/sbin/bconsole-static
.endif