Added
Link Here
|
1 |
# Created by: Juraj Lutter <juraj@lutter.sk> |
2 |
# $FreeBSD$ |
3 |
|
4 |
PORTNAME= unifi6 |
5 |
PORTVERSION= 6.0.23 |
6 |
CATEGORIES= net-mgmt java |
7 |
MASTER_SITES= http://dl.ubnt.com/unifi/%SUBDIR%/:unifi \ |
8 |
https://repo1.maven.org/maven2/%SUBDIR%/:jax |
9 |
MASTER_SITE_SUBDIR= ${PORTVERSION}/:unifi \ |
10 |
javax/activation/${JAX_DISTNAME}/${JAX_VERSION}/:jax |
11 |
DISTFILES= unifi_sysvinit_all.deb:unifi \ |
12 |
${JAX_DISTNAME}-${JAX_VERSION}.jar:jax |
13 |
DIST_SUBDIR= ${PORTNAME}-${PORTVERSION} |
14 |
EXTRACT_ONLY= unifi_sysvinit_all.deb |
15 |
|
16 |
MAINTAINER= juraj@lutter.sk |
17 |
COMMENT= UniFi Controller v6 |
18 |
|
19 |
RUN_DEPENDS= mongodb36>0:databases/mongodb36 \ |
20 |
snappyjava>0:archivers/snappy-java |
21 |
|
22 |
USES= cpe |
23 |
|
24 |
SUB_LIST+= GROUPS=${GROUPS} \ |
25 |
JAVA=${JAVA} \ |
26 |
JAVA_HOME=${JAVA_HOME} \ |
27 |
JAVASHAREDIR=${JAVASHAREDIR} \ |
28 |
USERS=${USERS} |
29 |
|
30 |
EXTRACT_CMD= /usr/bin/ar |
31 |
EXTRACT_BEFORE_ARGS= -p |
32 |
EXTRACT_AFTER_ARGS= data.tar.xz | ${TAR} -xf - |
33 |
|
34 |
CPE_VENDOR= ubnt |
35 |
CPE_PRODUCT= unifi_controller |
36 |
USE_JAVA= yes |
37 |
JAVA_VERSION= 1.8+ |
38 |
JAVA_OS= native |
39 |
JAVA_VENDOR= openjdk bsdjava |
40 |
JAVA_RUN= yes |
41 |
|
42 |
NO_BUILD= yes |
43 |
NO_ARCH= yes |
44 |
|
45 |
USE_RC_SUBR= unifi |
46 |
|
47 |
USERS= unifi |
48 |
GROUPS= unifi |
49 |
|
50 |
JAX_DISTNAME= javax.activation-api |
51 |
JAX_VERSION= 1.2.0 |
52 |
|
53 |
NO_WRKSUBDIR= yes |
54 |
|
55 |
CONFLICTS= unifi-devel-* |
56 |
CONFLICTS+= unifi-lts-* |
57 |
CONFLICTS+= unifi5-* |
58 |
|
59 |
DIR_LIST= conf data logs run work |
60 |
|
61 |
post-extract: |
62 |
${CP} ${DISTDIR}/${DIST_SUBDIR}/${JAX_DISTNAME}-${JAX_VERSION}.jar \ |
63 |
${WRKSRC}/usr/lib/unifi/lib/ |
64 |
|
65 |
post-patch: |
66 |
(cd ${WRKSRC}/usr/lib/unifi/lib && \ |
67 |
${LN} -f -s ${JAVAJARDIR}/snappy-java.jar snappy-java-*.jar) |
68 |
${RM} -r ${WRKSRC}/usr/lib/unifi/lib/native |
69 |
|
70 |
do-install: |
71 |
${MKDIR} ${STAGEDIR}${JAVASHAREDIR}/unifi |
72 |
(cd ${WRKSRC}/usr/lib/unifi && \ |
73 |
${COPYTREE_SHARE} \* ${STAGEDIR}${JAVASHAREDIR}/unifi/) |
74 |
${LN} -sf ${PREFIX}/bin/mongod ${STAGEDIR}${JAVASHAREDIR}/unifi/bin/mongod |
75 |
# Create directories that will be writable by unifi |
76 |
.for i in data logs run work |
77 |
${MKDIR} ${STAGEDIR}/${JAVASHAREDIR}/unifi/${i} |
78 |
.endfor |
79 |
|
80 |
post-install: |
81 |
@${FIND} -s ${STAGEDIR}${JAVASHAREDIR}/unifi -not -type d | \ |
82 |
${SORT} | ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST} |
83 |
.for dir in ${DIR_LIST} |
84 |
@${ECHO} "@dir(unifi,wheel,) ${JAVASHAREDIR}/unifi/${dir}" >> \ |
85 |
${TMPPLIST} |
86 |
.endfor |
87 |
|
88 |
.include <bsd.port.mk> |