Clean Dockerfile

This commit is contained in:
Raphael Bahuau 2019-09-11 12:06:35 +02:00
parent b0cc830e3f
commit 9cc1c648c5
1 changed files with 11 additions and 21 deletions

View File

@ -1,17 +1,10 @@
# linux base image
FROM alpine
# set up variables
# set up environment variables
ENV TARGET="sh3eb-elf" \
PREFIX="$HOME/opt/sh3eb-elf-2.31.1-8.2.0" \
# TO DELETE
PATH="$PATH:$PREFIX/bin"
# PATH="$PATH:/opt/sh3eb-elf-2.31.1-8.2.0/bin" \
# PATH="$PATH:/opt/sh3eb-elf-2.31.1-8.2.0/fxsdk/bin"
# extract archives (binutils & gcc)
RUN mkdir -p $PREFIX
ADD binutils-2.31.1.tar.xz gcc-8.2.0.tar.xz $PREFIX/
PATH="$PATH:/opt/sh3eb-elf-2.31.1-8.2.0/bin:/opt/sh3eb-elf-2.31.1-8.2.0/fxsdk/bin"
# dependencies
RUN apk update && apk add --update --no-cache \
@ -21,11 +14,14 @@ RUN apk update && apk add --update --no-cache \
gmp-dev \
mpfr-dev \
mpc1-dev \
pcre-dev
# libpng-dev \
# python3 \
# py3-pillow \
# flex
pcre-dev \
libpng-dev \
python3 \
py3-pillow \
flex
# extract archives (binutils & gcc)
ADD binutils-2.31.1.tar.xz gcc-8.2.0.tar.xz $PREFIX/
# binutils
RUN cd $PREFIX && mkdir build-binutils && cd build-binutils && \
@ -45,20 +41,14 @@ RUN cd $PREFIX/gcc-8.2.0 && \
cd $PREFIX/build-gcc && \
make all-target-libgcc && make install-target-libgcc
# TO DELETE
RUN apk add --update --no-cache libpng-dev python3 py3-pillow flex
# TODO git clone with commit number (or find a better way to rebuild from this)
# fxsdk
# old : http://git.planet-casio.com/lephe/fxsdk
RUN cd $PREFIX && \
git clone https://gitea.planet-casio.com/Lephenixnoir/fxsdk.git && \
cd fxsdk && bash configure --prefix=$PREFIX && make && make install
ENV PATH="$PATH:/opt/sh3eb-elf-2.31.1-8.2.0/bin"
ENV PATH="$PATH:/opt/sh3eb-elf-2.31.1-8.2.0/fxsdk/bin"
# gint
# old : http://git.planet-casio.com/lephe/gint
RUN cd $PREFIX && \
git clone --single-branch --branch compat https://gitea.planet-casio.com/Lephenixnoir/gint.git && \
cd gint && mkdir build.fx && cd build.fx && \