View | Details | Raw Unified | Return to bug 240016 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-5 / +17 lines)
Lines 5-13 Link Here
5
PORTVERSION=	5.10.25
5
PORTVERSION=	5.10.25
6
PORTREVISION=	0
6
PORTREVISION=	0
7
CATEGORIES=	net-mgmt java
7
CATEGORIES=	net-mgmt java
8
MASTER_SITES=	http://dl.ubnt.com/unifi/${PORTVERSION}/
8
MASTER_SITES=	http://dl.ubnt.com/unifi/%SUBDIR%/:unifi \
9
DISTNAME=	unifi_sysvinit_all
9
		https://repo1.maven.org/maven2/%SUBDIR%/:jax
10
EXTRACT_SUFX=	.deb
10
MASTER_SITE_SUBDIR=	${PORTVERSION}/:unifi \
11
			javax/activation/${JAX_DISTNAME}/${JAX_VERSION}/:jax
12
DISTFILES=	unifi_sysvinit_all.deb:unifi \
13
		${JAX_DISTNAME}-${JAX_VERSION}.jar:jax
14
EXTRACT_ONLY=	unifi_sysvinit_all.deb
15
11
DIST_SUBDIR=	${PORTNAME}-${PORTVERSION}
16
DIST_SUBDIR=	${PORTNAME}-${PORTVERSION}
12
17
13
MAINTAINER=	feld@FreeBSD.org
18
MAINTAINER=	feld@FreeBSD.org
Lines 17-23 Link Here
17
		snappyjava>0:archivers/snappy-java
22
		snappyjava>0:archivers/snappy-java
18
23
19
SUB_LIST+=	USERS=${USERS} GROUPS=${GROUPS} JAVASHAREDIR=${JAVASHAREDIR} \
24
SUB_LIST+=	USERS=${USERS} GROUPS=${GROUPS} JAVASHAREDIR=${JAVASHAREDIR} \
20
		JAVA=${JAVA}
25
		JAVA=${JAVA} JAVA_HOME=${JAVA_HOME}
21
26
22
EXTRACT_CMD=	/usr/bin/ar
27
EXTRACT_CMD=	/usr/bin/ar
23
EXTRACT_BEFORE_ARGS=	-p
28
EXTRACT_BEFORE_ARGS=	-p
Lines 27-33 Link Here
27
CPE_VENDOR=	ubnt
32
CPE_VENDOR=	ubnt
28
CPE_PRODUCT=	unifi_controller
33
CPE_PRODUCT=	unifi_controller
29
USE_JAVA=	yes
34
USE_JAVA=	yes
30
JAVA_VERSION=	1.8
35
JAVA_VERSION=	8+
31
JAVA_OS=	native
36
JAVA_OS=	native
32
JAVA_VENDOR=	openjdk bsdjava
37
JAVA_VENDOR=	openjdk bsdjava
33
JAVA_RUN=	yes
38
JAVA_RUN=	yes
Lines 40-45 Link Here
40
USERS=		unifi
45
USERS=		unifi
41
GROUPS=		unifi
46
GROUPS=		unifi
42
47
48
JAX_DISTNAME=	javax.activation-api
49
JAX_VERSION=	1.2.0
50
43
NO_WRKSUBDIR=	yes
51
NO_WRKSUBDIR=	yes
44
52
45
CONFLICTS=	unifi-devel-*
53
CONFLICTS=	unifi-devel-*
Lines 46-51 Link Here
46
54
47
DIR_LIST=	conf data logs run work
55
DIR_LIST=	conf data logs run work
48
56
57
post-extract:
58
	${CP} ${DISTDIR}/${DIST_SUBDIR}/${JAX_DISTNAME}-${JAX_VERSION}.jar \
59
		${WRKSRC}/usr/lib/unifi/lib/
60
49
post-patch:
61
post-patch:
50
	(cd ${WRKSRC}/usr/lib/unifi/lib && ${LN} -f -s ${JAVAJARDIR}/snappy-java.jar snappy-java-*.jar)
62
	(cd ${WRKSRC}/usr/lib/unifi/lib && ${LN} -f -s ${JAVAJARDIR}/snappy-java.jar snappy-java-*.jar)
51
	${RM} -r ${WRKSRC}/usr/lib/unifi/lib/native
63
	${RM} -r ${WRKSRC}/usr/lib/unifi/lib/native
(-)distinfo (-1 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1562161900
1
TIMESTAMP = 1566366032
2
SHA256 (unifi5-5.10.25/unifi_sysvinit_all.deb) = bd39c9f2953736582f9707e120b7ed9cc9e023ce9a727ec6a74627d0f0c903ec
2
SHA256 (unifi5-5.10.25/unifi_sysvinit_all.deb) = bd39c9f2953736582f9707e120b7ed9cc9e023ce9a727ec6a74627d0f0c903ec
3
SIZE (unifi5-5.10.25/unifi_sysvinit_all.deb) = 81225384
3
SIZE (unifi5-5.10.25/unifi_sysvinit_all.deb) = 81225384
4
SHA256 (unifi5-5.10.25/javax.activation-api-1.2.0.jar) = 43fdef0b5b6ceb31b0424b208b930c74ab58fac2ceeb7b3f6fd3aeb8b5ca4393
5
SIZE (unifi5-5.10.25/javax.activation-api-1.2.0.jar) = 56674
(-)files/unifi.in (-2 / +28 lines)
Lines 12-18 Link Here
12
# Add the following line to /etc/rc.conf to enable `unifi':
12
# Add the following line to /etc/rc.conf to enable `unifi':
13
#
13
#
14
# unifi_enable="YES"
14
# unifi_enable="YES"
15
#
16
# Other configuration settings for unifi that can be set in /etc/rc.conf:
17
#
18
# unifi_user (str)
19
#   This is the user that unifi runs as
20
#   Set to %%USERS%% by default
21
#
22
# unifi_group (str)
23
#   This is the group that unifi runs as
24
#   Set to %%GROUPS%% by default
25
#
26
# unifi_chdir (str)
27
#   This is the directory that unifi chdirs into before starting
28
#   Set to %%JAVASHAREDIR%%/unifi by default
29
#
30
# unifi_java_home (str)
31
#   The path to the base directory for the Java to use to run unifi
32
#   Defaults to %%JAVA_HOME%%
33
#
34
# unifi_javaflags (str)
35
#   Flags passed to Java to run unifi
36
#   Set to "-Djava.awt.headless=true -Xmx1024M" by default
37
#
15
38
39
16
. /etc/rc.subr
40
. /etc/rc.subr
17
name=unifi
41
name=unifi
18
42
Lines 23-34 Link Here
23
: ${unifi_user:=%%USERS%%}
47
: ${unifi_user:=%%USERS%%}
24
: ${unifi_group:=%%GROUPS%%}
48
: ${unifi_group:=%%GROUPS%%}
25
: ${unifi_chdir=%%JAVASHAREDIR%%/unifi}
49
: ${unifi_chdir=%%JAVASHAREDIR%%/unifi}
50
: ${unifi_java_home=%%JAVA_HOME%%}
26
: ${unifi_javaflags:="-Djava.awt.headless=true -Xmx1024M"}
51
: ${unifi_javaflags:="-Djava.awt.headless=true -Xmx1024M"}
27
52
28
pidfile="/var/run/unifi/${name}.pid"
53
pidfile="/var/run/unifi/${name}.pid"
29
procname=%%JAVA%%
54
procname=${unifi_java_home}/bin/java
30
command="/usr/sbin/daemon"
55
command="/usr/sbin/daemon"
31
command_args="-f -p ${pidfile} %%JAVA%% ${unifi_javaflags} -jar lib/ace.jar start"
56
classpath=`echo ${unifi_chdir}/lib/*.jar | sed -e 's/ /:/g'`
57
command_args="-f -p ${pidfile} ${unifi_java_home}/bin/java ${unifi_javaflags} -cp ${classpath} com.ubnt.ace.Launcher start"
32
start_precmd=start_precmd
58
start_precmd=start_precmd
33
stop_precmd=stop_precmd
59
stop_precmd=stop_precmd
34
stop_postcmd=stop_postcmd
60
stop_postcmd=stop_postcmd

Return to bug 240016