diff --git a/Dockerfile b/Dockerfile index 8c4cd0f5440..6dae36bb24b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,7 @@ MAINTAINER Paulus Schoutsen #ENV INSTALL_LIBCEC no #ENV INSTALL_PHANTOMJS no #ENV INSTALL_COAP_CLIENT no +#ENV INSTALL_SSOCR no VOLUME /config diff --git a/virtualization/Docker/Dockerfile.dev b/virtualization/Docker/Dockerfile.dev index 2f40ea5f409..707e61fa37e 100644 --- a/virtualization/Docker/Dockerfile.dev +++ b/virtualization/Docker/Dockerfile.dev @@ -12,6 +12,7 @@ MAINTAINER Paulus Schoutsen #ENV INSTALL_LIBCEC no #ENV INSTALL_PHANTOMJS no #ENV INSTALL_COAP_CLIENT no +#ENV INSTALL_SSOCR no VOLUME /config @@ -48,4 +49,4 @@ RUN tox -e py36 --notest # Copy source COPY . . -CMD [ "python", "-m", "homeassistant", "--config", "/config" ] \ No newline at end of file +CMD [ "python", "-m", "homeassistant", "--config", "/config" ] diff --git a/virtualization/Docker/scripts/ssocr b/virtualization/Docker/scripts/ssocr new file mode 100755 index 00000000000..137f20d70c2 --- /dev/null +++ b/virtualization/Docker/scripts/ssocr @@ -0,0 +1,29 @@ +#!/bin/bash +# Sets up ssocr to support Seven Segments Display. + +# Stop on errors +set -e + +PACKAGES=( + libimlib2 libimlib2-dev +) + +apt-get install -y --no-install-recommends ${PACKAGES[@]} + +# Clone the latest code from GitHub +git clone --depth 1 https://github.com/auerswal/ssocr.git /usr/local/src/ssocr + +# Build ssocr +( + # Setup the build directory + cd /usr/local/src/ssocr + + # compile the library + make + + # Install the binaries/libraries to your local system (prefix is /usr/local) + make install + + # Cleanup + make clean +) diff --git a/virtualization/Docker/setup_docker_prereqs b/virtualization/Docker/setup_docker_prereqs index a6bf716312d..e3a2dd4acf5 100755 --- a/virtualization/Docker/setup_docker_prereqs +++ b/virtualization/Docker/setup_docker_prereqs @@ -10,6 +10,7 @@ INSTALL_FFMPEG="${INSTALL_FFMPEG:-yes}" INSTALL_LIBCEC="${INSTALL_LIBCEC:-yes}" INSTALL_PHANTOMJS="${INSTALL_PHANTOMJS:-yes}" INSTALL_COAP_CLIENT="${INSTALL_COAP_CLIENT:-yes}" +INSTALL_SSOCR="${INSTALL_SSOCR:-yes}" # Required debian packages for running hass or components PACKAGES=( @@ -62,6 +63,10 @@ if [ "$INSTALL_COAP_CLIENT" == "yes" ]; then virtualization/Docker/scripts/coap_client fi +if [ "$INSTALL_SSOCR" == "yes" ]; then + virtualization/Docker/scripts/ssocr +fi + # Remove packages apt-get remove -y --purge ${PACKAGES_DEV[@]} apt-get -y --purge autoremove