1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

net-mgmt/unifi7: Update to 7.1.61

- Update to 7.1.61
- And while here, also allow for external MongoDB server (suggested
  by Peter Kubica <peter@kubica.ch>)
This commit is contained in:
Juraj Lutter 2022-04-28 22:34:24 +02:00
parent 15f47a7789
commit 32bf8b42ba
3 changed files with 37 additions and 10 deletions

View File

@ -1,5 +1,5 @@
PORTNAME= unifi7
PORTVERSION= 7.0.23
PORTVERSION= 7.1.61
CATEGORIES= net-mgmt java
MASTER_SITES= http://dl.ubnt.com/unifi/%SUBDIR%/:unifi \
https://repo1.maven.org/maven2/%SUBDIR%/:jax
@ -11,10 +11,9 @@ DIST_SUBDIR= ${PORTNAME}-${PORTVERSION}
EXTRACT_ONLY= unifi_sysvinit_all.deb
MAINTAINER= otis@FreeBSD.org
COMMENT= UniFi Controller v6
COMMENT= UniFi Controller v7
RUN_DEPENDS= mongodb36>0:databases/mongodb36 \
snappyjava>0:archivers/snappy-java
RUN_DEPENDS= snappyjava>0:archivers/snappy-java
USES= cpe
@ -46,6 +45,13 @@ NO_WRKSUBDIR= yes
USERS= unifi
GROUPS= unifi
OPTIONS_DEFINE= EXTERNALDB
EXTERNALDB_DESC= Use external MongoDB server
EXTERNALDB_VARS= PKGMESSAGE=${WRKSRC}/pkg-message.extdb \
SUB_FILES+=pkg-message.extdb
EXTERNALDB_VARS_OFF= RUN_DEPENDS+=mongodb36>0:databases/mongodb36
_DIR_LIST= conf data logs run work
_JAX_DISTNAME= javax.activation-api
_JAX_VERSION= 1.2.0
@ -63,12 +69,14 @@ do-install:
${MKDIR} ${STAGEDIR}${JAVASHAREDIR}/unifi
(cd ${WRKSRC}/usr/lib/unifi && \
${COPYTREE_SHARE} \* ${STAGEDIR}${JAVASHAREDIR}/unifi/)
${LN} -sf ${PREFIX}/bin/mongod ${STAGEDIR}${JAVASHAREDIR}/unifi/bin/mongod
# Create directories that will be writable by unifi
.for i in data logs run work
${MKDIR} ${STAGEDIR}/${JAVASHAREDIR}/unifi/${i}
.endfor
do-install-EXTERNALDB-off:
${LN} -sf ${PREFIX}/bin/mongod ${STAGEDIR}${JAVASHAREDIR}/unifi/bin/mongod
post-install:
@${FIND} -s ${STAGEDIR}${JAVASHAREDIR}/unifi -not -type d | \
${SORT} | ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST}

View File

@ -1,5 +1,5 @@
TIMESTAMP = 1646325635
SHA256 (unifi7-7.0.23/unifi_sysvinit_all.deb) = bcf6abe39f1386a7730204675076ad6b2deeaae97f67c977370aaf4797005ff8
SIZE (unifi7-7.0.23/unifi_sysvinit_all.deb) = 136272532
SHA256 (unifi7-7.0.23/javax.activation-api-1.2.0.jar) = 43fdef0b5b6ceb31b0424b208b930c74ab58fac2ceeb7b3f6fd3aeb8b5ca4393
SIZE (unifi7-7.0.23/javax.activation-api-1.2.0.jar) = 56674
TIMESTAMP = 1651177355
SHA256 (unifi7-7.1.61/unifi_sysvinit_all.deb) = ec073c0639412c2b25494e8864ad04b6178acf80ad1fbb5c991f09dab50661bb
SIZE (unifi7-7.1.61/unifi_sysvinit_all.deb) = 176429490
SHA256 (unifi7-7.1.61/javax.activation-api-1.2.0.jar) = 43fdef0b5b6ceb31b0424b208b930c74ab58fac2ceeb7b3f6fd3aeb8b5ca4393
SIZE (unifi7-7.1.61/javax.activation-api-1.2.0.jar) = 56674

View File

@ -0,0 +1,19 @@
[
{ type: install
message: <<EOM
In order to use the external MongoDB server, put the following lines
into %%JAVASHAREDIR%%/unifi/data/system.properties file:
db.mongo.local=false
db.mongo.uri=mongodb://ubnt:password@IP_ADDRESS:PORT/unifi-test
statdb.mongo.uri=mongodb://ubnt:password@IP_ADDRESS:PORT/unifi-test_stat
unifi.db.name=unifi-test
Adjust username, password, IP_ADDRESS, PORT and database name
according to your needs.
For more information see:
https://community.ui.com/questions/External-MongoDB-Server/d311a8f8-43b6-4aeb-859d-eefec9dc1bbc
EOM
}
]