1
- ARG BASE_APP_IMAGE
1
+ ARG KODI_VERSION=21.2-Omega
2
+ ARG KODI_INSTALLATION_FOLDER=/kodi
3
+ ARG BASE_APP_IMAGE=ghcr.io/games-on-whales/base-app:edge
2
4
3
- # hadolint ignore=DL3006
4
- FROM ${BASE_APP_IMAGE}
5
+ FROM ubuntu:24.10 AS kodi-builder
5
6
6
7
ARG DEBIAN_FRONTEND=noninteractive
7
8
8
- # TODO: Build this madness in a multi-step Dockerfile and just copy the needed binary
9
- # Required packages are listed here:
10
- # - https://github.com/xbmc/xbmc/blob/master/docs/README.Ubuntu.md#32-get-build-dependencies-manually
11
- ARG REQUIRED_PACKAGES=" \
9
+ ARG DEV_PACKAGES=" \
12
10
debhelper autoconf autoconf automake \
13
11
autopoint gettext autotools-dev cmake \
14
12
curl default-jre doxygen gawk gcc gdc \
@@ -26,7 +24,7 @@ ARG REQUIRED_PACKAGES=" \
26
24
libgpg-error-dev libgtest-dev libiso9660-dev \
27
25
libjpeg-dev liblcms2-dev libltdl-dev liblzo2-dev \
28
26
libmicrohttpd-dev libmysqlclient-dev libnfs-dev \
29
- libogg-dev libpcre2 -dev libplist-dev libpng-dev \
27
+ libogg-dev libpcre3 -dev libplist-dev libpng-dev \
30
28
libpulse-dev libshairplay-dev libsmbclient-dev \
31
29
libspdlog-dev libsqlite3-dev libssl-dev libtag1-dev \
32
30
libtiff5-dev libtinyxml-dev libtinyxml2-dev libtool \
@@ -39,26 +37,66 @@ ARG REQUIRED_PACKAGES=" \
39
37
libxkbcommon-dev waylandpp-dev wayland-protocols \
40
38
"
41
39
42
- # Build Kodi from source
43
- RUN apt-get update && \
44
- apt-get install -y $REQUIRED_PACKAGES && \
45
- git clone https://github.com/xbmc/xbmc kodi && \
46
- apt-get update && \
47
- mkdir kodi-build && \
48
- cd kodi-build && \
49
- cmake ../kodi -DCMAKE_INSTALL_PREFIX=/usr/local -DCORE_PLATFORM_NAME=wayland -DAPP_RENDER_SYSTEM=gl && \
50
- cmake --build . -- VERBOSE=1 -j$(getconf _NPROCESSORS_ONLN) && \
51
- make install
52
-
53
- # Build controller addon; !!! Add needed Addons HERE !!!
54
- RUN cd kodi && \
55
- make -j$(getconf _NPROCESSORS_ONLN) -C tools/depends/target/binary-addons PREFIX=/usr/local && \
56
- # clean up
57
- cd .. && \
58
- rm -R kodi/ && \
59
- rm -R kodi-build/ && \
60
- apt-get autoremove -y --purge
40
+ RUN apt-get update -y && \
41
+ apt-get install -y \
42
+ $DEV_PACKAGES && \
43
+ rm -rf /var/lib/apt/lists/*
44
+
45
+ ARG KODI_VERSION
46
+ ARG KODI_INSTALLATION_FOLDER
47
+
48
+ RUN <<_BUILD_KODI
49
+
50
+ mkdir ${KODI_INSTALLATION_FOLDER}
51
+
52
+ git clone https://github.com/xbmc/xbmc xbmc
53
+ echo "Checking out Kodi version: ${KODI_VERSION}"
54
+ cd xbmc && git checkout ${KODI_VERSION}
55
+ mkdir build && cd build
56
+
57
+ cmake ../ -DCMAKE_INSTALL_PREFIX=${KODI_INSTALLATION_FOLDER} -DCORE_PLATFORM_NAME=wayland -DAPP_RENDER_SYSTEM=gl -GNinja
58
+ cmake --build . -j$(getconf _NPROCESSORS_ONLN)
59
+ make -j$(getconf _NPROCESSORS_ONLN) -C ../tools/depends/target/binary-addons PREFIX=${KODI_INSTALLATION_FOLDER} \
60
+ ADDONS="peripheral.joystick pvr.*"
61
61
62
+ cmake --install .
63
+ exit 0 # TODO: the install step seems to fail, but the binaries are there...
64
+ _BUILD_KODI
65
+
66
+ # hadolint ignore=DL3006
67
+ FROM ${BASE_APP_IMAGE}
68
+
69
+ ARG REQUIRED_PACKAGES=" \
70
+ libasound2-dev libass-dev \
71
+ libavahi-client3 libavahi-common3 \
72
+ libbluetooth3 libbluray2 bzip2 \
73
+ libcdio19t64 libp8-platform2 libcrossguid0 \
74
+ libcurl4t64 libcwiid1t64 libdbus-1-3 \
75
+ libdrm2 libegl1 libenca0 \
76
+ libexiv2-27 libflac12t64 libfmt9 \
77
+ libfontconfig1 libfreetype6 \
78
+ libfribidi0 libfstrcmp0 \
79
+ libgcrypt20 libgif7 libgles2 \
80
+ libgl1 libglu1 libgnutls30t64 \
81
+ libgpg-error0 libiso9660-11t64 \
82
+ libjpeg62 liblcms2-2 libltdl7 liblzo2-2 \
83
+ libmicrohttpd12t64 libmysqlclient21 libnfs14 \
84
+ libogg0 libpcre3 libplist-2.0-4 libpng16-16t64 \
85
+ libpulse0 libshairplay0 libsmbclient0 \
86
+ libspdlog1.12 libsqlite3-0 libssl3t64 libtag1v5 \
87
+ libtiff6 libtinyxml2-10 libtinyxml2.6.2v5 libtool \
88
+ libudev1 libunistring5 libva-dev libvdpau1 \
89
+ libvorbis0a libxmu6 libxrandr2 libxslt1.1 \
90
+ libxt6t64 lsb-release nasm \
91
+ unzip uuid zip zlib1g \
92
+ libflatbuffers23.5.26 libglew2.2 libwayland-client0 \
93
+ libwayland-client++1 libwayland-cursor++1 libwayland-egl++1 libxkbcommon-x11-0 wayland-protocols \
94
+ "
95
+
96
+ RUN apt-get update -y && \
97
+ apt-get install -y --no-install-recommends \
98
+ $REQUIRED_PACKAGES && \
99
+ rm -rf /var/lib/apt/lists/*
62
100
63
101
COPY --chmod=777 scripts/startup.sh /opt/gow/startup-app.sh
64
102
COPY --chmod=777 scripts/startup-10-create-dirs.sh /opt/gow/startup.d/10-create-dirs.sh
@@ -67,6 +105,10 @@ COPY configs/Switch_controller.xml /opt/gow/Switch_controller.xml
67
105
COPY configs/PS_controller.xml /opt/gow/PS_controller.xml
68
106
COPY configs/settings.xml /opt/gow/settings.xml
69
107
108
+ ARG KODI_INSTALLATION_FOLDER
109
+ COPY --chmod=777 --from=kodi-builder $KODI_INSTALLATION_FOLDER $KODI_INSTALLATION_FOLDER
110
+ RUN ln -s $KODI_INSTALLATION_FOLDER/bin/kodi /usr/bin/kodi
111
+
70
112
ENV XDG_RUNTIME_DIR=/tmp/.X11-unix
71
113
72
114
ARG IMAGE_SOURCE
0 commit comments