mirror of
https://github.com/linuxserver/docker-daapd.git
synced 2026-02-11 21:10:49 +08:00
120 lines
2.3 KiB
Docker
120 lines
2.3 KiB
Docker
FROM lsiobase/alpine
|
||
MAINTAINER sparklyballs
|
||
|
||
# set version label
|
||
ARG BUILD_DATE
|
||
ARG VERSION
|
||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||
|
||
# package version
|
||
ARG DAAPD_VER="24.2"
|
||
|
||
# install runtime packages
|
||
RUN \
|
||
apk add --no-cache \
|
||
avahi \
|
||
confuse \
|
||
dbus \
|
||
ffmpeg \
|
||
json-c \
|
||
libcurl \
|
||
libevent \
|
||
libgcrypt \
|
||
libplist \
|
||
libunistring \
|
||
protobuf-c \
|
||
sqlite \
|
||
sqlite-libs && \
|
||
apk add --no-cache \
|
||
--repository http://nl.alpinelinux.org/alpine/edge/testing \
|
||
libantlr3c \
|
||
mxml && \
|
||
|
||
# install build packages
|
||
apk add --no-cache --virtual=build-dependencies \
|
||
alsa-lib-dev \
|
||
autoconf \
|
||
automake \
|
||
avahi-dev \
|
||
bash \
|
||
bsd-compat-headers \
|
||
confuse-dev \
|
||
curl \
|
||
curl-dev \
|
||
ffmpeg-dev \
|
||
file \
|
||
flac-dev \
|
||
g++ \
|
||
gcc \
|
||
gettext-dev \
|
||
gnutls-dev \
|
||
gperf \
|
||
json-c-dev \
|
||
libcurl \
|
||
libevent-dev \
|
||
libgcrypt-dev \
|
||
libogg-dev \
|
||
libplist-dev \
|
||
libtool \
|
||
libunistring-dev \
|
||
make \
|
||
openjdk8-jre-base \
|
||
protobuf-c-dev \
|
||
sqlite-dev \
|
||
taglib-dev \
|
||
tar && \
|
||
apk add --no-cache --virtual=build-dependencies2 \
|
||
--repository http://nl.alpinelinux.org/alpine/edge/testing \
|
||
libantlr3c-dev \
|
||
mxml-dev && \
|
||
|
||
# make antlr wrapper
|
||
mkdir -p \
|
||
/tmp/source/forked-daapd && \
|
||
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 && \
|
||
|
||
# compile forked-daapd
|
||
curl -o \
|
||
/tmp/source/antlr-3.4-complete.jar -L \
|
||
http://www.antlr3.org/download/antlr-3.4-complete.jar && \
|
||
curl -o \
|
||
/tmp/source/forked.tar.gz -L \
|
||
"https://github.com/ejurgensen/forked-daapd/archive/${DAAPD_VER}.tar.gz" && \
|
||
tar xf /tmp/source/forked.tar.gz -C \
|
||
/tmp/source/forked-daapd --strip-components=1 && \
|
||
export PATH="/tmp/source:$PATH" && \
|
||
cd /tmp/source/forked-daapd && \
|
||
autoreconf -i -v && \
|
||
./configure \
|
||
--build=$CBUILD \
|
||
--enable-chromecast \
|
||
--enable-itunes \
|
||
--enable-lastfm \
|
||
--enable-mpd \
|
||
--host=$CHOST \
|
||
--infodir=/usr/share/info \
|
||
--localstatedir=/var \
|
||
--mandir=/usr/share/man \
|
||
--prefix=/app \
|
||
--sysconfdir=/etc && \
|
||
make && \
|
||
make install && \
|
||
cp /etc/forked-daapd.conf /etc/forked-daapd.conf.orig && \
|
||
|
||
# cleanup
|
||
apk del --purge \
|
||
build-dependencies \
|
||
build-dependencies2 && \
|
||
rm -rf \
|
||
/tmp/*
|
||
|
||
# copy local files
|
||
COPY root/ /
|
||
|
||
# ports and volumes
|
||
VOLUME /config /music
|