summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrederik2015-06-09 14:21:38 +0200
committerfrederik2015-06-09 14:21:38 +0200
commitc5e103c64b922cda4c2db937c777c3c288640ec5 (patch)
treec45c2070484fa8348f951e63451c1cf0dad77cfe
downloadaur-c5e103c64b922cda4c2db937c777c3c288640ec5.tar.gz
Initial commit: move from aur to aur4
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD28
-rw-r--r--unifi.install16
-rw-r--r--unifi.service11
4 files changed, 74 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..6fe7a307d8c6
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = unifi-controller-beta
+ pkgdesc = Controller for Ubiquiti UniFi accesspoints
+ pkgver = 4.6.5
+ pkgrel = 1
+ url = http://www.ubnt.com/
+ install = unifi.install
+ arch = any
+ license = custom
+ depends = mongodb
+ depends = java-runtime
+ conflicts = unifi-controller
+ backup = opt/unifi/data/system.properties
+ source = UniFi-4.6.5.zip::http://dl.ubnt.com/unifi/4.6.5-1d8795a/UniFi.unix.zip
+ source = unifi.service
+ md5sums = 97b2afa1cf276ff0243534773b84e0c9
+ md5sums = 04934ee4be43b6f80db610d140edf49f
+
+pkgname = unifi-controller-beta
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..aa70ee4a336c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,28 @@
+# Maintainer: Frederik Schwan <frederik dot schwan at linux dot com>
+# Contributor: Sébastien Luttringer
+
+pkgname=unifi-controller-beta
+pkgver=4.6.5
+_pkg=1d8795a
+pkgrel=1
+pkgdesc='Controller for Ubiquiti UniFi accesspoints'
+arch=('any')
+url='http://www.ubnt.com/'
+license=('custom')
+depends=('mongodb' 'java-runtime')
+conflicts=('unifi-controller')
+# needed to not break configuration accross upgrades
+backup=('opt/unifi/data/system.properties')
+install=unifi.install
+source=("UniFi-$pkgver.zip::http://dl.ubnt.com/unifi/$pkgver-$_pkg/UniFi.unix.zip"
+ 'unifi.service')
+md5sums=('97b2afa1cf276ff0243534773b84e0c9'
+ '04934ee4be43b6f80db610d140edf49f')
+
+package() {
+ install -d "$pkgdir/opt"
+ cp -ar UniFi "$pkgdir/opt/unifi"
+ chown -R 113:113 "$pkgdir/opt/unifi"
+ rm "$pkgdir/opt/unifi/readme.txt"
+ install -D -m 644 unifi.service "$pkgdir/usr/lib/systemd/system/unifi.service"
+}
diff --git a/unifi.install b/unifi.install
new file mode 100644
index 000000000000..a286c57b6b8e
--- /dev/null
+++ b/unifi.install
@@ -0,0 +1,16 @@
+# arg 1: the new package version
+post_install() {
+ printf "==> To use the controller:\n"
+ printf " sudo systemctl start unifi\n"
+ printf " Open up https://localhost:8443\n"
+ getent group unifi >/dev/null || groupadd -g 113 unifi
+ getent passwd unifi >/dev/null || useradd -M -d /opt/unifi -u 113 -g 113 unifi
+ :
+}
+
+# arg 1: the old package version
+post_remove() {
+ userdel -f unifi &>/dev/null
+ groupdel unifi &>/dev/null
+ :
+}
diff --git a/unifi.service b/unifi.service
new file mode 100644
index 000000000000..6e7c64f8008b
--- /dev/null
+++ b/unifi.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=UniFi Controller
+After=network.target
+
+[Service]
+User=unifi
+ExecStart=/usr/bin/java -jar /opt/unifi/lib/ace.jar start
+ExecStop=/usr/bin/java -jar /opt/unifi/lib/ace.jar stop
+
+[Install]
+WantedBy=multi-user.target