Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ssocr to docker to support Seven Segments Display #8028

Merged
merged 3 commits into from
Jun 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ MAINTAINER Paulus Schoutsen <Paulus@PaulusSchoutsen.nl>
#ENV INSTALL_LIBCEC no
#ENV INSTALL_PHANTOMJS no
#ENV INSTALL_COAP_CLIENT no
#ENV INSTALL_SSOCR no

VOLUME /config

Expand Down
3 changes: 2 additions & 1 deletion virtualization/Docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ MAINTAINER Paulus Schoutsen <Paulus@PaulusSchoutsen.nl>
#ENV INSTALL_LIBCEC no
#ENV INSTALL_PHANTOMJS no
#ENV INSTALL_COAP_CLIENT no
#ENV INSTALL_SSOCR no

VOLUME /config

Expand Down Expand Up @@ -48,4 +49,4 @@ RUN tox -e py36 --notest
# Copy source
COPY . .

CMD [ "python", "-m", "homeassistant", "--config", "/config" ]
CMD [ "python", "-m", "homeassistant", "--config", "/config" ]
29 changes: 29 additions & 0 deletions virtualization/Docker/scripts/ssocr
Original file line number Diff line number Diff line change
@@ -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
)
5 changes: 5 additions & 0 deletions virtualization/Docker/setup_docker_prereqs
Original file line number Diff line number Diff line change
Expand Up @@ -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=(
Expand Down Expand Up @@ -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
Expand Down