pkgsrc/net/unifi/Makefile
gdt a801b31f14 net/unifi: Update to 5.11.50
Updating note: This is major update from 5.10.x, and for me, it wanted
to restore from an internal backup.  So as is always good advice, back
up everything before you start in case.  And for this, if you can do
an in-app backup just before, that may reduce lossage of historical
data.

Release Notes for 5.11.46 (upstream does not reliably publish findable
release notes).

    Java 8 must be installed on the system hosting the controller
    software. Java 9 and later are not yet supported.

    Minimum supported device firmware for UAP/USW is 4.0.9, and for
    USG it’s 4.4.34 – multi-tenanted instances will be force-upgraded
    (for the greater good), single-tenanted instances can opt to defer
    the controller upgrade for up to 90 days.

    If you have any ‘service dns forwarding options’ configuration
    defined in config.gateway.json, it will overwrite the provisioning
    of statically defined name servers, leaving you with no
    DNS. Either remove the ‘service dns forwarding options’ portion of
    config.gateway.json, or add additional ‘options’ lines defining
    name servers, such as ‘server=1.1.1.1’, ‘server=8.8.8.8’, etc.

    PoE passthrough control was implemented for UAP-IW-HD which means
    that the default for PoE passthrough is now disabled instead of
    enabled. If you were using this feature before then you will need
    to re-enable it via the device property panel.

    (Many bugfixes.)
2019-10-25 14:48:02 +00:00

91 lines
3.1 KiB
Makefile

# $NetBSD: Makefile,v 1.14 2019/10/25 14:48:02 gdt Exp $
DISTNAME= unifi-5.11.50
CATEGORIES= net
MASTER_SITES= -http://dl.ubnt.com/unifi/${PKGVERSION_NOREV}/UniFi.unix.zip
EXTRACT_SUFX= .zip
# Updates must be tested to not only build but actually function under
# at least NetBSD 8/amd64 with actual UBNT hardware.
MAINTAINER= gdt@NetBSD.org
HOMEPAGE= https://www.ubnt.com/download/unifi/
# The content that belongs in NEWS are often in a blog.
#BLOGPAGE= https://community.ui.com/releases
COMMENT= Provisioning software for network products made by Ubiquiti
LICENSE= ubiquiti-license
# Bundled firmware images cannot be redistributed
RESTRICTED= No permission to redistribute
NO_BIN_ON_CDROM= ${RESTRICTED}
NO_BIN_ON_FTP= ${RESTRICTED}
NO_SRC_ON_CDROM= ${RESTRICTED}
NO_SRC_ON_FTP= ${RESTRICTED}
DISTFILES= ${DEFAULT_DISTFILES}
EXTRACT_ONLY= ${DEFAULT_DISTFILES}
# Unifi bundles snappy-java-1.0.5.jar, which contains native code.
# We can use the bundled snappy-java but we must recompile the native portion
# because it only ship linux binaries. The rcd script takes care of loading the
# correct library.
SNAPPY_JAVA= snappy-java-1.0.5.4
SITES.${SNAPPY_JAVA}.tar.gz= -https://github.com/xerial/snappy-java/archive/${SNAPPY_JAVA:S/snappy-java-//}.tar.gz
DISTFILES+= ${SNAPPY_JAVA}.tar.gz
EXTRACT_ONLY+= ${SNAPPY_JAVA}.tar.gz
SNAPPY= snappy-1.0.5
SITES.${SNAPPY}.tar.gz= http://download.openpkg.org/components/cache/snappy/ \
http://ftp.NetBSD.org/pub/pkgsrc/distfiles/snappy-java10/
DISTFILES+= ${SNAPPY}.tar.gz
EXTRACT_ONLY+= ${SNAPPY}.tar.gz
CHECK_SHLIBS_SKIP= unifi/lib/native/*
INSTALLATION_DIRS= unifi
# Emulated JDK doesn't work due to epoll issues. Also, would require
# matching emulated native libraries, and we only compile actual
# native libaries.
PKG_JVMS_ACCEPTED= openjdk8
PKGSRC_MAKE_ENV+= JAVA_HOME=${PKG_JAVA_HOME}
USE_LANGUAGES= c c++ # for snappy JNI library
USE_TOOLS+= gmake pax
WRKSRC= ${WRKDIR}/UniFi
# Upstream documents 3.4.15, but 3.4.4 actually works. Avoid mongodb4 because it
# has a problematic license.
DEPENDS+= mongodb>=3.4.4:../../databases/mongodb3
FILES_SUBST+= UNIFI_USER=${UNIFI_USER:Q} UNIFI_GROUP=${UNIFI_GROUP:Q}
FILES_SUBST+= JAVA=${PKG_JAVA_HOME}/bin/java
RCD_SCRIPTS= unifi
UNIFI_USER?= unifi
UNIFI_GROUP?= unifi
PKG_USERS_VARS= UNIFI_USER
PKG_GROUPS_VARS= UNIFI_GROUP
PKG_GROUPS= ${UNIFI_GROUP}
PKG_USERS= ${UNIFI_USER}:${UNIFI_GROUP}
.for d in data logs run work
OWN_DIRS_PERMS+= ${PREFIX}/unifi/${d} ${UNIFI_USER} ${UNIFI_GROUP} 0700
.endfor
.include "../../mk/bsd.prefs.mk"
post-extract:
# drop executable bit
find ${WRKSRC} -type f -print | xargs chmod -x
mkdir ${WRKDIR}/${SNAPPY_JAVA}/target
ln -s ${WRKDIR}/${SNAPPY} ${WRKDIR}/${SNAPPY_JAVA}/target
do-build:
# bundled mongod is a linux binary; replace with symlink to native binary
rm -f ${WRKSRC}/bin/mongod
ln -s ${PREFIX}/bin/mongod ${WRKSRC}/bin/mongod
cd ${WRKDIR}/${SNAPPY_JAVA} && ${BUILD_MAKE_CMD} native
do-install:
cd ${WRKSRC} && pax -rw . ${DESTDIR}${PREFIX}/unifi
${INSTALL_LIB} ${WRKDIR}/${SNAPPY_JAVA}/target/snappy-1.0.5-Default/libsnappyjava.so ${DESTDIR}${PREFIX}/unifi/lib
.include "../../mk/java-vm.mk"
.include "../../mk/bsd.pkg.mk"