aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/bareos-server/Makefile.common
blob: 6963cd9378835717f3c47c8c2c3c4c296490a80a (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
# Created by: Alonso Cardenas <acm@FreeBSD.org>
# $FreeBSD$

post-patch:
    @${REINPLACE_CMD} -e 's|_NONSHARED||g' ${WRKSRC}/src/filed/Makefile.in
    @${REINPLACE_CMD} -e 's|-lbareoscfg|@JANSSON_LIBS@ @LIBINTL@ -lbareoscfg|g' ${WRKSRC}/src/qt-tray-monitor/tray-monitor.pro.in

post-build:
.if ${PKGNAMEPREFIX} == "nagios-check_"
    ${MAKE_CMD} -C ${WRKSRC}/examples/nagios/check_bareos
.endif

pre-install:
.if ${PKGNAMESUFFIX} == "-traymonitor"
.   for d in client director monitor storage
        ${MKDIR} ${STAGEDIR}${ETCDIR}/tray-monitor.d/${d}
        ${FIND} ${WRKSRC}/src/defaultconfigs/tray-monitor.d/${d} -type f -name '*.conf' -exec ${MV} -v {} {}.sample \;
.   endfor
.endif

do-install:
.if ${PKGNAMESUFFIX} == "-bat"
# Install config files and preserve existing ones
    ${MKDIR} ${STAGEDIR}${ETCDIR}
    ${INSTALL_SCRIPT}  ${WRKSRC}/src/qt-console/bat.conf ${STAGEDIR}${PREFIX}/etc/bareos/bat.conf.sample
    ${INSTALL_MAN}     ${WRKSRC}/manpages/bat.1          ${STAGEDIR}${PREFIX}/man/man1/
    ${INSTALL_PROGRAM} ${WRKSRC}/src/qt-console/bat ${STAGEDIR}${PREFIX}/bin
    ${INSTALL_DATA} ${WRKSRC}/src/images/bat.png ${STAGEDIR}${PREFIX}/share/pixmaps
    ${INSTALL_DATA} ${WRKSRC}/src/images/bat.svg ${STAGEDIR}${PREFIX}/share/pixmaps
    ${INSTALL_DATA} ${WRKSRC}/src/qt-console/bat.desktop ${STAGEDIR}${DESKTOPDIR}
.endif
.if ${PKGNAMEPREFIX} == "nagios-check_"
    @${MKDIR} ${STAGEDIR}${PREFIX}/libexec/nagios
    ${INSTALL_PROGRAM} ${WRKSRC}/examples/nagios/check_bareos/check_bareos \
    ${STAGEDIR}${PREFIX}/libexec/nagios
.endif
.if ${PKGNAMESUFFIX} == "-client-static"
    ${INSTALL_PROGRAM} ${WRKSRC}/src/filed/static-bareos-fd ${STAGEDIR}${PREFIX}/sbin/bareos-fd-static
    ${INSTALL_PROGRAM} ${WRKSRC}/src/console/static-bconsole ${STAGEDIR}${PREFIX}/sbin/bconsole-static
.endif
.if ${PKGNAMESUFFIX} == "-traymonitor"
# Install config files and preserve existing ones
.for d in client director monitor storage
    ${INSTALL_SCRIPT} ${WRKSRC}/src/defaultconfigs/tray-monitor.d/${d}/*.sample ${STAGEDIR}${ETCDIR}/tray-monitor.d/${d}/
.endfor
    ${INSTALL_PROGRAM} ${WRKSRC}/src/qt-tray-monitor/bareos-tray-monitor ${STAGEDIR}${PREFIX}/bin
    ${INSTALL_DATA} ${WRKSRC}/src/qt-tray-monitor/bareos-tray-monitor.xpm ${STAGEDIR}${PREFIX}/share/pixmaps
    ${INSTALL_DATA} ${WRKSRC}/src/qt-tray-monitor/bareos-tray-monitor.desktop ${STAGEDIR}${DESKTOPDIR}
.endif