summaryrefslogtreecommitdiff
path: root/www/bareos19-webui/Makefile
blob: e790d3ff8b545169dab60b2605bd660f2b0a83c7 (plain)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66

PORTNAME=       bareos
DISTVERSIONPREFIX=      Release/
DISTVERSION=    19.2.9
PORTREVISION=	3
CATEGORIES?=    www sysutils
PKGNAMESUFFIX=	19-webui

MAINTAINER=	acm@FreeBSD.org
COMMENT=	PHP-Frontend to manage Bareos over the web

LICENSE=	AGPLv3+
LICENSE_FILE=	${WRKSRC}/webui/LICENSE

USE_GITHUB=	yes

USES=		cmake gettext php:build
USE_PHP=	ctype gettext hash iconv json openssl session
NO_BUILD=	yes
NO_ARCH=	yes

CMAKE_SOURCE_PATH=	${WRKSRC}/webui
CMAKE_INSTALL_PREFIX=	${STAGEDIR}
CMAKE_ARGS+=		-DSHARE_INSTALL_PREFIX:PATH=${PREFIX}/www \
			-DCMAKE_INSTALL_FULL_SYSCONFDIR:PATH=${PREFIX}/etc \
			-Dsysconfdir=${PREFIX}/etc \
			-Dwebuiconfdir=${PREFIX}/${ETCDIRWEBUI}

SUB_FILES=		pkg-message
SUB_LIST+=		ETCDIRWEBUI=${PREFIX}/${ETCDIRWEBUI}
PLIST_SUB+=		WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} ETCDIRWEBUI=${ETCDIRWEBUI}
ETCDIRWEBUI=		etc/${PORTNAME}${PKGNAMESUFFIX:S/19//}

OPTIONS_DEFINE=		MYSQL PGSQL
OPTIONS_DEFAULT=	PGSQL

MYSQL_USE=		PHP=pdo_mysql
PGSQL_USE=		PHP=pdo_pgsql

post-extract:
	${FIND} ${WRKSRC}/webui -name .gitignore -delete

pre-install:
	${FIND} ${WRKSRC}/webui -name *.in -delete

do-install:
	@${ECHO} "Installing in ${WWWDIR}"
	@${MKDIR} ${STAGEDIR}${PREFIX}/${ETCDIRWEBUI}
	@${MKDIR} ${STAGEDIR}${ETCDIR}/bareos-dir.d/console
	@${MKDIR} ${STAGEDIR}${ETCDIR}/bareos-dir.d/profile
	@${MKDIR} ${STAGEDIR}${BAREOSWEB_HOME}
	cd ${WRKSRC}/webui && ${COPYTREE_SHARE} "config data module public vendor" \
		${STAGEDIR}${WWWDIR}
	${INSTALL_DATA} ${WRKSRC}/webui/*.php ${STAGEDIR}${WWWDIR}
	${INSTALL_DATA} ${WRKSRC}/webui/composer* ${STAGEDIR}${WWWDIR}
	${INSTALL_DATA} ${WRKSRC}/webui/phpunit.xml ${STAGEDIR}${WWWDIR}
	${INSTALL_DATA} ${WRKSRC}/webui/install/directors.ini ${STAGEDIR}/${PREFIX}/${ETCDIRWEBUI}/directors.ini
	${INSTALL_DATA} ${WRKSRC}/webui/install/configuration.ini ${STAGEDIR}/${PREFIX}/${ETCDIRWEBUI}/configuration.ini
	${INSTALL_DATA} ${WRKSRC}/webui/install/bareos/bareos-dir.d/console/admin.conf.example ${STAGEDIR}${ETCDIR}/bareos-dir.d/console/admin.conf.sample
	${INSTALL_DATA} ${WRKSRC}/webui/install/bareos/bareos-dir.d/profile/webui-admin.conf ${STAGEDIR}${ETCDIR}/bareos-dir.d/profile/webui-admin.conf.sample
	${INSTALL_DATA} ${WRKSRC}/webui/install/bareos/bareos-dir.d/profile/webui-limited.conf.example ${STAGEDIR}${ETCDIR}/bareos-dir.d/profile/webui-limited.conf.sample
	${INSTALL_DATA} ${WRKSRC}/webui/install/bareos/bareos-dir.d/profile/webui-readonly.conf ${STAGEDIR}${ETCDIR}/bareos-dir.d/profile/webui-readonly.conf.sample
	${INSTALL_DATA} ${WRKSRC}/webui/install/apache/bareos-webui.conf ${STAGEDIR}/${PREFIX}/${ETCDIRWEBUI}/apache-bareos-webui.conf
	${INSTALL_DATA} ${WRKSRC}/webui/install/nginx/bareos-webui.conf ${STAGEDIR}/${PREFIX}/${ETCDIRWEBUI}/nginx-bareos-webui.conf

.include <bsd.port.mk>