Skip to content

Add libCEC #190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 34 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
ARG BUILD_FROM
FROM ${BUILD_FROM}

# Add Hass.io wheels repository
ARG BUILD_ARCH
ARG \
BUILD_ARCH \
SSOCR_VERSION \
ARPSCAN_VERSION \
LIBCEC_VERSION \
PICOTTS_HASH \
TELLDUS_COMMIT

# Add Home Assistant wheels repository
ENV WHEELS_LINKS=https://wheels.home-assistant.io/alpine-3.13/${BUILD_ARCH}/

####
Expand Down Expand Up @@ -75,7 +82,6 @@ RUN \
WORKDIR /usr/src/

# ssocr
ARG SSOCR_VERSION
RUN \
apk add --no-cache \
imlib2 \
Expand All @@ -90,7 +96,6 @@ RUN \
&& rm -rf /usr/src/ssocr

# arp-scan
ARG ARPSCAN_VERSION
RUN \
apk add --no-cache \
libpcap \
Expand All @@ -108,8 +113,32 @@ RUN \
&& apk del .build-dependencies \
&& rm -rf /usr/src/arp-scan

# libcec
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 \
&& mkdir -p libcec/build \
&& cd libcec/build \
&& cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local \
-DPYTHON_LIBRARY="/usr/local/lib/libpython3.9.so" \
-DPYTHON_INCLUDE_DIR="/usr/local/include/python3.9" \
-DHAVE_LINUX_API=1 \
.. \
&& make -j$(nproc) \
&& make install \
&& echo "cec" > "/usr/local/lib/python3.9/site-packages/cec.pth" \
&& apk del .build-dependencies \
&& rm -rf /usr/src/libcec

# PicoTTS - it has no specific version - commit should be taken from build.json
ARG PICOTTS_HASH
RUN apk add --no-cache \
popt \
&& apk add --no-cache --virtual .build-dependencies \
Expand All @@ -130,7 +159,6 @@ RUN apk add --no-cache \
&& rm -rf /usr/src/pico

# Telldus
ARG TELLDUS_COMMIT
RUN \
apk add --no-cache \
confuse \
Expand Down
1 change: 1 addition & 0 deletions build.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"args": {
"SSOCR_VERSION": "2.21.0",
"ARPSCAN_VERSION": "1.9.7",
"LIBCEC_VERSION": "6.0.2",
"TELLDUS_COMMIT": "2598bbed16ffd701f2a07c99582f057a3decbaf3",
"PICOTTS_HASH": "e3ba46009ee868911fa0b53db672a55f9cc13b1c"
}
Expand Down