forked from home-assistant/addons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (44 loc) · 1.21 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
ARG BUILD_FROM
FROM $BUILD_FROM
ENV LANG C.UTF-8
# Install Telldus library for TellStick (using same approach as in hassio docker installation)
ARG TELLDUS_COMMIT
RUN \
set -x \
&& apk add --no-cache \
confuse \
libftdi1 \
libstdc++ \
socat \
&& apk add --no-cache --virtual .build-dependencies \
argp-standalone \
build-base \
cmake \
confuse-dev \
doxygen \
gcc \
git \
libftdi1-dev \
&& ln -s /usr/include/libftdi1/ftdi.h /usr/include/ftdi.h \
&& mkdir -p /usr/src \
&& cd /usr/src \
&& git clone https://github.com/telldus/telldus \
&& cd telldus/telldus-core \
&& git reset --hard ${TELLDUS_COMMIT} \
&& sed -i \
"/\<sys\/socket.h\>/a \#include \<sys\/select.h\>" \
common/Socket_unix.cpp \
&& cmake . \
-DBUILD_LIBTELLDUS-CORE=ON \
-DBUILD_TDADMIN=OFF \
-DBUILD_TDTOOL=ON \
-DGENERATE_MAN=OFF \
-DFORCE_COMPILE_FROM_TRUNK=ON \
-DFTDI_LIBRARY=/usr/lib/libftdi1.so \
&& make \
&& make install \
&& apk del .build-dependencies \
&& rm -rf /usr/src/telldus
# Copy data for add-on
COPY data/run.sh /
CMD [ "/run.sh" ]