1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-25 05:26:47 +00:00
Files
core/virtualization/Docker/scripts/openalpr
Daniel Bowman 0ad9fcd8a0 Add -j$(nproc) make option to speed up build time (#15928)
Adding `-j$(nproc)` reduces build time on the external dependencies by
approximately 25%.
2018-08-14 21:28:29 +02:00

33 lines
809 B
Bash
Executable File

#!/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[@]}
cd /usr/src/app/
mkdir -p build && cd build
# Clone the latest code from GitHub
git clone --depth 1 https://github.com/openalpr/openalpr.git openalpr
# Setup the build directory
cd 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 -j$(nproc)
# Install the binaries/libraries to your local system (prefix is /usr/local)
make install