Skip to content

Commit

Permalink
Update Machine support of python 3.9 / Kernel CEC (home-assistant#51637)
Browse files Browse the repository at this point in the history
  • Loading branch information
pvizeli authored Jun 8, 2021
1 parent 2eb6f16 commit 29a0208
Show file tree
Hide file tree
Showing 18 changed files with 5 additions and 491 deletions.
10 changes: 5 additions & 5 deletions build.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"image": "homeassistant/{arch}-homeassistant",
"shadow_repository": "ghcr.io/home-assistant",
"build_from": {
"aarch64": "ghcr.io/home-assistant/aarch64-homeassistant-base:2021.06.0",
"armhf": "ghcr.io/home-assistant/armhf-homeassistant-base:2021.06.0",
"armv7": "ghcr.io/home-assistant/armv7-homeassistant-base:2021.06.0",
"amd64": "ghcr.io/home-assistant/amd64-homeassistant-base:2021.06.0",
"i386": "ghcr.io/home-assistant/i386-homeassistant-base:2021.06.0"
"aarch64": "ghcr.io/home-assistant/aarch64-homeassistant-base:2021.06.1",
"armhf": "ghcr.io/home-assistant/armhf-homeassistant-base:2021.06.1",
"armv7": "ghcr.io/home-assistant/armv7-homeassistant-base:2021.06.1",
"amd64": "ghcr.io/home-assistant/amd64-homeassistant-base:2021.06.1",
"i386": "ghcr.io/home-assistant/i386-homeassistant-base:2021.06.1"
},
"labels": {
"io.hass.type": "core",
Expand Down
28 changes: 0 additions & 28 deletions machine/generic-x86-64
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,3 @@ FROM homeassistant/amd64-homeassistant:$BUILD_VERSION
RUN apk --no-cache add \
libva-intel-driver \
usbutils

##
# Build libcec for HDMI-CEC
ARG LIBCEC_VERSION=6.0.2
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 \
linux-headers \
&& git clone --depth 1 -b libcec-${LIBCEC_VERSION} https://github.com/Pulse-Eight/libcec /usr/src/libcec \
&& cd /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.8.so" \
-DPYTHON_INCLUDE_DIR="/usr/local/include/python3.8" \
-DHAVE_LINUX_API=1 \
.. \
&& make -j$(nproc) \
&& make install \
&& echo "cec" > "/usr/local/lib/python3.8/site-packages/cec.pth" \
&& apk del .build-dependencies \
&& rm -rf /usr/src/libcec*
28 changes: 0 additions & 28 deletions machine/intel-nuc
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,3 @@ FROM homeassistant/amd64-homeassistant:$BUILD_VERSION
RUN apk --no-cache add \
libva-intel-driver \
usbutils

##
# Build libcec for HDMI-CEC
ARG LIBCEC_VERSION=6.0.2
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 \
linux-headers \
&& git clone --depth 1 -b libcec-${LIBCEC_VERSION} https://github.com/Pulse-Eight/libcec /usr/src/libcec \
&& cd /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.8.so" \
-DPYTHON_INCLUDE_DIR="/usr/local/include/python3.8" \
-DHAVE_LINUX_API=1 \
.. \
&& make -j$(nproc) \
&& make install \
&& echo "cec" > "/usr/local/lib/python3.8/site-packages/cec.pth" \
&& apk del .build-dependencies \
&& rm -rf /usr/src/libcec*
29 changes: 0 additions & 29 deletions machine/odroid-c2
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,3 @@ FROM homeassistant/aarch64-homeassistant:$BUILD_VERSION

RUN apk --no-cache add \
usbutils

##
# Build libcec for HDMI-CEC
ARG LIBCEC_VERSION=6.0.2
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 \
linux-headers \
&& git clone --depth 1 -b libcec-${LIBCEC_VERSION} https://github.com/Pulse-Eight/libcec /usr/src/libcec \
&& cd /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.8.so" \
-DPYTHON_INCLUDE_DIR="/usr/local/include/python3.8" \
-DHAVE_LINUX_API=1 \
-DHAVE_AOCEC_API=1 \
.. \
&& make -j$(nproc) \
&& make install \
&& echo "cec" > "/usr/local/lib/python3.8/site-packages/cec.pth" \
&& apk del .build-dependencies \
&& rm -rf /usr/src/libcec*
29 changes: 0 additions & 29 deletions machine/odroid-c4
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,3 @@ FROM homeassistant/aarch64-homeassistant:$BUILD_VERSION

RUN apk --no-cache add \
usbutils

##
# Build libcec for HDMI-CEC
ARG LIBCEC_VERSION=6.0.2
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 \
linux-headers \
&& git clone --depth 1 -b libcec-${LIBCEC_VERSION} https://github.com/Pulse-Eight/libcec /usr/src/libcec \
&& cd /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.8.so" \
-DPYTHON_INCLUDE_DIR="/usr/local/include/python3.8" \
-DHAVE_LINUX_API=1 \
-DHAVE_AOCEC_API=1 \
.. \
&& make -j$(nproc) \
&& make install \
&& echo "cec" > "/usr/local/lib/python3.8/site-packages/cec.pth" \
&& apk del .build-dependencies \
&& rm -rf /usr/src/libcec*
29 changes: 0 additions & 29 deletions machine/odroid-n2
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,3 @@ FROM homeassistant/aarch64-homeassistant:$BUILD_VERSION

RUN apk --no-cache add \
usbutils

##
# Build libcec for HDMI-CEC
ARG LIBCEC_VERSION=6.0.2
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 \
linux-headers \
&& git clone --depth 1 -b libcec-${LIBCEC_VERSION} https://github.com/Pulse-Eight/libcec /usr/src/libcec \
&& cd /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.8.so" \
-DPYTHON_INCLUDE_DIR="/usr/local/include/python3.8" \
-DHAVE_LINUX_API=1 \
-DHAVE_AOCEC_API=1 \
.. \
&& make -j$(nproc) \
&& make install \
&& echo "cec" > "/usr/local/lib/python3.8/site-packages/cec.pth" \
&& apk del .build-dependencies \
&& rm -rf /usr/src/libcec*
29 changes: 0 additions & 29 deletions machine/odroid-xu
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,3 @@ FROM homeassistant/armv7-homeassistant:$BUILD_VERSION

RUN apk --no-cache add \
usbutils

##
# Build libcec for HDMI-CEC
ARG LIBCEC_VERSION=6.0.2
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 \
linux-headers \
&& git clone --depth 1 -b libcec-${LIBCEC_VERSION} https://github.com/Pulse-Eight/libcec /usr/src/libcec \
&& cd /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.8.so" \
-DPYTHON_INCLUDE_DIR="/usr/local/include/python3.8" \
-DHAVE_LINUX_API=1 \
-DHAVE_EXYNOS_API=1 \
.. \
&& make -j$(nproc) \
&& make install \
&& echo "cec" > "/usr/local/lib/python3.8/site-packages/cec.pth" \
&& apk del .build-dependencies \
&& rm -rf /usr/src/libcec*
28 changes: 0 additions & 28 deletions machine/qemuarm
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,3 @@ FROM homeassistant/armhf-homeassistant:$BUILD_VERSION

RUN apk --no-cache add \
usbutils

##
# Build libcec for HDMI-CEC
ARG LIBCEC_VERSION=6.0.2
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 \
linux-headers \
&& git clone --depth 1 -b libcec-${LIBCEC_VERSION} https://github.com/Pulse-Eight/libcec /usr/src/libcec \
&& cd /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.8.so" \
-DPYTHON_INCLUDE_DIR="/usr/local/include/python3.8" \
-DHAVE_LINUX_API=1 \
.. \
&& make -j$(nproc) \
&& make install \
&& echo "cec" > "/usr/local/lib/python3.8/site-packages/cec.pth" \
&& apk del .build-dependencies \
&& rm -rf /usr/src/libcec*
28 changes: 0 additions & 28 deletions machine/qemuarm-64
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,3 @@ FROM homeassistant/aarch64-homeassistant:$BUILD_VERSION

RUN apk --no-cache add \
usbutils

##
# Build libcec for HDMI-CEC
ARG LIBCEC_VERSION=6.0.2
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 \
linux-headers \
&& git clone --depth 1 -b libcec-${LIBCEC_VERSION} https://github.com/Pulse-Eight/libcec /usr/src/libcec \
&& cd /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.8.so" \
-DPYTHON_INCLUDE_DIR="/usr/local/include/python3.8" \
-DHAVE_LINUX_API=1 \
.. \
&& make -j$(nproc) \
&& make install \
&& echo "cec" > "/usr/local/lib/python3.8/site-packages/cec.pth" \
&& apk del .build-dependencies \
&& rm -rf /usr/src/libcec*
28 changes: 0 additions & 28 deletions machine/qemux86
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,3 @@ FROM homeassistant/i386-homeassistant:$BUILD_VERSION

RUN apk --no-cache add \
usbutils

##
# Build libcec for HDMI-CEC
ARG LIBCEC_VERSION=6.0.2
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 \
linux-headers \
&& git clone --depth 1 -b libcec-${LIBCEC_VERSION} https://github.com/Pulse-Eight/libcec /usr/src/libcec \
&& cd /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.8.so" \
-DPYTHON_INCLUDE_DIR="/usr/local/include/python3.8" \
-DHAVE_LINUX_API=1 \
.. \
&& make -j$(nproc) \
&& make install \
&& echo "cec" > "/usr/local/lib/python3.8/site-packages/cec.pth" \
&& apk del .build-dependencies \
&& rm -rf /usr/src/libcec*
28 changes: 0 additions & 28 deletions machine/qemux86-64
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,3 @@ FROM homeassistant/amd64-homeassistant:$BUILD_VERSION

RUN apk --no-cache add \
usbutils

##
# Build libcec for HDMI-CEC
ARG LIBCEC_VERSION=6.0.2
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 \
linux-headers \
&& git clone --depth 1 -b libcec-${LIBCEC_VERSION} https://github.com/Pulse-Eight/libcec /usr/src/libcec \
&& cd /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.8.so" \
-DPYTHON_INCLUDE_DIR="/usr/local/include/python3.8" \
-DHAVE_LINUX_API=1 \
.. \
&& make -j$(nproc) \
&& make install \
&& echo "cec" > "/usr/local/lib/python3.8/site-packages/cec.pth" \
&& apk del .build-dependencies \
&& rm -rf /usr/src/libcec*
29 changes: 0 additions & 29 deletions machine/raspberrypi
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,3 @@ RUN ln -sv /opt/vc/bin/raspistill /usr/local/bin/raspistill \
&& ln -sv /opt/vc/bin/raspivid /usr/local/bin/raspivid \
&& ln -sv /opt/vc/bin/raspividyuv /usr/local/bin/raspividyuv \
&& ln -sv /opt/vc/bin/raspiyuv /usr/local/bin/raspiyuv

##
# Build libcec with RPi support for HDMI-CEC
ARG LIBCEC_VERSION=6.0.2
RUN apk add --no-cache \
eudev-libs \
p8-platform \
&& apk add --no-cache --virtual .build-dependencies \
build-base \
cmake \
eudev-dev \
swig \
raspberrypi-dev \
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 \
-DRPI_INCLUDE_DIR=/opt/vc/include \
-DRPI_LIB_DIR=/opt/vc/lib \
-DPYTHON_LIBRARY="/usr/local/lib/libpython3.8.so" \
-DPYTHON_INCLUDE_DIR="/usr/local/include/python3.8" \
.. \
&& make -j$(nproc) \
&& make install \
&& echo "cec" > "/usr/local/lib/python3.8/site-packages/cec.pth" \
&& apk del .build-dependencies \
&& rm -rf /usr/src/libcec
ENV LD_LIBRARY_PATH=/opt/vc/lib:${LD_LIBRARY_PATH}
Loading

0 comments on commit 29a0208

Please sign in to comment.