summaryrefslogtreecommitdiff
path: root/sysutils/bareos-server/Makefile.common
blob: 59adba5749c819ba48cef51a75e80cb31ad37f3c (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
50
51
post-patch:
.if (${PKGNAMESUFFIX} == "-traymonitor-qt5") || (${PKGNAMESUFFIX} == "-traymonitor-qt6")
	@${REINPLACE_CMD} -e 's|-Werror -Wall|-Wall|g' ${PATCH_WRKSRC}/core/CMakeLists.txt
	@${REINPLACE_CMD} -e 's|\@bindir\@|${LOCALBASE}/bin|g' ${WRKSRC}/core/src/qt-tray-monitor/bareos-tray-monitor.desktop.in
	@${REINPLACE_CMD}  '206d' ${WRKSRC}/CMakeLists.txt
.endif

post-extract:
.if (${PKGNAMESUFFIX} == "-traymonitor-qt5") || (${PKGNAMESUFFIX} == "-traymonitor-qt6")
	@${MV} ${WRKSRC}/core/src/defaultconfigs/tray-monitor.d/client/FileDaemon-local.conf.in \
		${WRKSRC}/core/src/defaultconfigs/tray-monitor.d/client/FileDaemon-local.conf
	@${MV} ${WRKSRC}/core/src/defaultconfigs/tray-monitor.d/director/Director-local.conf.in \
		${WRKSRC}/core/src/defaultconfigs/tray-monitor.d/director/Director-local.conf
	@${MV} ${WRKSRC}/core/src/defaultconfigs/tray-monitor.d/monitor/bareos-mon.conf.in \
		${WRKSRC}/core/src/defaultconfigs/tray-monitor.d/monitor/bareos-mon.conf
	@${MV} ${WRKSRC}/core/src/defaultconfigs/tray-monitor.d/storage/StorageDaemon-local.conf.in \
		${WRKSRC}/core/src/defaultconfigs/tray-monitor.d/storage/StorageDaemon-local.conf
.endif

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

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

do-install:
.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-qt5") || (${PKGNAMESUFFIX} == "-traymonitor-qt6")
# Install config files and preserve existing ones
.for d in client director monitor storage
	${INSTALL_SCRIPT} ${WRKSRC}/core/src/defaultconfigs/tray-monitor.d/${d}/*.sample ${STAGEDIR}${ETCDIR}/tray-monitor.d/${d}/
.endfor
	${INSTALL_PROGRAM} ${CONFIGURE_WRKSRC}/core/src/qt-tray-monitor/bareos-tray-monitor ${STAGEDIR}${PREFIX}/bin
	${INSTALL_DATA} ${WRKSRC}/core/src/images/bareos_1.png ${STAGEDIR}${PREFIX}/share/pixmaps/bareos-tray-monitor.png
	${INSTALL_DATA} ${WRKSRC}/core/src/qt-tray-monitor/bareos-tray-monitor.desktop.in ${STAGEDIR}${DESKTOPDIR}/bareos-tray-monitor.desktop
.endif