Rebase to 3.18, drop libspotify, tidy up build.

This commit is contained in:
TheSpad 2023-08-25 18:29:08 +01:00
parent 73ecaf4bb0
commit eb99d09c52
No known key found for this signature in database
GPG Key ID: 08F06191F4587860
4 changed files with 6 additions and 60 deletions

View File

@ -1,9 +1,7 @@
FROM ghcr.io/linuxserver/baseimage-alpine:3.17 as buildstage
FROM ghcr.io/linuxserver/baseimage-alpine:3.18 as buildstage
############## build stage ##############
ARG DAAPD_RELEASE
ARG LIBSPOTIFY_VERSION=12.1.51
ARG ARCH=x86_64
RUN \
echo "**** install build packages ****" && \
@ -41,40 +39,13 @@ RUN \
protobuf-c-dev \
sqlite-dev \
taglib-dev && \
echo "**** make antlr wrapper ****" && \
mkdir -p \
/tmp/source/owntone && \
echo \
"#!/bin/bash" > /tmp/source/antlr3 && \
echo \
"exec java -cp /tmp/source/antlr-3.4-complete.jar org.antlr.Tool \"\$@\"" >> /tmp/source/antlr3 && \
chmod a+x /tmp/source/antlr3 && \
curl -o \
/tmp/source/antlr-3.4-complete.jar -L \
http://www.antlr3.org/download/antlr-3.4-complete.jar && \
echo "**** compile and install antlr3c ****" && \
curl -o \
/tmp/libantlr3c-3.4.tar.gz -L \
https://github.com/antlr/website-antlr3/raw/gh-pages/download/C/libantlr3c-3.4.tar.gz && \
tar xf /tmp/libantlr3c-3.4.tar.gz -C /tmp && \
cd /tmp/libantlr3c-3.4 && \
./configure --enable-64bit --prefix=/usr && \
make && \
make DESTDIR=/tmp/antlr3c-build install && \
export LDFLAGS="-L/tmp/antlr3c-build/usr/lib" && \
export CFLAGS="-I/tmp/antlr3c-build/usr/include" && \
echo "**** compile owntone-server ****" && \
if [ -z ${DAAPD_RELEASE+x} ]; then \
DAAPD_RELEASE=$(curl -sX GET "https://api.github.com/repos/owntone/owntone-server/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
curl -L https://github.com/mopidy/libspotify-archive/blob/master/libspotify-${LIBSPOTIFY_VERSION}-Linux-${ARCH}-release.tar.gz?raw=true | tar -xzf- -C /tmp/source/ && \
mv /tmp/source/libspotify* /tmp/source/libspotify && \
sed -i 's/ldconfig//' /tmp/source/libspotify/Makefile && \
make -C /tmp/source/libspotify prefix=/tmp/libspotify-build install && \
rm -rf /tmp/source/libspotify && \
export LIBSPOTIFY_CFLAGS="-I/tmp/libspotify-build/include" && \
export LIBSPOTIFY_LIBS="/tmp/libspotify-build/lib/libspotify.so" && \
curl -o \
/tmp/source/owntone.tar.gz -L \
"https://github.com/owntone/owntone-server/archive/${DAAPD_RELEASE}.tar.gz" && \
@ -86,10 +57,8 @@ RUN \
./configure \
--build=$CBUILD \
--enable-chromecast \
--enable-itunes \
--enable-lastfm \
--enable-mpd \
--enable-spotify \
--host=$CHOST \
--infodir=/usr/share/info \
--localstatedir=/var \
@ -101,7 +70,7 @@ RUN \
mv /tmp/daapd-build/etc/owntone.conf /tmp/daapd-build/etc/owntone.conf.orig && \
rm -rf /tmp/daapd-build/var
############## runtime stage ##############
FROM ghcr.io/linuxserver/baseimage-alpine:3.17
FROM ghcr.io/linuxserver/baseimage-alpine:3.18
# set version label
ARG BUILD_DATE
@ -134,8 +103,6 @@ RUN \
# copy buildstage and local files
COPY --from=buildstage /tmp/daapd-build/ /
COPY --from=buildstage /tmp/antlr3c-build/ /
COPY --from=buildstage /tmp/libspotify-build/ /
COPY root/ /
# ports and volumes

View File

@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.17 as buildstage
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.18 as buildstage
############## build stage ##############
ARG DAAPD_RELEASE
@ -39,28 +39,8 @@ RUN \
protobuf-c-dev \
sqlite-dev \
taglib-dev && \
echo "**** make antlr wrapper ****" && \
mkdir -p \
/tmp/source/owntone && \
echo \
"#!/bin/bash" > /tmp/source/antlr3 && \
echo \
"exec java -cp /tmp/source/antlr-3.4-complete.jar org.antlr.Tool \"\$@\"" >> /tmp/source/antlr3 && \
chmod a+x /tmp/source/antlr3 && \
curl -o \
/tmp/source/antlr-3.4-complete.jar -L \
http://www.antlr3.org/download/antlr-3.4-complete.jar && \
echo "**** compile and install antlr3c ****" && \
curl -o \
/tmp/libantlr3c-3.4.tar.gz -L \
https://github.com/antlr/website-antlr3/raw/gh-pages/download/C/libantlr3c-3.4.tar.gz && \
tar xf /tmp/libantlr3c-3.4.tar.gz -C /tmp && \
cd /tmp/libantlr3c-3.4 && \
./configure --build arm-unknown-linux-gnueabi --disable-abiflags --disable-antlrdebug --enable-64bit --prefix=/usr && \
make && \
make DESTDIR=/tmp/antlr3c-build install && \
export LDFLAGS="-L/tmp/antlr3c-build/usr/lib" && \
export CFLAGS="-I/tmp/antlr3c-build/usr/include" && \
echo "**** compile owntone-server ****" && \
if [ -z ${DAAPD_RELEASE+x} ]; then \
DAAPD_RELEASE=$(curl -sX GET "https://api.github.com/repos/owntone/owntone-server/releases/latest" \
@ -76,9 +56,7 @@ RUN \
autoreconf -i -v && \
./configure \
--build=$CBUILD \
--disable-avcodecsend \
--enable-chromecast \
--enable-itunes \
--enable-lastfm \
--enable-mpd \
--host=$CHOST \
@ -92,7 +70,7 @@ RUN \
mv /tmp/daapd-build/etc/owntone.conf /tmp/daapd-build/etc/owntone.conf.orig && \
rm -rf /tmp/daapd-build/var
############## runtime stage ##############
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.17
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.18
# set version label
ARG BUILD_DATE
@ -125,7 +103,6 @@ RUN \
# copy buildstage and local files
COPY --from=buildstage /tmp/daapd-build/ /
COPY --from=buildstage /tmp/antlr3c-build/ /
COPY root/ /
# ports and volumes

View File

@ -240,6 +240,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
* **25.08.23:** - Rebase to Alpine 3.18, remove abandoned libspotify libs.
* **05.07.23:** - Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)
* **23.02.23:** - Rebase to Alpine 3.17, migrate to s6v3.
* **31.05.22:** - Make sure the user has access to the audio device.

View File

@ -58,6 +58,7 @@ app_setup_block: |
It is recommended to set the `pipe_autostart` option to `true` in your forked-daapd config.
# changelog
changelogs:
- {date: "25.08.23:", desc: "Rebase to Alpine 3.18, remove abandoned libspotify libs."}
- {date: "05.07.23:", desc: "Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)"}
- {date: "23.02.23:", desc: "Rebase to Alpine 3.17, migrate to s6v3."}
- {date: "31.05.22:", desc: "Make sure the user has access to the audio device."}