summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD54
-rw-r--r--openhab6
-rw-r--r--openhab-startsh.patch19
-rw-r--r--openhab.service12
5 files changed, 115 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d106c23ceae8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = openhab-runtime
+ pkgdesc = openHAB automation runtime
+ pkgver = 1.7.0
+ pkgrel = 1
+ url = http://www.openhab.org/
+ arch = any
+ license = EPL
+ makedepends = unzip
+ depends = java-runtime>=7
+ optdepends = openhab-addons: bindings and actions
+ noextract = distribution-1.7.0-runtime.zip
+ backup = etc/openhab/openhab.cfg
+ backup = etc/conf.d/openhab
+ source = https://bintray.com/artifact/download/openhab/bin/distribution-1.7.0-runtime.zip
+ source = openhab
+ source = openhab.service
+ source = openhab-startsh.patch
+ md5sums = cecc93e8cf8abf96a956c1502229efaf
+ md5sums = e06c404f7174ac0b1d9c2e9e429c3b5f
+ md5sums = 18299bfcb7865fec55d06890e25c8668
+ md5sums = 481370e7c473aff7e9267e2e4f6fe68c
+
+pkgname = openhab-runtime
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1ee2454a8802
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,54 @@
+# This is an example PKGBUILD file. Use this as a start to creating your own,
+# and remove these comments. For more information, see 'man PKGBUILD'.
+# NOTE: Please fill out the license field for your package! If it is unknown,
+# then please put 'unknown'.
+
+# Maintainer: Thorsten Lanfer <tlanfer@gmail.com>
+pkgname=openhab-runtime
+pkgver=1.7.0
+pkgrel=1
+pkgdesc="openHAB automation runtime"
+arch=('any')
+url="http://www.openhab.org/"
+license=('EPL')
+depends=('java-runtime>=7')
+makedepends=('unzip')
+optdepends=('openhab-addons: bindings and actions')
+backup=('etc/openhab/openhab.cfg'
+ 'etc/conf.d/openhab')
+source=("https://bintray.com/artifact/download/openhab/bin/distribution-$pkgver-runtime.zip"
+ "openhab"
+ "openhab.service"
+ "openhab-startsh.patch")
+noextract=("distribution-$pkgver-runtime.zip")
+md5sums=('cecc93e8cf8abf96a956c1502229efaf'
+ 'e06c404f7174ac0b1d9c2e9e429c3b5f'
+ '18299bfcb7865fec55d06890e25c8668'
+ '481370e7c473aff7e9267e2e4f6fe68c')
+
+prepare() {
+ mkdir "$srcdir/openhab-runtime"
+ cd "$srcdir/openhab-runtime"
+
+ unzip "$srcdir/distribution-$pkgver-runtime.zip"
+
+}
+
+build() {
+ patch -p1 < openhab-startsh.patch
+}
+
+package() {
+ cd $pkgdir
+ mkdir -p opt
+ mkdir -p etc/openhab/addons-enabled
+ mkdir -p etc/conf.d
+ mkdir -p usr/lib/systemd/system
+ cp $srcdir/openhab.service usr/lib/systemd/system
+ cp -r $srcdir/openhab-runtime opt
+ cp $srcdir/openhab etc/conf.d
+ cp opt/openhab-runtime/configurations/openhab_default.cfg etc/openhab/openhab.cfg
+ ln -s /etc/openhab/openhab.cfg opt/openhab-runtime/configurations/openhab.cfg
+ rm -r opt/openhab-runtime/addons
+ ln -s /etc/openhab/addons-enabled opt/openhab-runtime/addons
+}
diff --git a/openhab b/openhab
new file mode 100644
index 000000000000..cd46456519ce
--- /dev/null
+++ b/openhab
@@ -0,0 +1,6 @@
+
+# set ports for HTTP(S) server
+HTTP_PORT=8080
+HTTPS_PORT=8443
+
+OPENHAB_OPTIONS=
diff --git a/openhab-startsh.patch b/openhab-startsh.patch
new file mode 100644
index 000000000000..02ea80fe637d
--- /dev/null
+++ b/openhab-startsh.patch
@@ -0,0 +1,19 @@
+--- src/openhab-runtime/start.sh 2015-05-25 21:28:50.000000000 +0200
++++ src/openhab-runtime/start2.sh 2015-06-30 21:30:48.788034088 +0200
+@@ -5,10 +5,6 @@
+ # set path to eclipse folder. If local folder, use '.'; otherwise, use /path/to/eclipse/
+ eclipsehome="server";
+
+-# set ports for HTTP(S) server
+-HTTP_PORT=8080
+-HTTPS_PORT=8443
+-
+ # get path to equinox jar inside $eclipsehome folder
+ cp=$(find $eclipsehome -name "org.eclipse.equinox.launcher_*.jar" | sort | tail -1);
+
+@@ -30,4 +26,5 @@
+ -Dfelix.fileinstall.active.level=4 \
+ -Djava.awt.headless=true \
+ -jar $cp $* \
++ $OPENHAB_OPTIONS \
+ -console
diff --git a/openhab.service b/openhab.service
new file mode 100644
index 000000000000..2b901f34e31e
--- /dev/null
+++ b/openhab.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=OpenHAB runtime
+After=syslog.target network.target
+
+[Service]
+Type=simple
+EnvironmentFile=-/etc/conf.d/openhab
+ExecStart=/opt/openhab-runtime/start.sh
+ExecReload=/usr/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target