summaryrefslogtreecommitdiffstats
path: root/www/guacamole-client/Makefile
blob: e7ffad3f1decbad7704db0d1db09b7821ff863b6 (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
72
# Created by: Ultima <ultima1252@gmail.com>
# $FreeBSD$

PORTNAME=	guacamole-client
PORTVERSION=	0.9.9
CATEGORIES=	www java
MASTER_SITES+=	https://sourceforge.net/projects/distfiles/files/${PORTNAME}/:repo \
		http://sourceforge.net/projects/distfiles/files/${PORTNAME}/:repo
DISTNAME=	${PORTVERSION}
DISTFILES=	${PORTVERSION}_GH${EXTRACT_SUFX} \
		repository-${PORTVERSION}${EXTRACT_SUFX}:repo
DIST_SUBDIR=	${PORTNAME}

MAINTAINER=	ultima1252@gmail.com
COMMENT=	HTML5 Clientless Remote Desktop

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE

BUILD_DEPENDS=	${LOCALBASE}/share/java/maven33/bin/mvn:devel/maven33

USE_GITHUB=	yes
GH_ACCOUNT=	glyptodon

MVN=		mvn
MVN_ARGS=	package -Duser.home=${WRKDIR}
USE_JAVA=	yes
JAVA_VERSION=	1.8+

OPTIONS_DEFINE=		MK_LINK SERVER TOMCAT
OPTIONS_DEFAULT=	MK_LINK SERVER TOMCAT
OPTIONS_SUB=		yes
MK_LINK_DESC=		Make sybolic links
TOMCAT_RUN_DEPENDS=	${LOCALBASE}/apache-tomcat-8.0/bin/bootstrap.jar:www/tomcat8
TOMCAT_DESC=		Use Tomcat as your servlet

SERVER_RUN_DEPENDS=	guacd:net/guacamole-server
SERVER_DESC=		Include Guacamole Server

GUACAMOLE_CONF=	${PREFIX}/etc/guacamole
GUACAMOLE_DATA=	${PREFIX}/share/${PORTNAME}

.include <bsd.port.pre.mk>

do-build:
		cd ${WRKSRC} && ${MVN} ${MVN_ARGS}

do-install:
		@${MKDIR} ${STAGEDIR}${GUACAMOLE_DATA}
		@${MKDIR} ${STAGEDIR}${GUACAMOLE_CONF}

		@${CP} ${WRKSRC}/guacamole/target/guacamole-${PORTVERSION}.war \
			${STAGEDIR}${GUACAMOLE_DATA}/guacamole.war
		@${CP} ${WRKSRC}/extensions/guacamole-auth-jdbc/target/guacamole-auth-jdbc-${PORTVERSION}.tar.gz \
			${STAGEDIR}/${GUACAMOLE_DATA}/guacamole-auth-jdbc.tar.gz
		@${CP} ${WRKSRC}/extensions/guacamole-auth-ldap/target/guacamole-auth-ldap-${PORTVERSION}.tar.gz \
			 ${STAGEDIR}/${GUACAMOLE_DATA}/guacamole-auth-ldap.tar.gz
		@${CP} ${WRKSRC}/extensions/guacamole-auth-noauth/target/guacamole-auth-noauth-${PORTVERSION}.tar.gz \
			 ${STAGEDIR}/${GUACAMOLE_DATA}/guacamole-auth-noauth.tar.gz

.if ${PORT_OPTIONS:MMK_LINK}
		@${MKDIR} ${STAGEDIR}/root
		@${MKDIR} ${STAGEDIR}${PREFIX}/apache-tomcat-8.0/webapps
		@${LN} -s ${GUACAMOLE_CONF} ${STAGEDIR}/root/.guacamole
		@${LN} -s ${GUACAMOLE_DATA}/guacamole.war \
			${STAGEDIR}${PREFIX}/apache-tomcat-8.0/webapps/
.endif
		@${CP} ${FILESDIR}/user-mapping.xml.sample ${STAGEDIR}${GUACAMOLE_CONF}/
		@${CP} ${FILESDIR}/logback.xml.sample ${STAGEDIR}${GUACAMOLE_CONF}/
		@${CP} ${FILESDIR}/guacamole.properties.sample ${STAGEDIR}${GUACAMOLE_CONF}/

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