mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Move docker installation scripts to virtualization/Docker path. Splits out openalpr to seperate script. (#5676)
This commit is contained in:
committed by
Paulus Schoutsen
parent
89ec752064
commit
8247acb7b9
16
virtualization/Docker/scripts/ffmpeg
Executable file
16
virtualization/Docker/scripts/ffmpeg
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
# Sets up ffmpeg.
|
||||
|
||||
# Stop on errors
|
||||
set -e
|
||||
|
||||
PACKAGES=(
|
||||
ffmpeg
|
||||
)
|
||||
|
||||
# Add jessie-backports
|
||||
echo "Adding jessie-backports"
|
||||
echo "deb http://deb.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
|
||||
apt-get update
|
||||
|
||||
apt-get install -y --no-install-recommends -t jessie-backports ${PACKAGES[@]}
|
||||
47
virtualization/Docker/scripts/libcec
Executable file
47
virtualization/Docker/scripts/libcec
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
# Sets up libcec.
|
||||
# Dependencies that need to be installed:
|
||||
# apt-get install cmake libudev-dev libxrandr-dev swig
|
||||
|
||||
# Stop on errors
|
||||
set -e
|
||||
|
||||
# Load required information about the current python environment
|
||||
PYTHON_LIBDIR=$(python -c 'from distutils import sysconfig; print(sysconfig.get_config_var("LIBDIR"))')
|
||||
PYTHON_LDLIBRARY=$(python -c 'from distutils import sysconfig; print(sysconfig.get_config_var("LDLIBRARY"))')
|
||||
PYTHON_LIBRARY="${PYTHON_LIBDIR}/${PYTHON_LDLIBRARY}"
|
||||
PYTHON_INCLUDE_DIR=$(python -c 'from distutils import sysconfig; print(sysconfig.get_python_inc())')
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
mkdir -p build && cd build
|
||||
|
||||
if [ ! -d libcec ]; then
|
||||
git clone --branch release --depth 1 https://github.com/Pulse-Eight/libcec.git
|
||||
fi
|
||||
|
||||
cd libcec
|
||||
git checkout release
|
||||
git pull
|
||||
git submodule update --init src/platform
|
||||
|
||||
# Build libcec platform libs
|
||||
(
|
||||
mkdir -p src/platform/build
|
||||
cd src/platform/build
|
||||
cmake ..
|
||||
make
|
||||
make install
|
||||
)
|
||||
|
||||
# Build libcec
|
||||
(
|
||||
mkdir -p build && cd build
|
||||
|
||||
cmake \
|
||||
-DPYTHON_LIBRARY="${PYTHON_LIBRARY}" \
|
||||
-DPYTHON_INCLUDE_DIR="${PYTHON_INCLUDE_DIR}" \
|
||||
..
|
||||
make
|
||||
make install
|
||||
ldconfig
|
||||
)
|
||||
29
virtualization/Docker/scripts/openalpr
Executable file
29
virtualization/Docker/scripts/openalpr
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
# Sets up openalpr.
|
||||
|
||||
# Stop on errors
|
||||
set -e
|
||||
|
||||
PACKAGES=(
|
||||
# homeassistant.components.image_processing.openalpr_local
|
||||
libopencv-dev libtesseract-dev libleptonica-dev liblog4cplus-dev
|
||||
)
|
||||
|
||||
apt-get install -y --no-install-recommends ${PACKAGES[@]}
|
||||
|
||||
# Clone the latest code from GitHub
|
||||
git clone https://github.com/openalpr/openalpr.git /usr/local/src/openalpr
|
||||
|
||||
# Setup the build directory
|
||||
cd /usr/local/src/openalpr/src
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
# Setup the compile environment
|
||||
cmake -DWITH_TEST=FALSE -DWITH_BINDING_JAVA=FALSE --DWITH_BINDING_PYTHON=FALSE --DWITH_BINDING_GO=FALSE -DWITH_DAEMON=FALSE -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ..
|
||||
|
||||
# compile the library
|
||||
make
|
||||
|
||||
# Install the binaries/libraries to your local system (prefix is /usr/local)
|
||||
make install
|
||||
15
virtualization/Docker/scripts/phantomjs
Executable file
15
virtualization/Docker/scripts/phantomjs
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# Sets up phantomjs.
|
||||
|
||||
# Stop on errors
|
||||
set -e
|
||||
|
||||
PHANTOMJS_VERSION="2.1.1"
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
mkdir -p build && cd build
|
||||
|
||||
curl -LSO https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2
|
||||
tar -xjf phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2
|
||||
mv phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin/phantomjs /usr/bin/phantomjs
|
||||
/usr/bin/phantomjs -v
|
||||
32
virtualization/Docker/scripts/python_openzwave
Executable file
32
virtualization/Docker/scripts/python_openzwave
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
# Sets up python-openzwave.
|
||||
# Dependencies that need to be installed:
|
||||
# apt-get install cython3 libudev-dev python3-sphinx python3-setuptools
|
||||
|
||||
# Stop on errors
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
if [ ! -d build ]; then
|
||||
mkdir build
|
||||
fi
|
||||
|
||||
cd build
|
||||
|
||||
if [ -d python-openzwave ]; then
|
||||
cd python-openzwave
|
||||
git pull --recurse-submodules=yes
|
||||
git submodule update --init --recursive
|
||||
else
|
||||
git clone --branch python3 --recursive --depth 1 https://github.com/OpenZWave/python-openzwave.git
|
||||
cd python-openzwave
|
||||
fi
|
||||
|
||||
git checkout python3
|
||||
pip3 install --upgrade cython==0.24.1
|
||||
PYTHON_EXEC=`which python3` make build
|
||||
PYTHON_EXEC=`which python3` make install
|
||||
|
||||
mkdir -p /usr/local/share/python-openzwave
|
||||
cp -R openzwave/config /usr/local/share/python-openzwave/config
|
||||
17
virtualization/Docker/scripts/tellstick
Executable file
17
virtualization/Docker/scripts/tellstick
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# Sets up tellstick.
|
||||
|
||||
# Stop on errors
|
||||
set -e
|
||||
|
||||
PACKAGES=(
|
||||
# homeassistant.components.tellstick
|
||||
libtelldus-core2
|
||||
)
|
||||
|
||||
# Add Tellstick repository
|
||||
echo "deb http://download.telldus.com/debian/ stable main" >> /etc/apt/sources.list.d/telldus.list
|
||||
wget -qO - http://download.telldus.se/debian/telldus-public.key | apt-key add -
|
||||
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends ${PACKAGES[@]}
|
||||
Reference in New Issue
Block a user