summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Kohler <bkohler@gentoo.org>2018-06-25 19:02:29 -0500
committerBen Kohler <bkohler@gentoo.org>2018-06-25 19:03:16 -0500
commit6d09f5cde33491d5505b27b088bce0306b1c1040 (patch)
treeb8ec6574ac7392a00d56bf02f075fb5903f1b700 /net-wireless/unifi/unifi-5.9.4.ebuild
parentapp-backup/spideroak-bin: Downgrade to 7.2.0 (diff)
downloadgentoo-6d09f5cde33491d5505b27b088bce0306b1c1040.tar.gz
gentoo-6d09f5cde33491d5505b27b088bce0306b1c1040.tar.bz2
gentoo-6d09f5cde33491d5505b27b088bce0306b1c1040.zip
net-wireless/unifi: new package
Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'net-wireless/unifi/unifi-5.9.4.ebuild')
-rw-r--r--net-wireless/unifi/unifi-5.9.4.ebuild63
1 files changed, 63 insertions, 0 deletions
diff --git a/net-wireless/unifi/unifi-5.9.4.ebuild b/net-wireless/unifi/unifi-5.9.4.ebuild
new file mode 100644
index 000000000000..b51420746ef7
--- /dev/null
+++ b/net-wireless/unifi/unifi-5.9.4.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd user
+
+# for not-stable releases set RC_SUFFIX="-xxxxxxxxxx"
+RC_SUFFIX="-b647df56b7"
+
+DESCRIPTION="Management Controller for UniFi APs"
+HOMEPAGE="https://www.ubnt.com/download/unifi"
+SRC_URI="http://dl.ubnt.com/unifi/${PV}${RC_SUFFIX}/UniFi.unix.zip -> ${P}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+#KEYWORDS="~amd64"
+IUSE=""
+RESTRICT="mirror"
+
+DEPEND=""
+RDEPEND="dev-db/mongodb
+ virtual/jre"
+
+S=${WORKDIR}/UniFi
+QA_PREBUILT="/usr/lib64/unifi/lib/native/*"
+
+pkg_setup() {
+ enewuser ${PN}
+ enewgroup ${PN}
+}
+
+src_install(){
+ static_dir="/usr/$(get_libdir)/${PN}"
+ #install static data
+ insinto ${static_dir}
+ doins -r *
+
+ #wrapper to work around mongodb-3.6 compat issue
+ exeinto ${static_dir}/bin/
+ newexe "${FILESDIR}"/mongod-wrapper mongod
+
+ #prepare runtime-data dirs which live in /var but are symlinked from static
+ #data dir, and are writable by non-root user
+ dodir /var/log/${PN}
+ fowners ${PN}:${PN} /var/log/${PN}
+ dosym ../../../var/log/${PN} ${static_dir}/logs
+
+ dodir /var/lib/${PN}/work
+ fowners ${PN}:${PN} /var/lib/${PN}/work
+ dosym ../../../var/lib/${PN}/work ${static_dir}/work
+
+ keepdir /var/lib/${PN}/data
+ fowners ${PN}:${PN} /var/lib/${PN}/data
+ dosym ../../../var/lib/${PN}/data ${static_dir}/data
+
+ echo "CONFIG_PROTECT=\"/var/lib/${PN}/data/system.properties\"" > "${T}"/99${PN}
+ doenvd "${T}"/99${PN}
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}