Move docker installation scripts to virtualization/Docker path. Splits out openalpr to seperate script. (#5676)
This commit is contained in:
parent
89ec752064
commit
8247acb7b9
10 changed files with 155 additions and 132 deletions
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
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue