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

Collapse All | Expand All

(-)unifi5/Makefile (-81 lines)
Lines 1-81 Link Here
1
# Created by: Alban MAIRE <a.maire@s2mi.fr>
2
# $FreeBSD$
3
4
PORTNAME=	unifi5
5
PORTVERSION=	5.14.23
6
PORTREVISION=	0
7
CATEGORIES=	net-mgmt java
8
MASTER_SITES=	http://dl.ubnt.com/unifi/%SUBDIR%/:unifi \
9
		https://repo1.maven.org/maven2/%SUBDIR%/:jax
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
DIST_SUBDIR=	${PORTNAME}-${PORTVERSION}
15
EXTRACT_ONLY=	unifi_sysvinit_all.deb
16
17
MAINTAINER=	feld@FreeBSD.org
18
COMMENT=	UniFi Controller v5
19
20
RUN_DEPENDS=	mongodb36>0:databases/mongodb36 \
21
		snappyjava>0:archivers/snappy-java
22
23
USES=		cpe
24
25
SUB_LIST+=	USERS=${USERS} GROUPS=${GROUPS} JAVASHAREDIR=${JAVASHAREDIR} \
26
		JAVA=${JAVA} JAVA_HOME=${JAVA_HOME}
27
28
EXTRACT_CMD=	/usr/bin/ar
29
EXTRACT_BEFORE_ARGS=	-p
30
EXTRACT_AFTER_ARGS=	data.tar.xz | ${TAR} -xf -
31
32
CPE_VENDOR=	ubnt
33
CPE_PRODUCT=	unifi_controller
34
USE_JAVA=	yes
35
JAVA_VERSION=	1.8+
36
JAVA_OS=	native
37
JAVA_VENDOR=	openjdk bsdjava
38
JAVA_RUN=	yes
39
40
NO_BUILD=	yes
41
NO_ARCH=	yes
42
43
USE_RC_SUBR=	unifi
44
45
USERS=		unifi
46
GROUPS=		unifi
47
48
JAX_DISTNAME=	javax.activation-api
49
JAX_VERSION=	1.2.0
50
51
NO_WRKSUBDIR=	yes
52
53
CONFLICTS=	unifi-devel-*
54
55
DIR_LIST=	conf data logs run work
56
57
post-extract:
58
	${CP} ${DISTDIR}/${DIST_SUBDIR}/${JAX_DISTNAME}-${JAX_VERSION}.jar \
59
		${WRKSRC}/usr/lib/unifi/lib/
60
61
post-patch:
62
	(cd ${WRKSRC}/usr/lib/unifi/lib && ${LN} -f -s ${JAVAJARDIR}/snappy-java.jar snappy-java-*.jar)
63
	${RM} -r ${WRKSRC}/usr/lib/unifi/lib/native
64
65
do-install:
66
	${MKDIR} ${STAGEDIR}${JAVASHAREDIR}/unifi
67
	(cd ${WRKSRC}/usr/lib/unifi && ${COPYTREE_SHARE} \* ${STAGEDIR}${JAVASHAREDIR}/unifi/)
68
	${LN} -sf ${PREFIX}/bin/mongod ${STAGEDIR}${JAVASHAREDIR}/unifi/bin/mongod
69
# Create directories that will be writable by unifi
70
.for i in data logs run work
71
	${MKDIR} ${STAGEDIR}/${JAVASHAREDIR}/unifi/${i}
72
.endfor
73
74
post-install:
75
	@${FIND} -s ${STAGEDIR}${JAVASHAREDIR}/unifi -not -type d | ${SORT} | \
76
		${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST}
77
.for dir in ${DIR_LIST}
78
	@${ECHO} "@dir(unifi,wheel,) ${JAVASHAREDIR}/unifi/${dir}" >> ${TMPPLIST}
79
.endfor
80
81
.include <bsd.port.mk>
(-)unifi5/distinfo (-5 lines)
Lines 1-5 Link Here
1
TIMESTAMP = 1598371113
2
SHA256 (unifi5-5.14.23/unifi_sysvinit_all.deb) = fb12d448828656523978be9f594f2ce3fb35d524bc80d2c150e58f2a7d0159a9
3
SIZE (unifi5-5.14.23/unifi_sysvinit_all.deb) = 170967014
4
SHA256 (unifi5-5.14.23/javax.activation-api-1.2.0.jar) = 43fdef0b5b6ceb31b0424b208b930c74ab58fac2ceeb7b3f6fd3aeb8b5ca4393
5
SIZE (unifi5-5.14.23/javax.activation-api-1.2.0.jar) = 56674
(-)unifi5/files/unifi.in (-86 lines)
Lines 1-86 Link Here
1
#!/bin/sh
2
#
3
# Created by: Mark Felder <feld@FreeBSD.org>
4
# $FreeBSD$
5
#
6
7
# PROVIDE: unifi
8
# REQUIRE: LOGIN
9
# KEYWORD: shutdown
10
11
#
12
# Add the following line to /etc/rc.conf to enable `unifi':
13
#
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
#
38
39
. /etc/rc.subr
40
name=unifi
41
42
rcvar=unifi_enable
43
load_rc_config ${name}
44
45
: ${unifi_enable:=NO}
46
: ${unifi_user:=%%USERS%%}
47
: ${unifi_group:=%%GROUPS%%}
48
: ${unifi_chdir=%%JAVASHAREDIR%%/unifi}
49
: ${unifi_java_home=%%JAVA_HOME%%}
50
: ${unifi_javaflags="-Djava.awt.headless=true -Xmx1024M"}
51
52
pidfile="/var/run/unifi/${name}.pid"
53
procname=${unifi_java_home}/bin/java
54
command=/usr/sbin/daemon
55
command_args="-f -p ${pidfile} ${unifi_java_home}/bin/java ${unifi_javaflags} com.ubnt.ace.Launcher start"
56
start_precmd=start_precmd
57
stop_precmd=stop_precmd
58
stop_postcmd=stop_postcmd
59
60
export CLASSPATH=$(echo ${unifi_chdir}/lib/*.jar | tr ' ' ':')
61
62
start_precmd()
63
{
64
	if [ ! -e /var/run/unifi ] ; then
65
		install -d -o %%USERS%% -g %%GROUPS%% /var/run/unifi;
66
	fi
67
}
68
69
stop_precmd()
70
{
71
	if [ -r ${pidfile} ]; then
72
		_UNIFIPID=$(check_pidfile ${pidfile} ${procname})
73
		export _UNIFI_CHILDREN=$(pgrep -P ${_UNIFIPID})
74
	fi
75
}
76
77
stop_postcmd()
78
{
79
	if ! [ -z ${_UNIFI_CHILDREN} ]; then
80
		echo "Cleaning up leftover child processes."
81
		kill $sig_stop ${_UNIFI_CHILDREN}
82
		wait_for_pids ${_UNIFI_CHILDREN}
83
	fi
84
}
85
86
run_rc_command "$1"
(-)unifi5/pkg-descr (-4 lines)
Lines 1-4 Link Here
1
The UniFi Controller allows you to manage Wireless, Routing & Switching,
2
VoIP and Video of Ubiquiti Networks.
3
4
WWW: http://wiki.ubnt.com/UniFi_FAQ
(-)unifi6/Makefile (-3 / +3 lines)
Lines 1-8 Link Here
1
# Created by: Alban MAIRE <a.maire@s2mi.fr>
1
# Created by: Alban MAIRE <a.maire@s2mi.fr>
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	unifi5
4
PORTNAME=	unifi6
5
PORTVERSION=	5.14.23
5
PORTVERSION=	6.0.20
6
PORTREVISION=	0
6
PORTREVISION=	0
7
CATEGORIES=	net-mgmt java
7
CATEGORIES=	net-mgmt java
8
MASTER_SITES=	http://dl.ubnt.com/unifi/%SUBDIR%/:unifi \
8
MASTER_SITES=	http://dl.ubnt.com/unifi/%SUBDIR%/:unifi \
Lines 15-21 Link Here
15
EXTRACT_ONLY=	unifi_sysvinit_all.deb
15
EXTRACT_ONLY=	unifi_sysvinit_all.deb
16
16
17
MAINTAINER=	feld@FreeBSD.org
17
MAINTAINER=	feld@FreeBSD.org
18
COMMENT=	UniFi Controller v5
18
COMMENT=	UniFi Controller v6
19
19
20
RUN_DEPENDS=	mongodb36>0:databases/mongodb36 \
20
RUN_DEPENDS=	mongodb36>0:databases/mongodb36 \
21
		snappyjava>0:archivers/snappy-java
21
		snappyjava>0:archivers/snappy-java
(-)unifi6/distinfo (-5 / +5 lines)
Lines 1-5 Link Here
1
TIMESTAMP = 1598371113
1
TIMESTAMP = 1600211508
2
SHA256 (unifi5-5.14.23/unifi_sysvinit_all.deb) = fb12d448828656523978be9f594f2ce3fb35d524bc80d2c150e58f2a7d0159a9
2
SHA256 (unifi6-6.0.20/unifi_sysvinit_all.deb) = 5c221397f58bdbba4bb518e7e8bdf4a00e731194d3481d37aa761808cddb8fa3
3
SIZE (unifi5-5.14.23/unifi_sysvinit_all.deb) = 170967014
3
SIZE (unifi6-6.0.20/unifi_sysvinit_all.deb) = 160445426
4
SHA256 (unifi5-5.14.23/javax.activation-api-1.2.0.jar) = 43fdef0b5b6ceb31b0424b208b930c74ab58fac2ceeb7b3f6fd3aeb8b5ca4393
4
SHA256 (unifi6-6.0.20/javax.activation-api-1.2.0.jar) = 43fdef0b5b6ceb31b0424b208b930c74ab58fac2ceeb7b3f6fd3aeb8b5ca4393
5
SIZE (unifi5-5.14.23/javax.activation-api-1.2.0.jar) = 56674
5
SIZE (unifi6-6.0.20/javax.activation-api-1.2.0.jar) = 56674

Return to bug 249353