Commit 61a3853d authored by Simon Latapie's avatar Simon Latapie Committed by Konstantin Pavlov

Set and use image specific environment variables

Adds environment variables that will be used for all build scripts.
Also adds them to the system profile environment for them to be
available through ssh logins.
Signed-off-by: Konstantin Pavlov's avatarKonstantin Pavlov <thresh@videolan.org>
parent 6a49ba1a
......@@ -2,6 +2,9 @@ FROM registry.videolan.org:5000/videolan-base-stretch:20180419104422
ENV IMAGE_DATE=201712151145
ENV ANDROID_NDK="/sdk/android-ndk" \
ANDROID_SDK="/sdk/android-sdk-linux"
RUN dpkg --add-architecture i386 && apt-get update && \
apt-get install -y autoconf m4 automake ant autopoint bison flex \
build-essential libtool libtool-bin patch pkg-config ragel subversion \
......@@ -14,7 +17,10 @@ RUN dpkg --add-architecture i386 && apt-get update && \
apt-get clean -y && rm -rf /var/lib/apt/lists/*
# install android sdk
RUN mkdir sdk && cd sdk && \
RUN set -x && \
echo "export ANDROID_NDK=${ANDROID_NDK}" >> /etc/profile.d/vlc_env.sh && \
echo "export ANDROID_SDK=${ANDROID_SDK}" >> /etc/profile.d/vlc_env.sh && \
mkdir sdk && cd sdk && \
wget -q https://dl.google.com/android/repository/android-ndk-r14b-linux-x86_64.zip && \
ANDROID_NDK_SHA256=0ecc2017802924cf81fffc0f51d342e3e69de6343da892ac9fa1cd79bc106024 && \
echo $ANDROID_NDK_SHA256 android-ndk-r14b-linux-x86_64.zip | sha256sum -c && \
......
......@@ -2,10 +2,19 @@ FROM registry.videolan.org:5000/videolan-base-stretch:20180419104422
ENV IMAGE_DATE=201803261800
ENV TARGET_TUPLE=i686-w64-mingw32
ENV TOOLCHAIN_PREFIX=/opt/gcc-$TARGET_TUPLE
ENV MINGW_PREFIX=$TOOLCHAIN_PREFIX/$TARGET_TUPLE
ENV PATH=$TOOLCHAIN_PREFIX/bin:$PATH
COPY scripts/wait_process.sh /opt/wine/
COPY patches /patches
RUN set -x && \
echo "export TARGET_TUPLE=${TARGET_TUPLE}" >> /etc/profile.d/vlc_env.sh && \
echo "export TOOLCHAIN_PREFIX=${TOOLCHAIN_PREFIX}" >> /etc/profile.d/vlc_env.sh && \
echo "export MINGW_PREFIX=${MINGW_PREFIX}" >> /etc/profile.d/vlc_env.sh && \
echo "export PATH=${TOOLCHAIN_PREFIX}/bin:\$PATH" >> /etc/profile.d/vlc_env.sh && \
mkdir /build/ && \
apt-get update -qq && apt-get install -qqy \
git wget bzip2 file libwine-dev unzip libtool libtool-bin pkg-config ant \
......@@ -22,10 +31,6 @@ RUN set -x && \
rm -f /etc/apt/sources.list.d/stretch-backports.list && \
apt-get clean -y && rm -rf /var/lib/apt/lists/* && \
\
TARGET_TUPLE=i686-w64-mingw32 \
TOOLCHAIN_PREFIX=/opt/gcc-$TARGET_TUPLE \
MINGW_PREFIX=$TOOLCHAIN_PREFIX/$TARGET_TUPLE \
PATH=$TOOLCHAIN_PREFIX/bin:$PATH \
GCC_VERSION=6.4.0 \
GCC_SHA256=850bf21eafdfe5cd5f6827148184c08c4a0852a37ccf36ce69855334d2c914d4 \
BINUTILS_VERSION=2.27 \
......
......@@ -2,11 +2,20 @@ FROM registry.videolan.org:5000/videolan-base-stretch:20180419104422
ENV IMAGE_DATE=201803261800
ENV TARGET_TUPLE=x86_64-w64-mingw32
ENV TOOLCHAIN_PREFIX=/opt/gcc-${TARGET_TUPLE}
ENV MINGW_PREFIX=$TOOLCHAIN_PREFIX/${TARGET_TUPLE}
ENV PATH=${TOOLCHAIN_PREFIX}/bin:${PATH}
COPY scripts/wait_process.sh /opt/wine/
COPY patches /patches
# We still need an i686 cross compiler to build the installer
RUN set -x && \
echo "export TARGET_TUPLE=${TARGET_TUPLE}" >> /etc/profile.d/vlc_env.sh && \
echo "export TOOLCHAIN_PREFIX=${TOOLCHAIN_PREFIX}" >> /etc/profile.d/vlc_env.sh && \
echo "export MINGW_PREFIX=${MINGW_PREFIX}" >> /etc/profile.d/vlc_env.sh && \
echo "export PATH=${TOOLCHAIN_PREFIX}/bin:\$PATH" >> /etc/profile.d/vlc_env.sh && \
mkdir /build/ && \
apt-get update -qq && apt-get install -qqy \
git wget bzip2 file libwine-dev unzip libtool libtool-bin pkg-config ant \
......@@ -23,10 +32,6 @@ RUN set -x && \
rm -f /etc/apt/sources.list.d/stretch-backports.list && \
apt-get clean -y && rm -rf /var/lib/apt/lists/* && \
\
TARGET_TUPLE=x86_64-w64-mingw32 \
TOOLCHAIN_PREFIX=/opt/gcc-$TARGET_TUPLE \
MINGW_PREFIX=$TOOLCHAIN_PREFIX/$TARGET_TUPLE \
PATH=$TOOLCHAIN_PREFIX/bin:$PATH \
GCC_VERSION=6.4.0 \
GCC_SHA256=850bf21eafdfe5cd5f6827148184c08c4a0852a37ccf36ce69855334d2c914d4 \
BINUTILS_VERSION=2.27 \
......
......@@ -4,6 +4,11 @@ MAINTAINER Hugo Beauzée-Luyssen <hugo@beauzee.fr>
ENV IMAGE_DATE=201804101743
ENV TARGET_TUPLE=i686-w64-mingw32
ENV TOOLCHAIN_PREFIX=/opt/gcc-$TARGET_TUPLE
ENV MINGW_PREFIX=$TOOLCHAIN_PREFIX/$TARGET_TUPLE
ENV PATH=$TOOLCHAIN_PREFIX/bin:$PATH
RUN apt-get update -qq && apt-get install -qqy \
git wget bzip2 file libwine-dev unzip libtool libtool-bin pkg-config ant \
build-essential automake texinfo ragel yasm p7zip-full autopoint \
......@@ -13,14 +18,13 @@ RUN apt-get update -qq && apt-get install -qqy \
rm -f /etc/apt/sources.list.d/stretch-backports.list && \
apt-get clean -y && rm -rf /var/lib/apt/lists/*
ENV TARGET_TUPLE=i686-w64-mingw32
ENV TOOLCHAIN_PREFIX=/opt/gcc-$TARGET_TUPLE
ENV MINGW_PREFIX=$TOOLCHAIN_PREFIX/$TARGET_TUPLE
ENV PATH=$TOOLCHAIN_PREFIX/bin:$PATH
COPY patches /build/patches
RUN set -x && \
echo "export TARGET_TUPLE=${TARGET_TUPLE}" >> /etc/profile.d/vlc_env.sh && \
echo "export TOOLCHAIN_PREFIX=${TOOLCHAIN_PREFIX}" >> /etc/profile.d/vlc_env.sh && \
echo "export MINGW_PREFIX=${MINGW_PREFIX}" >> /etc/profile.d/vlc_env.sh && \
echo "export PATH=$TOOLCHAIN_PREFIX/bin:\$PATH" >> /etc/profile.d/vlc_env.sh && \
cd /build && \
\
GCC_VERSION=6.4.0 \
......
......@@ -4,6 +4,11 @@ MAINTAINER Hugo Beauzée-Luyssen <hugo@beauzee.fr>
ENV IMAGE_DATE=201804101743
ENV TARGET_TUPLE=x86_64-w64-mingw32
ENV TOOLCHAIN_PREFIX=/opt/gcc-${TARGET_TUPLE}
ENV MINGW_PREFIX=$TOOLCHAIN_PREFIX/${TARGET_TUPLE}
ENV PATH=${TOOLCHAIN_PREFIX}/bin:${PATH}
RUN apt-get update -qq && apt-get install -qqy \
git wget bzip2 file libwine-dev unzip libtool libtool-bin pkg-config ant \
build-essential automake texinfo ragel yasm p7zip-full autopoint \
......@@ -13,14 +18,13 @@ RUN apt-get update -qq && apt-get install -qqy \
rm -f /etc/apt/sources.list.d/stretch-backports.list && \
apt-get clean -y && rm -rf /var/lib/apt/lists/*
ENV TARGET_TUPLE=x86_64-w64-mingw32
ENV TOOLCHAIN_PREFIX=/opt/gcc-$TARGET_TUPLE
ENV MINGW_PREFIX=$TOOLCHAIN_PREFIX/$TARGET_TUPLE
ENV PATH=$TOOLCHAIN_PREFIX/bin:$PATH
COPY patches /build/patches
RUN set -x && \
echo "export TARGET_TUPLE=${TARGET_TUPLE}" >> /etc/profile.d/vlc_env.sh && \
echo "export TOOLCHAIN_PREFIX=${TOOLCHAIN_PREFIX}" >> /etc/profile.d/vlc_env.sh && \
echo "export MINGW_PREFIX=${MINGW_PREFIX}" >> /etc/profile.d/vlc_env.sh && \
echo "export PATH=${TOOLCHAIN_PREFIX}/bin:\$PATH" >> /etc/profile.d/vlc_env.sh && \
cd /build && \
\
GCC_VERSION=6.4.0 \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment