diff --git a/Dockerfile b/Dockerfile index 5e9829a..f81ffb6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ ARG VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" # package version -ARG DAAPD_VER="24.2" +ARG DAAPD_VER="25.0" # install build packages RUN \ @@ -35,15 +35,16 @@ RUN \ libgcrypt-dev \ libogg-dev \ libplist-dev \ + libsodium-dev \ libtool \ libunistring-dev \ make \ - openjdk7-jre-base \ + openjdk8-jre-base \ protobuf-c-dev \ sqlite-dev \ taglib-dev \ tar && \ - apk add --no-cache --virtual=build-dependencies2 \ + apk add --no-cache --virtual=build-dependencies \ --repository http://nl.alpinelinux.org/alpine/edge/testing \ libantlr3c-dev \ mxml-dev && \ @@ -59,6 +60,7 @@ RUN \ libevent \ libgcrypt \ libplist \ + libsodium \ libunistring \ protobuf-c \ sqlite \ @@ -101,14 +103,28 @@ RUN \ --mandir=/usr/share/man \ --prefix=/app \ --sysconfdir=/etc && \ - make && \ + +# attempt to set number of cores available for make to use + set -ex && \ + CPU_CORES=$( < /proc/cpuinfo grep -c processor ) || echo "failed cpu look up" && \ + if echo $CPU_CORES | grep -E -q '^[0-9]+$'; then \ + : ;\ + if [ "$CPU_CORES" -gt 7 ]; then \ + CPU_CORES=$(( CPU_CORES - 3 )); \ + elif [ "$CPU_CORES" -gt 5 ]; then \ + CPU_CORES=$(( CPU_CORES - 2 )); \ + elif [ "$CPU_CORES" -gt 3 ]; then \ + CPU_CORES=$(( CPU_CORES - 1 )); fi \ + else CPU_CORES="1"; fi && \ + + make -j $CPU_CORES && \ + set +ex && \ make install && \ cp /etc/forked-daapd.conf /etc/forked-daapd.conf.orig && \ # cleanup apk del --purge \ - build-dependencies \ - build-dependencies2 && \ + build-dependencies && \ rm -rf \ /tmp/* diff --git a/README.md b/README.md index 60b843b..efc5195 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ For further setup options of remotes etc, check out the daapd website, [Forked-d ## Versions ++ **03.12.17:** Bump to 25.0, cpu core counting routine for faster builds, linting fixes. + **26.05.17:** Rebase to alpine linux 3.6. + **06.02.17:** Rebase to alpine linux 3.5. + **10.01.17:** Bump to 24.2. diff --git a/root/etc/cont-init.d/40-config b/root/etc/cont-init.d/40-config index 9e667b3..b45638b 100644 --- a/root/etc/cont-init.d/40-config +++ b/root/etc/cont-init.d/40-config @@ -9,8 +9,8 @@ mkdir -p \ if [ ! -e "/defaults/forked-daapd.conf" ]; then cp /etc/forked-daapd.conf.orig /defaults/forked-daapd.conf sed -i \ - -e "/cache_path\ =/ s/# *//" \ - -e "/db_path\ =/ s/# *//" \ + -e '/cache_path\ =/ s/# *//' \ + -e '/db_path\ =/ s/# *//' \ -e s#ipv6\ =\ yes#ipv6\ =\ no#g \ -e s#My\ Music\ on\ %h#LS.IO\ Music#g \ -e s#/srv/music#/music#g \