summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD41
-rw-r--r--jtradfri.conf25
-rw-r--r--jtradfri.service14
-rw-r--r--sysusers.conf1
5 files changed, 104 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..14ac2a21d56
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = jtradfri-git
+ pkgdesc = General purpose Client for the IKEA Tradfri System
+ pkgver = r11.b803d55
+ pkgrel = 1
+ url = https://github.com/peterkappelt/JTradfri
+ arch = any
+ license = Apache
+ makedepends = git
+ makedepends = java-environment
+ makedepends = gradle
+ depends = java-environment
+ backup = opt/jtradfri/jtradfri.conf
+ source = jtradfri::git://github.com/peterkappelt/JTradfri.git
+ source = jtradfri.service
+ source = sysusers.conf
+ source = jtradfri.conf
+ md5sums = SKIP
+ md5sums = 5bfbd6a39fd4f2e69bdbcff5d9f08c91
+ md5sums = 92bc09a07c69fac1452464540dbb90f1
+ md5sums = dd83b6fe85428ebffcb52c2c790f86a0
+
+pkgname = jtradfri-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..ba4871f9072
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Tim Niedermeier <youremail@domain.com>
+pkgname=jtradfri-git
+_gitname=jtradfri
+pkgver=r11.b803d55
+pkgrel=1
+pkgdesc="General purpose Client for the IKEA Tradfri System"
+arch=("any")
+url="https://github.com/peterkappelt/JTradfri"
+license=("Apache")
+depends=("java-environment")
+makedepends=("git" "java-environment" "gradle")
+backup=("opt/${_gitname}/jtradfri.conf")
+source=(
+ "${_gitname}::git://github.com/peterkappelt/JTradfri.git"
+ "jtradfri.service"
+ "sysusers.conf"
+ "jtradfri.conf"
+)
+md5sums=(
+ "SKIP"
+ "5bfbd6a39fd4f2e69bdbcff5d9f08c91"
+ "92bc09a07c69fac1452464540dbb90f1"
+ "dd83b6fe85428ebffcb52c2c790f86a0"
+)
+
+pkgver() {
+ cd "${_gitname}"
+ echo "r$(git rev-list --count master).$(git rev-parse --short master)"
+}
+
+build() {
+ cd "${_gitname}/JTradfri"
+ gradle build
+}
+
+package() {
+ install -Dm 0644 "jtradfri.service" "${pkgdir}/usr/lib/systemd/system/jtradfri.service"
+ install -Dm 0644 "sysusers.conf" "${pkgdir}/usr/lib/sysusers.d/${_gitname}.conf"
+ install -Dm 0644 "jtradfri.conf" "${pkgdir}/opt/${_gitname}/jtradfri.conf"
+ install -Dm 0644 "$(find ${_gitname}/JTradfri/build/libs -name "JTradfri-*-all.jar")" "${pkgdir}/opt/${_gitname}/jtradfri.jar"
+}
diff --git a/jtradfri.conf b/jtradfri.conf
new file mode 100644
index 00000000000..56a3d628fdb
--- /dev/null
+++ b/jtradfri.conf
@@ -0,0 +1,25 @@
+#Comments start with the "#"-Character
+
+#IP or DNS-Name of the Tradfri Gateway. Required
+#gateway=TradfriGW.int.kappelt.net
+
+#PSK of the Gateway. Required
+#secret=Your-PSK-Here
+
+#JTradfri receives commands over a TCP socket
+#Port of that TCP-Server, optional. Default 1505
+#port=1505
+
+#Listen-Address of the TCP-Server, optional. Default 127.0.0.1
+#Set this to the IP of your PC if the TCP-Client (e.g. FHEM) isn't running on the same PC as JTradfri
+#listenaddress=192.168.2.121
+
+#JTradfri opens an UDP-Socket
+#you can set this socket to a static port if you need to configure your firewall for this
+#Optional. Default is random port
+#udpport=12345
+
+#JTradfri can read command interactively from the commandline
+#This can be disable with the following parameter (optional, default false)
+#That is necessary if JTradfri is running as a systemd-service
+#nocmdline=true
diff --git a/jtradfri.service b/jtradfri.service
new file mode 100644
index 00000000000..47169b74902
--- /dev/null
+++ b/jtradfri.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=JTradfri - FHEM-Tradfri Gateway Software
+Wants=network.target
+After=network.target
+
+[Service]
+User=jtradfri
+Group=jtradfri
+Type=simple
+WorkingDirectory=/opt/jtradfri
+ExecStart=/usr/bin/java -jar /opt/jtradfri/jtradfri.jar -n -c /opt/jtradfri/jtradfri.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sysusers.conf b/sysusers.conf
new file mode 100644
index 00000000000..621d10403f7
--- /dev/null
+++ b/sysusers.conf
@@ -0,0 +1 @@
+u jtradfri - "jtradfri" /home /bin/false