1
- FROM lsiobase/alpine:3.6
2
- MAINTAINER saarg
1
+ FROM lsiobase/alpine:3.7
3
2
4
3
# set version label
5
4
ARG BUILD_DATE
6
5
ARG VERSION
7
6
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
7
+ LABEL maintainer="saarg"
8
8
9
- # Environment settings
9
+ # environment settings
10
10
ENV HOME="/config"
11
11
12
12
# copy prebuilds
13
13
COPY patches/ /
14
14
15
- # install build dependencies
16
15
RUN \
16
+ echo "**** install build packages ****" && \
17
17
apk add --no-cache --virtual=build-dependencies \
18
18
argp-standalone \
19
19
autoconf \
@@ -43,21 +43,17 @@ RUN \
43
43
sqlite-dev \
44
44
tar \
45
45
zlib-dev && \
46
-
47
- # install runtime packages
46
+ echo "**** install runtime packages ****" && \
48
47
apk add --no-cache \
49
48
curl \
50
49
eudev-libs \
51
50
libressl \
52
51
python3-dev && \
53
-
54
- # link libftdi as the alpine guys named the libs wrong
52
+ echo "**** link libftdi libs ****" && \
55
53
ln -s /usr/lib/libftdi1.so /usr/lib/libftdi.so && \
56
54
ln -s /usr/lib/libftdi1.a /usr/lib/libftdi.a && \
57
55
ln -s /usr/include/libftdi1/ftdi.h /usr/include/ftdi.h && \
58
-
59
-
60
- # build telldus-core
56
+ echo "**** build telldus-core ****" && \
61
57
mkdir -p \
62
58
/tmp/telldus-core && \
63
59
curl -o /tmp/telldus-core.tar.gz -L \
@@ -72,14 +68,12 @@ RUN \
72
68
cd /tmp/telldus-core && \
73
69
cmake -DBUILD_TDADMIN=false -DCMAKE_INSTALL_PREFIX=/tmp/telldus-core . && \
74
70
make && \
75
-
76
- # move needed telldus core files and link them
71
+ echo "**** configure telldus core ****" && \
77
72
mv /tmp/telldus-core/client/libtelldus-core.so.2.1.2 /usr/lib/libtelldus-core.so.2.1.2 && \
78
73
mv /tmp/telldus-core/client/telldus-core.h /usr/include/telldus-core.h && \
79
74
ln -s /usr/lib/libtelldus-core.so.2.1.2 /usr/lib/libtelldus-core.so.2 && \
80
75
ln -s /usr/lib/libtelldus-core.so.2 /usr/lib/libtelldus-core.so && \
81
-
82
- # build OpenZWave
76
+ echo "**** build openzwave ****" && \
83
77
git clone https://github.com/OpenZWave/open-zwave.git /tmp/open-zwave && \
84
78
ln -s /tmp/open-zwave /tmp/open-zwave-read-only && \
85
79
cd /tmp/open-zwave && \
90
84
PREFIX=/usr \
91
85
sysconfdir=etc/openzwave \
92
86
install && \
93
-
94
- # build domoticz
87
+ echo "**** build domoticz ****" && \
95
88
git clone https://github.com/domoticz/domoticz.git /tmp/domoticz && \
96
89
cd /tmp/domoticz && \
97
90
cmake \
105
98
-DUSE_STATIC_LIBSTDCXX=OFF \
106
99
-DUSE_STATIC_OPENZWAVE=OFF \
107
100
-Wno-dev && \
108
- # attempt to set number of cores available for make to use
101
+ echo "**** attempt to set number of cores available for make to use ****" && \
109
102
set -ex && \
110
103
CPU_CORES=$( < /proc/cpuinfo grep -c processor ) || echo "failed cpu look up" && \
111
104
if echo $CPU_CORES | grep -E -q '^[0-9]+$' ; then \
@@ -117,28 +110,22 @@ RUN \
117
110
elif [ "$CPU_CORES" -gt 3 ]; then \
118
111
CPU_CORES=$(( CPU_CORES - 1 )); fi \
119
112
else CPU_CORES="1" ; fi && \
120
-
121
113
make -j $CPU_CORES && \
122
114
make install && \
123
115
set +ex && \
124
-
125
- # determine runtime packages
116
+ echo "**** determine runtime packages using scanelf ****" && \
126
117
RUNTIME_PACKAGES="$( \
127
118
scanelf --needed --nobanner /var/lib/domoticz/domoticz \
128
119
| awk '{ gsub(/,/, " \n so:", $2); print " so:" $2 }' \
129
120
| sort -u \
130
121
| xargs -r apk info --installed \
131
122
| sort -u \
132
123
)" && \
133
-
134
- # install runtime packages
135
124
apk add --no-cache \
136
125
$RUNTIME_PACKAGES && \
137
-
138
- # add abc to dialout and cron group trying to fix different GID for dialout group
126
+ echo "**** add abc to dialout and cron group ****" && \
139
127
usermod -a -G 16,20 abc && \
140
-
141
- # cleanup
128
+ echo " **** cleanup ****" && \
142
129
apk del --purge \
143
130
build-dependencies && \
144
131
rm -rf \
0 commit comments