Import ports/net/unifi, controller software for ubiquiti unifi access points.

This is v3.1.10 which is not a full release yet but working stably for me.
ok jca@
This commit is contained in:
sthen 2014-04-18 21:49:44 +00:00
parent 698bc29458
commit 11e31675ab
5 changed files with 163 additions and 0 deletions

44
net/unifi/Makefile Normal file
View File

@ -0,0 +1,44 @@
# $OpenBSD: Makefile,v 1.1.1.1 2014/04/18 21:49:44 sthen Exp $
COMMENT= Ubiquiti uniFi wireless controller
DISTFILES= unifi-$V{UniFi.unix}.zip
V= 3.1.10
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/$V/
MODULES= java
MODJAVA_VER= 1.6+
MODJAVA_JRERUN= yes
RUN_DEPENDS= databases/mongodb \
java/javaPathHelper
NO_BUILD= Yes
NO_TEST= Yes
WRKDIST= ${WRKDIR}/UniFi
INSTDIR= ${PREFIX}/share/unifi/
do-install:
${INSTALL_DATA_DIR} ${INSTDIR}
cp -Rp ${WRKSRC}/* ${INSTDIR}
ln -fs ${LOCALBASE}/bin/mongod ${INSTDIR}/bin/mongod
ln -s /var/log/unifi ${INSTDIR}/logs
chown -R ${SHAREOWN}:${SHAREGRP} ${INSTDIR}
chmod -R ${SHAREMODE} ${INSTDIR}
.include <bsd.port.mk>

2
net/unifi/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (unifi-3.1.10.zip) = tAU+dqbbS1EB0bWqzi7mFEJMiBpMa46Hcx/e1kJla44=
SIZE (unifi-3.1.10.zip) = 34906140

3
net/unifi/pkg/DESCR Normal file
View File

@ -0,0 +1,3 @@
This package contains controller software for Ubiquiti UniFi access points.
This is version 3.x which is still in beta, but provides support for newer
access points, and additional features such as zero handoff roaming.

90
net/unifi/pkg/PLIST Normal file
View File

@ -0,0 +1,90 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2014/04/18 21:49:44 sthen Exp $
@newgroup _unifi:732
@newuser _unifi:732:_unifi:daemon:unifi user:/usr/local/share/unifi:/sbin/nologin
@owner _unifi
share/unifi/
@owner
share/unifi/bin/
share/unifi/bin/mongod
@extraunexec rm -rf %D/share/unifi/conf/*
@owner _unifi
share/unifi/conf/
share/unifi/dl/
share/unifi/dl/firmware/
share/unifi/dl/firmware/BZ2/
share/unifi/dl/firmware/BZ2/3.1.10.2519/
share/unifi/dl/firmware/BZ2/3.1.10.2519/firmware.bin
share/unifi/dl/firmware/U2S48/
share/unifi/dl/firmware/U2S48/3.1.10.2519/
share/unifi/dl/firmware/U2S48/3.1.10.2519/firmware.bin
share/unifi/dl/firmware/U7E/
share/unifi/dl/firmware/U7E/3.1.10.2519/
share/unifi/dl/firmware/U7E/3.1.10.2519/firmware.bin
share/unifi/dl/firmware/U7P/
share/unifi/dl/firmware/U7P/3.1.10.2519/
share/unifi/dl/firmware/U7P/3.1.10.2519/firmware.bin
share/unifi/dl/firmware/bundles.json
@owner
share/unifi/lib/
share/unifi/lib/MRJAdapter.jar
share/unifi/lib/ace.jar
share/unifi/lib/annotations-api.jar
share/unifi/lib/asm.jar
share/unifi/lib/bootstrap.jar
share/unifi/lib/catalina-ant.jar
share/unifi/lib/catalina-ha.jar
share/unifi/lib/catalina-tribes.jar
share/unifi/lib/catalina.jar
share/unifi/lib/cglib.jar
share/unifi/lib/commons-beanutils.jar
share/unifi/lib/commons-codec.jar
share/unifi/lib/commons-daemon.jar
share/unifi/lib/commons-httpclient.jar
share/unifi/lib/commons-lang.jar
share/unifi/lib/commons-logging.jar
share/unifi/lib/commons-net.jar
share/unifi/lib/dom4j.jar
share/unifi/lib/ecj-4.2.1.jar
share/unifi/lib/el-api.jar
share/unifi/lib/jasper-el.jar
share/unifi/lib/jasper.jar
share/unifi/lib/jmdns.jar
share/unifi/lib/jsp-api.jar
share/unifi/lib/jstl.jar
share/unifi/lib/jstun-0.7.3.jar
share/unifi/lib/jul-log4j-bridge.jar
share/unifi/lib/log4j.jar
share/unifi/lib/mail.jar
share/unifi/lib/mongo.jar
share/unifi/lib/org.springframework.config.java-1.0.0.M4.jar
share/unifi/lib/servlet-api.jar
share/unifi/lib/slf4j-api.jar
share/unifi/lib/slf4j-log4j12.jar
share/unifi/lib/spring-beans-2.5.6.jar
share/unifi/lib/spring-context-2.5.6.jar
share/unifi/lib/spring-core-2.5.6.jar
share/unifi/lib/sshj.jar
share/unifi/lib/tomcat-api.jar
share/unifi/lib/tomcat-coyote.jar
share/unifi/lib/tomcat-dbcp.jar
share/unifi/lib/tomcat-i18n-es.jar
share/unifi/lib/tomcat-i18n-fr.jar
share/unifi/lib/tomcat-i18n-ja.jar
share/unifi/lib/tomcat-jdbc.jar
share/unifi/lib/tomcat-juli-adapters.jar
share/unifi/lib/tomcat-juli.jar
share/unifi/lib/tomcat-util.jar
share/unifi/logs
@owner _unifi
@sample /var/log/unifi/
@owner
share/unifi/readme.txt
@owner _unifi
share/unifi/webapps/
share/unifi/webapps/ROOT.war
@owner
@exec-update rm -rf %D/share/unifi/webapps/ROOT
@extraunexec rm -rf %D/share/unifi/{dl,data,run,work,conf}
@extraunexec rm -rf %D/share/unifi/webapps/*
@extraunexec rm -rf /var/log/unifi
@rcscript ${RCDIR}/unifi

24
net/unifi/pkg/unifi.rc Normal file
View File

@ -0,0 +1,24 @@
#!/bin/sh
#
# $OpenBSD: unifi.rc,v 1.1.1.1 2014/04/18 21:49:44 sthen Exp $
daemon="${TRUEPREFIX}/share/unifi/lib/ace.jar"
daemon_user="_unifi"
. /etc/rc.d/rc.subr
java="$(${LOCALBASE}/bin/javaPathHelper -c unifi)"
pexp="${java} -jar ${daemon} start"
rc_bg=YES
rc_reload=NO
rc_start() {
${rcexec} "${java} -jar ${daemon} start" &
}
rc_stop() {
${rcexec} "${java} -jar ${daemon} stop"
}
rc_cmd $1