diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7d631893a..908fd1d26 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -185,5 +185,20 @@ jobs: parameters: addon: 'transmission-magnet-redirect' arch: '--amd64' + ${{ if ne(variables['Build.SourceBranchName'], 'master') }}: + additionalArgs: --test + +- job: 'hyperion' + condition: and(succeeded('Hadolint'), succeeded('JQ')) + dependsOn: + - 'Hadolint' + - 'JQ' + pool: + vmImage: 'ubuntu-16.04' + steps: + - template: .azure-pipelines/addon-template.yml + parameters: + addon: 'hyperion' + arch: '--armhf --amd64 --aarch64' ${{ if ne(variables['Build.SourceBranchName'], 'master') }}: additionalArgs: --test \ No newline at end of file diff --git a/hyperion/Dockerfile b/hyperion/Dockerfile new file mode 100644 index 000000000..f17a28a99 --- /dev/null +++ b/hyperion/Dockerfile @@ -0,0 +1,33 @@ +ARG BUILD_FROM=hassioaddons/debian-base +# hadolint ignore=DL3006 +FROM ${BUILD_FROM} + +ARG BUILD_ARCH=amd64 +ARG RELEASE + +# Set shell +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + libjpeg62-turbo=1:1.5.2-2+b1 \ + libavahi-compat-libdnssd1=0.7-4+b1 \ + libdbus-1-3=1.12.16-1 \ + libqt5sql5=5.11.3+dfsg1-1+deb10u3 \ + libqt5serialport5=5.11.3-2 \ + libqt5network5=5.11.3+dfsg1-1+deb10u3 \ + libqt5widgets5=5.11.3+dfsg1-1+deb10u3 \ + libqt5gui5=5.11.3+dfsg1-1+deb10u3 \ + libqt5core5a=5.11.3+dfsg1-1+deb10u3 \ + libusb-1.0=2:1.0.22-2 \ + && if [[ "${BUILD_ARCH}" = "amd64" ]]; then ARCH="Linux-x86_64"; fi \ + && if [[ "${BUILD_ARCH}" = "aarch64" ]]; then ARCH="Linux-aarch64"; fi \ + && curl -fsSL https://github.com/hyperion-project/hyperion.ng/releases/download/${RELEASE}/Hyperion-${RELEASE}-${ARCH}.deb > /tmp/Hyperion-${RELEASE}-${ARCH}.deb \ + && dpkg -i /tmp/Hyperion-${RELEASE}-${ARCH}.deb \ + && rm -fr \ + /tmp/* \ + /var/{cache,log}/* \ + /var/lib/apt/lists/* + +# copy local files +COPY root/ / diff --git a/hyperion/README.md b/hyperion/README.md new file mode 100644 index 000000000..736183c88 --- /dev/null +++ b/hyperion/README.md @@ -0,0 +1,25 @@ +# Hassio Add-ons by petersendev: hyperion + +## About + +[Hyperion](https://github.com/hyperion-project/hyperion.ng) is an opensource [Bias or Ambient Lighting](https://en.wikipedia.org/wiki/Bias_lighting) implementation which you might know from TV manufacturers. It supports many LED devices and video grabbers. + +## Installation + +The installation of this add-on is pretty straightforward and not different in +comparison to installing any other Hass.io add-on. + +1. [Add my Hass.io add-ons repository][repository] to your Hass.io instance. +1. Install this add-on. +1. Click the `Save` button to store your configuration. +1. Start the add-on. +1. Check the logs of the add-on to see if everything went well. +1. Carefully configure the add-on to your preferences, see the official documentation for for that. + + +## Configuration + +Webui can be found at `:8090`. + + +[repository]: https://github.com/petersendev/hassio-addons \ No newline at end of file diff --git a/hyperion/build.json b/hyperion/build.json new file mode 100644 index 000000000..ffdd1d247 --- /dev/null +++ b/hyperion/build.json @@ -0,0 +1,11 @@ +{ + "build_from": { + "armhf": "hassioaddons/debian-base-armhf:3.2.0", + "aarch64": "hassioaddons/debian-base-aarch64:3.2.0", + "amd64": "hassioaddons/debian-base:3.2.0" + }, + "squash": false, + "args": { + "RELEASE": "2.0.0-alpha.6" + } +} diff --git a/hyperion/config.json b/hyperion/config.json new file mode 100644 index 000000000..17b0ef9c7 --- /dev/null +++ b/hyperion/config.json @@ -0,0 +1,44 @@ +{ + "name": "hyperion", + "version": "0.1.0", + "slug": "hyperion", + "legacy": false, + "maintenance": { + "github_release": "https://github.com/hyperion-project/hyperion.ng", + "include_prerelease": true, + "version_regex": "(\\d+\\.\\d+\\.?\\d*-?\\w*.?\\d*)" + }, + "description": "Ambient Ligting implementation", + "url": "https://github.com/petersendev/hassio-addons/hyperion", + "startup": "services", + "arch": [ + "aarch64", + "amd64" + ], + "ports": { + "8090/tcp": 8090, + "19333/tcp": 19333, + "19400/tcp": 19400, + "19444/tcp": 19444, + "19445/tcp": 19445 + }, + "ports_description": { + "8090/tcp": "web interface", + "19333/tcp": "Boblight Server", + "19400/tcp": "Flatbuffers Server", + "19444/tcp": "JSON Server", + "19445/tcp": "Protocol Buffers Server" + }, + "map": [ + "config:rw", + "share:rw", + "ssl" + ], + "webui": "http://[HOST]:[PORT:8090]", + "boot": "auto", + "options": { + }, + "schema": { + }, + "image": "petersendev/hassio-hyperion-{arch}" +} \ No newline at end of file diff --git a/hyperion/icon.png b/hyperion/icon.png new file mode 100644 index 000000000..e9604c69f Binary files /dev/null and b/hyperion/icon.png differ diff --git a/hyperion/logo.png b/hyperion/logo.png new file mode 100644 index 000000000..e9604c69f Binary files /dev/null and b/hyperion/logo.png differ diff --git a/hyperion/root/etc/cont-init.d/20-folders b/hyperion/root/etc/cont-init.d/20-folders new file mode 100644 index 000000000..1f2dc67b9 --- /dev/null +++ b/hyperion/root/etc/cont-init.d/20-folders @@ -0,0 +1,7 @@ +#!/usr/bin/with-contenv bash + +if [ ! -d /config/hyperion ]; then + echo "Creating /config/hyperion" + mkdir -p /config/hyperion + #chown -R abc:abc /config/hyperion +fi \ No newline at end of file diff --git a/hyperion/root/etc/services.d/hyperion/finish b/hyperion/root/etc/services.d/hyperion/finish new file mode 100644 index 000000000..000f80a10 --- /dev/null +++ b/hyperion/root/etc/services.d/hyperion/finish @@ -0,0 +1,6 @@ +#!/usr/bin/execlineb -S0 + +if -n { s6-test $# -ne 0 } +if -n { s6-test ${1} -eq 256 } + +s6-svscanctl -t /var/run/s6/services \ No newline at end of file diff --git a/hyperion/root/etc/services.d/hyperion/run b/hyperion/root/etc/services.d/hyperion/run new file mode 100644 index 000000000..046563c1b --- /dev/null +++ b/hyperion/root/etc/services.d/hyperion/run @@ -0,0 +1,5 @@ +#!/usr/bin/with-contenv bashio + +bashio::log.info 'Starting hyperiond...' + +exec hyperiond -u /config/hyperion \ No newline at end of file