summaryrefslogtreecommitdiffstats
path: root/www/bareos-webui/Makefile
blob: 87c01f4dc06037d8c319227bd4fb090e8283806f (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
67
68
69
70
71
# Created by: Alonso Cardenas <acm@FreeBSD.org>
# $FreeBSD$

PORTNAME=	bareos-webui
DISTVERSION=	14.2.1
PORTREVISION=	0
CATEGORIES=	www sysutils

USE_GITHUB=	yes
GH_ACCOUNT=	bareos
GH_PROJECT=	bareos-webui
GH_TAGNAME=	c826a4cbd4ff7340fb9b020ca824c9c48bd52948

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

LICENSE=	AGPLv3 # or later
LICENSE_FILE=	${WRKSRC}/LICENSE

USES=		tar:tgz
USE_PHP=	openssl
NO_BUILD=	yes
NO_ARCH=	yes
NO_WRKSUBDIR=	yes

BAREOSWEB_HOME?=${WWWDIR}
BAREOSWEBUIDIR=	${BAREOSWEB_HOME:S|${PREFIX}/||}
SUB_FILES=	pkg-message
PLIST_SUB=	WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} BAREOSWEBUIDIR=${BAREOSWEBUIDIR}
SUB_LIST=	BAREOSWEBUIDIR=${BAREOSWEBUIDIR}

OPTIONS_DEFINE=		MYSQL PGSQL ZENDFRAMEWORK
OPTIONS_DEFAULT=	PGSQL
ZENDFRAMEWORK_DESC=	Install zend framework

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MMYSQL}
USE_PHP+=	pdo_mysql
.endif

.if ${PORT_OPTIONS:MPGSQL}
USE_PHP+=	pdo_pgsql
.endif

.if ${PORT_OPTIONS:MZENDFRAMEWORK}
RUN_DEPENDS=	${LOCALBASE}/share/ZendFramework/bin/classmap_generator.php:${PORTSDIR}/www/zend-framework
.endif

post-extract:
	${RM} ${WRKSRC}/config/autoload/.gitignore
	${RM} ${WRKSRC}/data/cache/.gitignore
	${RM} ${WRKSRC}/vendor/.gitignore

post-patch:
	@${REINPLACE_CMD} -e 's|/etc/|${LOCALBASE}/etc/|g' ${WRKSRC}/config/autoload/global.php

do-install:
	@${ECHO} "Installing in ${BAREOSWEB_HOME}"
	${MKDIR} ${STAGEDIR}${ETCDIR}
	${MKDIR} ${STAGEDIR}${BAREOSWEB_HOME}
	cd ${WRKSRC} && ${COPYTREE_SHARE} "config data module public vendor" \
		${STAGEDIR}${BAREOSWEB_HOME}
	${INSTALL_DATA} ${WRKSRC}/*.php ${STAGEDIR}${BAREOSWEB_HOME}
	${INSTALL_DATA} ${WRKSRC}/composer* ${STAGEDIR}${BAREOSWEB_HOME}
	${INSTALL_DATA} ${WRKSRC}/phpunit.xml ${STAGEDIR}${BAREOSWEB_HOME}
	${INSTALL_DATA} ${WRKSRC}/install/directors.ini ${STAGEDIR}${ETCDIR}
	${INSTALL_DATA} ${WRKSRC}/install/bareos/bareos-webui.conf ${STAGEDIR}${ETCDIR}
	${INSTALL_DATA} ${WRKSRC}/install/apache/bareos-webui.conf ${STAGEDIR}${ETCDIR}/apache-bareos-webui.conf

.include <bsd.port.mk>
OpenPOWER on IntegriCloud