184 lines
6.4 KiB
Docker
184 lines
6.4 KiB
Docker
FROM i386/alpine:latest AS glide-fetcher
|
|
ARG CACHE_BUST=10
|
|
RUN apk add --no-cache git ca-certificates
|
|
COPY .docker-cache/glide.ref /tmp/glide.ref
|
|
WORKDIR /src
|
|
RUN cat /tmp/glide.ref > /dev/null && \
|
|
echo "$CACHE_BUST" > /dev/null && \
|
|
git clone --depth 1 --branch retrodebian --single-branch https://gitea.chacha.ddns.net/chacha/glide.git && \
|
|
rm -Rf glide/.git
|
|
|
|
# building a modified Kernel + modules + libs
|
|
FROM lpenz/debian-etch-i386-minbase AS kernel-builder
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
ARG ARCH=i386
|
|
ARG CONCURRENCY_LEVEL=4
|
|
|
|
# Preparing Environment
|
|
RUN (echo "deb http://archive.debian.org/debian etch main non-free" > /etc/apt/sources.list) && \
|
|
(echo "deb-src http://archive.debian.org/debian etch main non-free" >> /etc/apt/sources.list) && \
|
|
mkdir -p /usr/src/modules &&\
|
|
apt-get update && \
|
|
apt-get install -y aptitude build-essential quilt cvs unzip git-core ncurses-dev\
|
|
linux-headers-2.6.24-etchnhalf.1-686 \
|
|
squashfs-source-etchnhalf \
|
|
linux-source-2.6.24 && \
|
|
apt-get build-dep -y linux-image-2.6.24-etchnhalf.1-686 && \
|
|
apt-get clean
|
|
|
|
# Preparing Kernel + patchs + modules
|
|
WORKDIR /usr/src
|
|
COPY --from=glide-fetcher /src/glide glide
|
|
COPY unionfs-2.2.3_for_2.6.24.diff.gz ./
|
|
COPY nvidia.patch ./
|
|
RUN tar xjf linux-source-2.6.24.tar.bz2 && \
|
|
tar xjf etchnhalf/squashfs.tar.bz2 && \
|
|
ln -s linux-headers-2.6.24-etchnhalf.1-686/ linux-headers && \
|
|
mv glide/Device3Dfx modules/ &&\
|
|
wget http://archive.debian.org/debian-archive/debian/pool/non-free/n/nvidia-graphics-drivers-legacy-71xx/nvidia-kernel-legacy-71xx-source_71.86.15-3_i386.deb && \
|
|
dpkg-deb -x nvidia-kernel-legacy-71xx-source_71.86.15-3_i386.deb / && \
|
|
tar xjf nvidia-kernel-legacy-71xx.tar.bz2 && \
|
|
rm nvidia-kernel-legacy-71xx-source_71.86.15-3_i386.deb && \
|
|
patch -d modules/nvidia-kernel-legacy-71xx -p1 < nvidia.patch
|
|
|
|
# Building Kernel + patchs + modules
|
|
WORKDIR /usr/src/linux-source-2.6.24
|
|
COPY config-kernel ./
|
|
RUN (zcat /usr/src/unionfs-2.2.3_for_2.6.24.diff.gz | patch -p1) && \
|
|
(cat config-kernel > .config) && \
|
|
make oldconfig &&\
|
|
make-kpkg --initrd --arch $ARCH kernel_headers kernel_image modules_image
|
|
|
|
# Building userspace libs
|
|
# 3Dfx
|
|
COPY buildglidepkg.sh /usr/src/
|
|
RUN apt-get install -y nasm && \
|
|
chmod +x /usr/src/buildglidepkg.sh
|
|
# cvg / voodoo2
|
|
WORKDIR /usr/src/glide
|
|
# glide2x
|
|
RUN mv swlibs glide2x/
|
|
WORKDIR /usr/src/glide/glide2x/
|
|
RUN make -f Makefile.linux clean
|
|
RUN make -f Makefile.linux FX_GLIDE_HW=cvg USE_X86=1 USE_MMX=1
|
|
RUN mv swlibs ../glide3x/
|
|
# glide3x
|
|
WORKDIR /usr/src/glide/glide3x/
|
|
RUN make -f Makefile.linux clean
|
|
RUN make -f Makefile.linux FX_GLIDE_HW=cvg USE_X86=1 USE_MMX=1
|
|
RUN mv swlibs ../
|
|
WORKDIR /usr/src/
|
|
RUN /usr/src/buildglidepkg.sh cvg
|
|
|
|
# h3 / voodoo3 & Banshee
|
|
RUN apt-get install -y libx11-dev x11proto-xf86dga-dev libxxf86vm-dev libxxf86dga-dev
|
|
WORKDIR /usr/src/glide
|
|
# glide2x
|
|
RUN mv swlibs glide2x/
|
|
WORKDIR /usr/src/glide/glide2x/
|
|
RUN make -f Makefile.linux clean
|
|
RUN make -f Makefile.linux FX_GLIDE_HW=h3 USE_X86=1 USE_MMX=1
|
|
# glide3x
|
|
RUN mv swlibs ../glide3x/
|
|
WORKDIR /usr/src/glide/glide3x/
|
|
RUN make -f Makefile.linux clean
|
|
RUN make -f Makefile.linux FX_GLIDE_HW=h3 USE_X86=1 USE_MMX=1
|
|
RUN mv swlibs ../
|
|
WORKDIR /usr/src/
|
|
RUN /usr/src/buildglidepkg.sh h3
|
|
|
|
# sst1 / voodoo1
|
|
WORKDIR /usr/src/glide
|
|
# glide2x
|
|
RUN mv swlibs glide2x/
|
|
WORKDIR /usr/src/glide/glide2x/
|
|
RUN make -f Makefile.linux clean
|
|
RUN make -f Makefile.linux FX_GLIDE_HW=sst1 USE_X86=1 USE_MMX=1
|
|
# glide3x
|
|
RUN mv swlibs ../glide3x/
|
|
WORKDIR /usr/src/glide/glide3x/
|
|
RUN make -f Makefile.linux clean
|
|
RUN make -f Makefile.linux FX_GLIDE_HW=sst1 USE_X86=1 USE_MMX=1
|
|
RUN mv swlibs ../
|
|
WORKDIR /usr/src/
|
|
RUN /usr/src/buildglidepkg.sh sst1
|
|
|
|
# sst96 / voodoo Rush
|
|
# cannot build driver because of missing xf86rush lib...
|
|
#WORKDIR /usr/src/glide
|
|
# # glide2x
|
|
# RUN mv swlibs glide2x/
|
|
# WORKDIR /usr/src/glide/glide2x/
|
|
# RUN make -f Makefile.linux clean
|
|
# RUN make -f Makefile.linux FX_GLIDE_HW=sst96
|
|
# # glide3x
|
|
# RUN mv swlibs ../glide3x/
|
|
# WORKDIR /usr/src/glide/glide3x/
|
|
# RUN make -f Makefile.linux clean
|
|
# RUN make -f Makefile.linux FX_GLIDE_HW=sst96 USE_X86=1 USE_MMX=1
|
|
# RUN mv swlibs ../
|
|
#WORKDIR /usr/src/
|
|
#RUN /usr/src/buildglidepkg.sh sst96
|
|
|
|
#RUN rm *.gz *.bz2 && rm -Rf glide && rm -rf /var/lib/apt/lists/*
|
|
|
|
FROM i386/alpine:latest AS ut99-builder
|
|
RUN apk add --no-cache git ca-certificates
|
|
ARG CACHE_BUST=10
|
|
COPY .docker-cache/ut99.ref /tmp/ut99.ref
|
|
# Package UT99
|
|
WORKDIR /root
|
|
RUN cat /tmp/ut99.ref > /dev/null && \
|
|
echo "$CACHE_BUST" && \
|
|
git clone --depth 1 --branch master --single-branch https://gitea.chacha.ddns.net/chacha/UT99-Official.git ut-game && \
|
|
rm -Rf ut-game/.git
|
|
COPY games/ut99/ut-install-436.run ./
|
|
RUN chmod +x ut-install-436.run && \
|
|
./ut-install-436.run --target ./ut || true && \
|
|
tar xzf ./ut/data.tar.gz -C ut-game && \
|
|
cp ./ut/bin/x86/ut ut-game/ && \
|
|
rm ut-game/System/*.frt && \
|
|
rm ut-game/System/*.itt && \
|
|
rm ut-game/System/*.est && \
|
|
rm ut-game/System/*.exe && \
|
|
rm ut-game/System/*.dll && \
|
|
rm ut-game/System/*.url && \
|
|
rm ut-game/System/*.bat && \
|
|
rm ut-game/System/de.* && \
|
|
rm ut-game/System/UnrealTournament.ini && \
|
|
rm ut-game/System/Default.ini && \
|
|
rm ut-game/System/libSDL-1.1.so.0 && \
|
|
rm ut-game/Sounds/*est_uax && \
|
|
rm ut-game/Sounds/*frt_uax && \
|
|
rm ut-game/Sounds/*itt_uax && \
|
|
rm ut-game/DoConfig.py && \
|
|
rm ut-game/DoConfig.sh && \
|
|
rm -Rf ut-game/Web && \
|
|
rm -Rf ut-game/Help/* &&\
|
|
tar xzf ./ut/Glide.ini.tar.gz -C ut-game && \
|
|
mv ut-game/System/UnrealTournament.ini ut-game/System/Default-glide.ini && \
|
|
ls -al ./ut/ && \
|
|
tar xzf ./ut/OpenGL.ini.tar.gz -C ut-game && \
|
|
cp ut-game/System/UnrealTournament.ini ut-game/System/Default.ini && \
|
|
mv ut-game/System/UnrealTournament.ini ut-game/System/Default-opengl.ini
|
|
|
|
# Note: we need to use Lenny because of live-helper
|
|
# it allows creating Etch live image though !
|
|
FROM lpenz/debian-lenny-i386-minbase
|
|
WORKDIR /root
|
|
COPY --from=kernel-builder /usr/src/*.deb .
|
|
COPY --from=ut99-builder /root/ut-game ./ut-game
|
|
COPY /deps ./deps
|
|
COPY update-initramfs.sh .
|
|
COPY zzz-config-live.sh .
|
|
COPY desktop .
|
|
COPY wallpaper.jpg .
|
|
COPY neofetch .
|
|
COPY editions ./editions
|
|
RUN apt-get update && \
|
|
apt-get -y --force-yes install live-helper genisoimage syslinux squashfs-tools aptitude && \
|
|
apt-get clean
|
|
# rm -rf /var/lib/apt/lists/*
|
|
WORKDIR /root/live
|
|
|
|
FROM kernel-builder |