-
Notifications
You must be signed in to change notification settings - Fork 73
/
Dockerfile
150 lines (141 loc) · 3.91 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
ARG BUILD_FROM
FROM ${BUILD_FROM}
ARG \
BUILD_ARCH \
QEMU_CPU \
SSOCR_VERSION \
LIBCEC_VERSION \
PICOTTS_HASH \
TELLDUS_COMMIT
##
# Install component packages
RUN \
apk add --no-cache \
bluez \
bluez-deprecated \
bluez-libs \
curl \
eudev-libs \
ffmpeg \
iperf3 \
git \
grep \
hwdata-usb \
libgpiod \
libturbojpeg \
libpulse \
libzbar \
mariadb-connector-c \
net-tools \
nmap \
openssh-client \
pianobar \
pulseaudio-alsa \
socat
####
## Install pip module for component/homeassistant
COPY requirements.txt /usr/src/
RUN \
pip3 install --only-binary=:all: \
-r /usr/src/requirements.txt \
&& rm -f /usr/src/requirements.txt
####
## Build library
WORKDIR /usr/src/
# ssocr
RUN \
apk add --no-cache \
imlib2 \
&& apk add --no-cache --virtual .build-dependencies \
build-base \
imlib2-dev \
&& git clone --depth 1 -b "v${SSOCR_VERSION}" https://github.com/auerswal/ssocr \
&& cd ssocr \
&& make -j"$(nproc)" \
&& make install \
&& apk del .build-dependencies \
&& rm -rf /usr/src/ssocr
# libcec
COPY patches/libcec-fix-null-return.patch /usr/src/
COPY patches/libcec-python313.patch /usr/src/
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 \
&& cd libcec \
&& git apply ../libcec-fix-null-return.patch \
&& git apply ../libcec-python313.patch \
&& mkdir build \
&& cd build \
&& cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local \
-DPYTHON_LIBRARY="/usr/local/lib/libpython3.13.so" \
-DPYTHON_INCLUDE_DIR="/usr/local/include/python3.13" \
-DHAVE_LINUX_API=1 \
.. \
&& make -j"$(nproc)" \
&& make install \
&& echo "cec" > "/usr/local/lib/python3.13/site-packages/cec.pth" \
&& apk del .build-dependencies \
&& rm -rf \
/usr/src/libcec \
/usr/src/libcec-fix-null-return.patch \
/usr/src/libcec-python313.patch
# PicoTTS - it has no specific version - commit should be taken from build.json
RUN apk add --no-cache \
popt \
&& apk add --no-cache --virtual .build-dependencies \
automake \
autoconf \
libtool \
popt-dev \
build-base \
&& git clone https://github.com/naggety/picotts.git pico \
&& cd pico/pico \
&& git reset --hard "${PICOTTS_HASH}" \
&& ./autogen.sh \
&& ./configure \
--disable-static \
&& make \
&& make install \
&& apk del .build-dependencies \
&& rm -rf /usr/src/pico
# Telldus
COPY patches/telldus-fix-gcc-11-issues.patch /usr/src/
COPY patches/telldus-fix-alpine-3-17-issues.patch /usr/src/
RUN \
apk add --no-cache \
confuse \
libftdi1 \
&& apk add --no-cache --virtual .build-dependencies \
argp-standalone \
build-base \
cmake \
confuse-dev \
doxygen \
libftdi1-dev \
&& git clone https://github.com/telldus/telldus \
&& cd telldus \
&& git reset --hard "${TELLDUS_COMMIT}" \
&& git apply ../telldus-fix-gcc-11-issues.patch \
&& git apply ../telldus-fix-alpine-3-17-issues.patch \
&& cd telldus-core \
&& cmake . -DBUILD_LIBTELLDUS-CORE=ON \
-DBUILD_TDADMIN=OFF -DBUILD_TDTOOL=OFF -DGENERATE_MAN=OFF \
-DFORCE_COMPILE_FROM_TRUNK=ON \
&& make -j"$(nproc)" \
&& make install \
&& apk del .build-dependencies \
&& rm -rf \
/usr/src/telldus \
/usr/src/telldus-fix-gcc-11-issues.patch \
/usr/src/telldus-fix-alpine-3-17-issues.patch
###
# Base S6-Overlay
COPY rootfs /