From owner-svn-ports-all@freebsd.org Sun Feb 4 14:01:52 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3B33ED826B; Sun, 4 Feb 2018 14:01:51 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 75ED1813CB; Sun, 4 Feb 2018 14:01:51 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 70D341B176; Sun, 4 Feb 2018 14:01:51 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w14E1pQo040835; Sun, 4 Feb 2018 14:01:51 GMT (envelope-from feld@FreeBSD.org) Received: (from feld@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w14E1ov7040831; Sun, 4 Feb 2018 14:01:50 GMT (envelope-from feld@FreeBSD.org) Message-Id: <201802041401.w14E1ov7040831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: feld set sender to feld@FreeBSD.org using -f From: Mark Felder Date: Sun, 4 Feb 2018 14:01:50 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r460932 - in head/net-mgmt: . unifi-devel unifi-devel/files X-SVN-Group: ports-head X-SVN-Commit-Author: feld X-SVN-Commit-Paths: in head/net-mgmt: . unifi-devel unifi-devel/files X-SVN-Commit-Revision: 460932 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Feb 2018 14:01:52 -0000 Author: feld Date: Sun Feb 4 14:01:50 2018 New Revision: 460932 URL: https://svnweb.freebsd.org/changeset/ports/460932 Log: The UniFi Controller allows you to manage Wireless, Routing & Switching, VoIP and Video of Ubiquiti Networks. This port tracks the development releases. WWW: http://wiki.ubnt.com/UniFi_FAQ PR: 223401 Added: head/net-mgmt/unifi-devel/ head/net-mgmt/unifi-devel/Makefile (contents, props changed) head/net-mgmt/unifi-devel/distinfo (contents, props changed) head/net-mgmt/unifi-devel/files/ head/net-mgmt/unifi-devel/files/unifi.in (contents, props changed) head/net-mgmt/unifi-devel/pkg-descr (contents, props changed) Modified: head/net-mgmt/Makefile Modified: head/net-mgmt/Makefile ============================================================================== --- head/net-mgmt/Makefile Sun Feb 4 13:58:47 2018 (r460931) +++ head/net-mgmt/Makefile Sun Feb 4 14:01:50 2018 (r460932) @@ -366,6 +366,7 @@ SUBDIR += torrus SUBDIR += triton-guesttools SUBDIR += unbound_exporter + SUBDIR += unifi-devel SUBDIR += unifi5 SUBDIR += victorops-nagios SUBDIR += vidalia Added: head/net-mgmt/unifi-devel/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/unifi-devel/Makefile Sun Feb 4 14:01:50 2018 (r460932) @@ -0,0 +1,75 @@ +# Created by: Alban MAIRE +# $FreeBSD$ + +PORTNAME= unifi +PORTVERSION= 5.7.15 +PORTREVISION= 0 +CATEGORIES= net-mgmt java +MASTER_SITES= http://dl.ubnt.com/unifi/${PORTVERSION}-${UNIFI_BUILD}/ +PKGNAMESUFFIX= -devel +DISTNAME= unifi_sysvinit_all +EXTRACT_SUFX= .deb +DIST_SUBDIR= ${PORTNAME}-${PORTVERSION} + +MAINTAINER= feld@FreeBSD.org +COMMENT= UniFi Controller v5 + +RUN_DEPENDS= mongodb>0:databases/mongodb \ + snappyjava>0:archivers/snappy-java + +SUB_LIST+= USERS=${USERS} GROUPS=${GROUPS} JAVASHAREDIR=${JAVASHAREDIR} \ + JAVA=${JAVA} + +EXTRACT_CMD= /usr/bin/ar +EXTRACT_BEFORE_ARGS= -p +EXTRACT_AFTER_ARGS= data.tar.xz | ${TAR} -xf - + +UNIFI_BUILD= e9b882be05 + +CONFLICTS= unifi5-* + +USES= cpe +CPE_VENDOR= ubnt +CPE_PRODUCT= unifi_controller +USE_JAVA= yes +JAVA_VERSION= 1.8 +JAVA_OS= native +JAVA_VENDOR= openjdk bsdjava +JAVA_RUN= yes + +NO_BUILD= yes +NO_ARCH= yes + +USE_RC_SUBR= unifi + +USERS= unifi +GROUPS= unifi + +NO_WRKSUBDIR= yes + +CONFLICTS= unifi2-* unifi3-* unifi4-* + +DIR_LIST= conf data logs run work + +post-patch: + ${RM} ${WRKSRC}/usr/lib/unifi/lib/snappy-java-1.1.2.6.jar ${WRKSRC}/usr/lib/unifi/bin/* + (cd ${WRKSRC}/usr/lib/unifi/lib && ${LN} -s ${JAVAJARDIR}/snappy-java.jar snappy-java-1.1.2.6.jar) + ${RM} -r ${WRKSRC}/usr/lib/unifi/lib/native + +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 + +post-install: + @${FIND} -s ${STAGEDIR}${JAVASHAREDIR}/unifi -not -type d | ${SORT} | \ + ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST} +.for dir in ${DIR_LIST} + @${ECHO} "@dir(unifi,wheel,) ${JAVASHAREDIR}/unifi/${dir}" >> ${TMPPLIST} +.endfor + +.include Added: head/net-mgmt/unifi-devel/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/unifi-devel/distinfo Sun Feb 4 14:01:50 2018 (r460932) @@ -0,0 +1,3 @@ +TIMESTAMP = 1517752289 +SHA256 (unifi-5.7.15/unifi_sysvinit_all.deb) = 93684bcc311bd56ab74765e7b78bba9689f760d3457f044d3284c32a0f6fa820 +SIZE (unifi-5.7.15/unifi_sysvinit_all.deb) = 63651966 Added: head/net-mgmt/unifi-devel/files/unifi.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/unifi-devel/files/unifi.in Sun Feb 4 14:01:50 2018 (r460932) @@ -0,0 +1,60 @@ +#!/bin/sh +# +# Created by: Mark Felder +# $FreeBSD$ +# + +# PROVIDE: unifi +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable `unifi': +# +# unifi_enable="YES" + +. /etc/rc.subr +name=unifi + +rcvar=unifi_enable +load_rc_config ${name} + +: ${unifi_enable:=NO} +: ${unifi_user:=%%USERS%%} +: ${unifi_group:=%%GROUPS%%} +: ${unifi_chdir=%%JAVASHAREDIR%%/unifi} +: ${unifi_javaflags:="-Djava.awt.headless=true -Xmx1024M"} + +pidfile="/var/run/unifi/${name}.pid" +procname=%%JAVA%% +command="/usr/sbin/daemon" +command_args="-f -p ${pidfile} %%JAVA%% ${unifi_javaflags} -jar lib/ace.jar start" +start_precmd=start_precmd +stop_precmd=stop_precmd +stop_postcmd=stop_postcmd + +start_precmd() +{ + if [ ! -e /var/run/unifi ] ; then + install -d -o %%USERS%% -g %%GROUPS%% /var/run/unifi; + fi +} + +stop_precmd() +{ + if [ -r ${pidfile} ]; then + _UNIFIPID=$(check_pidfile ${pidfile} ${procname}) + export _UNIFI_CHILDREN=$(pgrep -P ${_UNIFIPID}) + fi +} + +stop_postcmd() +{ + if ! [ -z ${_UNIFI_CHILDREN} ]; then + echo "Cleaning up leftover child processes." + kill $sig_stop ${_UNIFI_CHILDREN} + wait_for_pids ${_UNIFI_CHILDREN} + fi +} + +run_rc_command "$1" Added: head/net-mgmt/unifi-devel/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/unifi-devel/pkg-descr Sun Feb 4 14:01:50 2018 (r460932) @@ -0,0 +1,6 @@ +The UniFi Controller allows you to manage Wireless, Routing & Switching, +VoIP and Video of Ubiquiti Networks. + +This port tracks the development releases. + +WWW: http://wiki.ubnt.com/UniFi_FAQ