sthen be1fc322d8 update to UniFi-5.2.9, which backs out firmware for 1st gen UAPs due to
some issues with newer firmware on these devices.
2016-10-06 19:51:15 +00:00

59 lines
1.5 KiB
Makefile

# $OpenBSD: Makefile,v 1.30 2016/10/06 19:51:15 sthen Exp $
COMMENT= controller for Ubiquiti uniFi (AP/routing/switching/voip)
VERSION= 5.2.9
V= ${VERSION:C/-.*//}
DISTFILES= unifi-$V{UniFi.unix}.zip unifi_sh_api-$V{unifi_sh_api}
EXTRACT_ONLY= unifi-$V.zip
PKGNAME= unifi-$V
CATEGORIES= net
HOMEPAGE= http://wiki.ubnt.com/UniFi_FAQ
MAINTAINER= Stuart Henderson <sthen@openbsd.org>
# at least the firmware files are restricted, if not more
PERMIT_PACKAGE_CDROM= http://www.ubnt.com/eula/
PERMIT_PACKAGE_FTP= http://www.ubnt.com/eula/
PERMIT_DISTFILES_FTP= http://www.ubnt.com/eula/
MASTER_SITES= http://dl.ubnt.com/unifi/${VERSION}/
MODULES= java
MODJAVA_VER= 1.8+
MODJAVA_JRERUN= yes
RUN_DEPENDS= databases/mongodb \
java/javaPathHelper
NO_BUILD= Yes
NO_TEST= Yes
WRKDIST= ${WRKDIR}/UniFi
INSTDIR= ${PREFIX}/share/unifi/
LIB_V= lib/4_8_18_8395
REL_V= ${VERSION}.0
SUBST_VARS= LIB_V REL_V
post-extract:
cp ${FULLDISTDIR}/unifi_sh_api-$V ${WRKSRC}/unifi_sh_api
do-install:
${INSTALL_DATA_DIR} ${INSTDIR}{,/backup,/data,/run,/work}
cp -Rp ${WRKSRC}/* ${INSTDIR}
ln -fs ${LOCALBASE}/bin/mongod ${INSTDIR}/bin/mongod
ln -s /var/log/unifi ${INSTDIR}/logs
chown -R ${SHAREOWN}:${SHAREGRP} ${INSTDIR}
find ${INSTDIR} -type f|xargs chmod ${SHAREMODE}
find ${INSTDIR} -type d|xargs chmod ${DIRMODE}
${SUBST_CMD} -c -m 555 -o ${BINOWN} -g ${BINGRP} \
${FILESDIR}/unifi.sh ${PREFIX}/bin/unifi
ln -s unifi ${PREFIX}/bin/unifi-discover
rm -f ${INSTDIR}/unifi_sh_api.orig
rm -rf ${INSTDIR}/lib/native
.include <bsd.port.mk>