28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
ARG BUILD_VERSION
|
|
FROM homeassistant/amd64-homeassistant:$BUILD_VERSION
|
|
|
|
RUN apk --no-cache add usbutils \
|
|
&& pip3 install --no-cache-dir --no-index --only-binary=:all: --find-links "${WHEELS_LINKS}" \
|
|
-c /usr/src/homeassistant/homeassistant/package_constraints.txt \
|
|
bluepy \
|
|
pybluez \
|
|
pygatt[GATTTOOL]
|
|
|
|
##
|
|
# Build libcec for HDMI-CEC
|
|
ARG LIBCEC_VERSION=4.0.4
|
|
RUN apk add --no-cache eudev-libs p8-platform \
|
|
&& apk add --no-cache --virtual .build-dependencies \
|
|
build-base cmake eudev-dev swig p8-platform-dev \
|
|
&& git clone --depth 1 -b libcec-${LIBCEC_VERSION} https://github.com/Pulse-Eight/libcec /usr/src/libcec \
|
|
&& mkdir -p /usr/src/libcec/build \
|
|
&& cd /usr/src/libcec/build \
|
|
&& cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local \
|
|
-DPYTHON_LIBRARY="/usr/local/lib/libpython3.7m.so" \
|
|
-DPYTHON_INCLUDE_DIR="/usr/local/include/python3.7m" .. \
|
|
&& make -j$(nproc) \
|
|
&& make install \
|
|
&& echo "cec" > "/usr/local/lib/python3.7/site-packages/cec.pth" \
|
|
&& apk del .build-dependencies \
|
|
&& rm -rf /usr/src/libcec
|