summaryrefslogtreecommitdiff
path: root/app-misc
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/Manifest.gzbin50623 -> 50786 bytes
-rw-r--r--app-misc/openhab-bin/Manifest7
-rw-r--r--app-misc/openhab-bin/files/openhab.env5
-rw-r--r--app-misc/openhab-bin/files/openhab.service26
-rw-r--r--app-misc/openhab-bin/files/openhab.tmpfiles8
-rw-r--r--app-misc/openhab-bin/metadata.xml11
-rw-r--r--app-misc/openhab-bin/openhab-bin-4.1.1.ebuild103
7 files changed, 160 insertions, 0 deletions
diff --git a/app-misc/Manifest.gz b/app-misc/Manifest.gz
index de0eca69fab6..3c11027d0dfd 100644
--- a/app-misc/Manifest.gz
+++ b/app-misc/Manifest.gz
Binary files differ
diff --git a/app-misc/openhab-bin/Manifest b/app-misc/openhab-bin/Manifest
new file mode 100644
index 000000000000..8f9a229b0c6f
--- /dev/null
+++ b/app-misc/openhab-bin/Manifest
@@ -0,0 +1,7 @@
+AUX openhab.env 167 BLAKE2B 6e67342c7eb05fb4f3b2e57769ad51d0db195ad707719caa4adf66f5d26c8ed127ee718c807e7a834944c619d225c32697b336aed8f337421e202e6e75554705 SHA512 07c025837772273e13ff759cce28f0f1f7a06d951368b8255d5a7410096a9a90d9983fcbe81302ddf131916ed9ea61372630376e410ccde139ba34665e4e08f4
+AUX openhab.service 518 BLAKE2B f00b13946a588b1b2b9f94775d5ef281cac777888426bd97a87b72eed39fe23a609a51e819e690ebaae1c5ca5c4a37bb7874a64a52d39a305012602905be9e52 SHA512 e07cc1465bb8eee24cd1435b468279fcb2f95acbf44866306b0637e2d7e46c0aef50bb3ce9e22cafe5140d4b534df77bfcbdc7d7e697def9db94a0207f2e1dd3
+AUX openhab.tmpfiles 352 BLAKE2B 23bab4c007c924cdfaa602654f19030d702b855f3baf62aaa016d944c8caf4f93252ae3ab9b3442ff6a8a528fcdd7a12f9767c29bfed7837c8f2cc2594955c26 SHA512 cb7cc7483915512f65664a9439b07c25b15c3066f321c8087cece2803e937392f9f0888a5c836949632c9b0974fb2d6cc577d8f785423cd42aa6ba575ba8fcc2
+DIST openhab-4.1.1.zip 110909555 BLAKE2B df89e2391e8abe926635fc1e0fbb5c7b1f6a03a87ba643d68a3c8bf1ef52f8b6ca862d8655112a225e1ec2f2d9cc90e0906c40a5dc00f52b53fcb4bac8059378 SHA512 50125e025e4ed8f3ea93359a777e0944150cf157b853bc3f6e777c04956c59346d77d4f3680756241d3d71b8c57014f777601cb5ca836b8e80046ce5a5aac770
+DIST openhab-cli-2024-01-14 8633 BLAKE2B 0b0999abcb884b779087b92f9f3e08fee3662753692392fbb30d218d0fc25fd1fca613c32b8193a3365764c55ac3525f8369aeea4edbf61223cd0219209c4cbf SHA512 bf24ae776d4362e8a60a0c71cb025834e5f645a24377a87484477f544026f2fdd996a1781f1082e62197fce33a9dadb5972df22ce3e4cd9f73d3088ec5bc0a98
+EBUILD openhab-bin-4.1.1.ebuild 2231 BLAKE2B f896aafe9619cc3ddf664060979af4745ea6f2e296472085add053679767b7a5e74841a6dd2d12cafa0c794fbbc7d487a1b7f17d48625083d45099759e979473 SHA512 fa1eae48f704d0e9071b146bb2aa5739cad463f2de26ea94c121233c11a361b6ebfae70f5822366190bc521a6ec65bca7f68030e459ab521e5906d498f2bed85
+MISC metadata.xml 331 BLAKE2B 325938f90855fb13e64b8ec2327fd80f76999b960c1ca724d85c87de7baa7c0d204b5984b791cd44d272835d35f5a941ca3d82de64a45a93476dcd1ef6d0d5b8 SHA512 6bb2aea373660620b79958dec846ccc18414a3270a7d06b5fe104e1820ebcd925aaf85d1b4954d88660c6ef646d69f64e50844135e8dc4ea01c9c1508d1cce8f
diff --git a/app-misc/openhab-bin/files/openhab.env b/app-misc/openhab-bin/files/openhab.env
new file mode 100644
index 000000000000..2c68436c7e15
--- /dev/null
+++ b/app-misc/openhab-bin/files/openhab.env
@@ -0,0 +1,5 @@
+OPENHAB_HOME=/usr/share/openhab
+OPENHAB_CONF=/etc/openhab
+OPENHAB_RUNTIME=/usr/share/openhab/runtime
+OPENHAB_USERDATA=/var/lib/openhab
+OPENHAB_LOGDIR=/var/log/openhab
diff --git a/app-misc/openhab-bin/files/openhab.service b/app-misc/openhab-bin/files/openhab.service
new file mode 100644
index 000000000000..1a32a07bbc4d
--- /dev/null
+++ b/app-misc/openhab-bin/files/openhab.service
@@ -0,0 +1,26 @@
+[Unit]
+Description=openHAB - empowering the smart home
+Documentation=https://www.openhab.org/docs/
+Documentation=https://community.openhab.org
+Wants=network-online.target
+After=network-online.target
+
+[Service]
+EnvironmentFile=/etc/env.d/50openhab
+EnvironmentFile=-/etc/default/openhab
+
+User=openhab
+
+WorkingDirectory=/usr/share/openhab
+ExecStart=openhab daemon
+ExecStop=openhab stop
+
+SuccessExitStatus=0 143
+RestartSec=15
+Restart=on-failure
+TimeoutStopSec=120
+
+LimitNOFILE=102642
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-misc/openhab-bin/files/openhab.tmpfiles b/app-misc/openhab-bin/files/openhab.tmpfiles
new file mode 100644
index 000000000000..41292255957b
--- /dev/null
+++ b/app-misc/openhab-bin/files/openhab.tmpfiles
@@ -0,0 +1,8 @@
+# OpenHAB, or rather jrxtx, a fork of rxtx used by OpenHAB, require write access to
+# /run/lock to access devices on serial ports.
+# See also
+# - https://bugs.gentoo.org/416439
+# - https://bugs.gentoo.org/892517
+
+#Type Path Mode User Group Age Argument
+A+ /run/lock - - - - u:openhab:rwx
diff --git a/app-misc/openhab-bin/metadata.xml b/app-misc/openhab-bin/metadata.xml
new file mode 100644
index 000000000000..c25da2ef63e2
--- /dev/null
+++ b/app-misc/openhab-bin/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <name>Florian Schmaus</name>
+ <email>flow@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">openhab/openhab-core</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-misc/openhab-bin/openhab-bin-4.1.1.ebuild b/app-misc/openhab-bin/openhab-bin-4.1.1.ebuild
new file mode 100644
index 000000000000..9329ab0ccca3
--- /dev/null
+++ b/app-misc/openhab-bin/openhab-bin-4.1.1.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit systemd tmpfiles
+
+MY_PN=${PN%-bin}
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="An open-source automation software for your home"
+HOMEPAGE="https://www.openhab.org/"
+SRC_URI="
+ https://github.com/openhab/openhab-distro/releases/download/${PV}/${MY_P}.zip
+ https://raw.githubusercontent.com/openhab/openhab-linuxpkg/10061acd36524afb12a033fea6dcf142b399bf56/resources/usr/bin/openhab-cli
+ -> openhab-cli-2024-01-14
+"
+KEYWORDS="~amd64 ~arm64"
+
+LICENSE="EPL-2.0"
+SLOT="0"
+
+MY_JAVA_DEPEND=">=virtual/jre-17"
+
+# app-arch/zip: openhab-cli backup
+RDEPEND="
+ ${MY_JAVA_DEPEND}
+ acct-user/openhab
+ app-arch/zip
+ dev-java/java-config
+"
+
+BDEPEND="app-arch/unzip"
+
+S="${WORKDIR}"
+
+src_compile() {
+ :
+}
+
+src_install() {
+ # We use move here to preserve the executable bit on the files under
+ # openhab/runtime/bin.
+ domove() {
+ local source="${1}"
+ local target="${2}"
+
+ local dest="${ED}/${target}"
+
+ mkdir -p "${dest}" || die "Failed to create ${dest}"
+ mv "${source}"/* "${dest}" || die "Failed to move"
+ }
+
+ domove runtime /usr/share/openhab/runtime
+ domove conf /etc/openhab
+
+ domove userdata /var/lib/openhab
+ fowners -R openhab:openhab /var/lib/openhab
+
+ local dirs=(
+ /usr/share/openhab/addons
+ /var/log/openhab
+ )
+ local d
+ for d in "${dirs[@]}"; do
+ keepdir "${d}"
+ fowners openhab:openhab "${d}"
+ done
+
+ newenvd "${FILESDIR}"/openhab.env 50openhab
+
+ systemd_dounit "${FILESDIR}"/openhab.service
+ newtmpfiles "${FILESDIR}"/openhab.tmpfiles openhab.conf
+
+ newbin - openhab <<EOF
+#!/usr/bin/env bash
+set -eu
+
+if [[ -v JAVA_HOME_OVERRIDE ]]; then
+ JAVA_HOME="\${JAVA_HOME_OVERRIDE}"
+else
+ if ! GENTOO_JAVA_VM="\$(depend-java-query --get-vm '${MY_JAVA_DEPEND}')"; then
+ >&2 echo "Could not find Java VM for ${MY_JAVA_DEPEND}"
+ exit 1
+ fi
+
+ if ! JAVA_HOME_ASSIGNMENT=\$(java-config -P \${GENTOO_JAVA_VM} | grep JAVA_HOME); then
+ >&2 echo "Could not retrieve JAVA_HOME of \${GENTOO_JAVA_VM}"
+ exit 1
+ fi
+
+ eval \${JAVA_HOME_ASSIGNMENT}
+fi
+
+export JAVA_HOME
+exec /usr/share/openhab/runtime/bin/karaf "\$@"
+EOF
+ newbin "${DISTDIR}"/openhab-cli-2024-01-14 openhab-cli
+}
+
+pkg_postinst() {
+ tmpfiles_process openhab.conf
+}