diff --git a/docker-builder-data/build/script/common/helpers.sh b/docker-builder-data/build/script/common/helpers.sh index 4a947ce..855d0c4 100644 --- a/docker-builder-data/build/script/common/helpers.sh +++ b/docker-builder-data/build/script/common/helpers.sh @@ -157,6 +157,10 @@ copy_system_lib() { cp --remove-destination /lib/i386-linux-gnu/$SRC_NAME* "$DST_PATH" &> /dev/null cp --remove-destination /usr/lib/x86_64-linux-gnu/$SRC_NAME* "$DST_PATH" &> /dev/null cp --remove-destination /usr/lib/i386-linux-gnu/$SRC_NAME* "$DST_PATH" &> /dev/null + cp --remove-destination /usr/local/lib/$SRC_NAME* "$DST_PATH" &> /dev/null + cp --remove-destination /usr/local/lib64/$SRC_NAME* "$DST_PATH" &> /dev/null + cp --remove-destination /usr/local/lib/x86_64-linux-gnu/$SRC_NAME* "$DST_PATH" &> /dev/null + cp --remove-destination /usr/local/lib/i386-linux-gnu/$SRC_NAME* "$DST_PATH" &> /dev/null if ! (ls "$DST_PATH/$SRC_NAME"* &> /dev/null); then echo "$SRC_NAME not found in system libraries" return 1 @@ -215,7 +219,8 @@ copy_system_license() { for MASK in "/usr/share/doc/$SUB_NAME/copyright" \ "/usr/share/licenses/$SUB_NAME" \ "/usr/share/licenses/$SUB_NAME/*" \ - "/usr/share/doc/$SUB_NAME/*" + "/usr/share/doc/$SUB_NAME/*" \ + "/usr/local/share/doc/$SUB_NAME/copyright" do local FOUND= ls -d1 $MASK 2>/dev/null | while read FILE; do diff --git a/docker-builder-data/build/script/toolchain/none.sh b/docker-builder-data/build/script/toolchain/none.sh index 4018e1d..85efdc0 100755 --- a/docker-builder-data/build/script/toolchain/none.sh +++ b/docker-builder-data/build/script/toolchain/none.sh @@ -7,7 +7,11 @@ vars_clear "TC_" export TC_HOST="" export TC_PATH="$INITIAL_PATH" -export TC_LD_LIBRARY_PATH="$INITIAL_LD_LIBRARY_PATH" +export TC_LD_LIBRARY_PATH="/usr/local/lib:/usr/local/lib64:$INITIAL_LD_LIBRARY_PATH" +export TC_LIBRARY_PATH="/usr/local/lib:/usr/local/lib64:$INITIAL_LIBRARY_PATH" + +export TC_CC=`which cc` +export TC_CXX=`which c++` export TC_LDFLAGS="$INITIAL_LDFLAGS" export TC_CFLAGS="$INITIAL_CFLAGS" diff --git a/docker/debian-7-32bit/Dockerfile b/docker/debian-7-32bit/Dockerfile index 261925d..b9e903a 100644 --- a/docker/debian-7-32bit/Dockerfile +++ b/docker/debian-7-32bit/Dockerfile @@ -1,54 +1,52 @@ FROM morevna/debian-i386:wheezy ARG ALL_PROXY -# Update +# set available apt sources +COPY files/sources.list /etc/apt/sources.list + +# update RUN apt-get -yq update -# Upgrade +# upgrade RUN apt-get -yq upgrade -# Install tools -RUN apt-get -yq install \ - sudo \ - pkg-config \ - g++ \ - make +# install tools +RUN apt-get -yq install bash sudo pkg-config g++ make wget -# qt deps see: http://doc.qt.io/qt-5/linux-requirements.html -RUN apt-get -yq install \ - libxrender-dev \ - libfontconfig1-dev \ - libfreetype6-dev \ - libxi-dev \ - libxext-dev \ - libx11-dev \ - libx11-xcb-dev \ - libsm-dev \ - libice-dev \ - libglib2.0-dev \ - libglu1-mesa-dev - -# other deps - -RUN apt-get -yq install liblzma-dev -RUN apt-get -yq install liblzo2-dev -RUN apt-get -yq install libudev-dev -RUN apt-get -yq install libfuse-dev -RUN apt-get -yq install libdb-dev -RUN apt-get -yq install libasound2-dev +# upgrade gcc +RUN apt-get -yq install libgmp-dev libmpfr-dev libmpc-dev +COPY files/install-gcc.sh / +RUN /install-gcc.sh -RUN apt-get -yq install gfortran +# install tools RUN apt-get -yq install csh RUN apt-get -yq install xsltproc RUN apt-get -yq install m4 RUN apt-get -yq install automake RUN apt-get -yq install intltool RUN apt-get -yq install libtool - RUN apt-get -yq install git -RUN apt-get -yq install wget RUN apt-get -yq install bzip2 +# qt deps see: http://doc.qt.io/qt-5/linux-requirements.html +RUN apt-get -yq install libxrender-dev +RUN apt-get -yq install libfontconfig1-dev +RUN apt-get -yq install libfreetype6-dev +RUN apt-get -yq install libxi-dev +RUN apt-get -yq install libxext-dev +RUN apt-get -yq install libx11-dev +RUN apt-get -yq install libx11-xcb-dev +RUN apt-get -yq install libsm-dev +RUN apt-get -yq install libice-dev +RUN apt-get -yq install libglu1-mesa-dev + +# other deps +RUN apt-get -yq install liblzma-dev +RUN apt-get -yq install liblzo2-dev +RUN apt-get -yq install libudev-dev +RUN apt-get -yq install libfuse-dev +RUN apt-get -yq install libdb-dev +RUN apt-get -yq install libasound2-dev RUN apt-get -yq install libffi-dev RUN apt-get -yq install libmount-dev RUN apt-get -yq install libbz2-dev @@ -62,4 +60,5 @@ RUN apt-get -yq install xutils-dev RUN apt-get -yq install libegl1-mesa-dev RUN apt-get -yq install libdirectfb-dev +# build dir RUN mkdir /build diff --git a/docker/debian-7-32bit/files/install-gcc.sh b/docker/debian-7-32bit/files/install-gcc.sh new file mode 100755 index 0000000..74e62c0 --- /dev/null +++ b/docker/debian-7-32bit/files/install-gcc.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +set -e + +mkdir -p install-gcc +cd install-gcc + +echo && echo "download and unpack" && echo + +GCC_SOURCES_URL="ftp://ftp.gnu.org/gnu/gcc/gcc-7.2.0/gcc-7.2.0.tar.xz" +wget -c "$GCC_SOURCES_URL" +tar -xf gcc-*.tar.* + +echo && echo "build and install" && echo + +mkdir -p build +cd build +[ -f "../configure.done" ] || ( \ + ../gcc-*/configure --disable-multilib \ + && touch "../configure.done") +make -j`nproc` +make install +(cd /usr/local/bin && ln gcc cc) +cd .. + +echo && echo "add licenses" && echo + +cd gcc-* +PREFIX="/usr/local/share/doc" +TARGET="../copyright" +TARGET_DIRS="gcc g++ gfortran cc c++ fortran" +echo > "$TARGET" +for FILE in README COPYING* MAINTAINERS; do + echo "" >> "$TARGET" + echo "-------------------------------------" >> "$TARGET" + echo " File: $FILE" >> "$TARGET" + echo "-------------------------------------" >> "$TARGET" + echo "" >> "$TARGET" + cat "$FILE" >> "$TARGET" +done +for TARGET_DIR in $TARGET_DIRS; do + mkdir -p "$PREFIX/$TARGET_DIR" + cp "$TARGET" "$PREFIX/$TARGET_DIR/" +done +cd .. + +cd .. + +echo && echo "clean" && echo + +rm -r install-gcc diff --git a/docker/debian-7-32bit/files/sources.list b/docker/debian-7-32bit/files/sources.list new file mode 100644 index 0000000..e97897c --- /dev/null +++ b/docker/debian-7-32bit/files/sources.list @@ -0,0 +1,3 @@ +deb ftp://ftp.de.debian.org/debian/ wheezy main +deb ftp://ftp.de.debian.org/debian/ wheezy-updates main +deb http://security.debian.org/ wheezy/updates main diff --git a/docker/debian-7-64bit/Dockerfile b/docker/debian-7-64bit/Dockerfile index 994f88f..511c9eb 100644 --- a/docker/debian-7-64bit/Dockerfile +++ b/docker/debian-7-64bit/Dockerfile @@ -1,53 +1,52 @@ FROM debian:7 ARG ALL_PROXY -# Update +# set available apt sources +COPY files/sources.list /etc/apt/sources.list + +# update RUN apt-get -yq update -# Upgrade +# upgrade RUN apt-get -yq upgrade -# Install tools -RUN apt-get -yq install \ - sudo \ - pkg-config \ - g++ \ - make +# install tools +RUN apt-get -yq install bash sudo pkg-config g++ make wget -# qt deps see: http://doc.qt.io/qt-5/linux-requirements.html -RUN apt-get -yq install \ - libxrender-dev \ - libfontconfig1-dev \ - libfreetype6-dev \ - libxi-dev \ - libxext-dev \ - libx11-dev \ - libx11-xcb-dev \ - libsm-dev \ - libice-dev \ - libglu1-mesa-dev - -# other deps - -RUN apt-get -yq install liblzma-dev -RUN apt-get -yq install liblzo2-dev -RUN apt-get -yq install libudev-dev -RUN apt-get -yq install libfuse-dev -RUN apt-get -yq install libdb-dev -RUN apt-get -yq install libasound2-dev +# upgrade gcc +RUN apt-get -yq install libgmp-dev libmpfr-dev libmpc-dev +COPY files/install-gcc.sh / +RUN /install-gcc.sh -RUN apt-get -yq install gfortran +# install tools RUN apt-get -yq install csh RUN apt-get -yq install xsltproc RUN apt-get -yq install m4 RUN apt-get -yq install automake RUN apt-get -yq install intltool RUN apt-get -yq install libtool - RUN apt-get -yq install git -RUN apt-get -yq install wget RUN apt-get -yq install bzip2 +# qt deps see: http://doc.qt.io/qt-5/linux-requirements.html +RUN apt-get -yq install libxrender-dev +RUN apt-get -yq install libfontconfig1-dev +RUN apt-get -yq install libfreetype6-dev +RUN apt-get -yq install libxi-dev +RUN apt-get -yq install libxext-dev +RUN apt-get -yq install libx11-dev +RUN apt-get -yq install libx11-xcb-dev +RUN apt-get -yq install libsm-dev +RUN apt-get -yq install libice-dev +RUN apt-get -yq install libglu1-mesa-dev + +# other deps +RUN apt-get -yq install liblzma-dev +RUN apt-get -yq install liblzo2-dev +RUN apt-get -yq install libudev-dev +RUN apt-get -yq install libfuse-dev +RUN apt-get -yq install libdb-dev +RUN apt-get -yq install libasound2-dev RUN apt-get -yq install libffi-dev RUN apt-get -yq install libmount-dev RUN apt-get -yq install libbz2-dev @@ -61,4 +60,5 @@ RUN apt-get -yq install xutils-dev RUN apt-get -yq install libegl1-mesa-dev RUN apt-get -yq install libdirectfb-dev +# build dir RUN mkdir /build diff --git a/docker/debian-7-64bit/files/install-gcc.sh b/docker/debian-7-64bit/files/install-gcc.sh new file mode 100755 index 0000000..74e62c0 --- /dev/null +++ b/docker/debian-7-64bit/files/install-gcc.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +set -e + +mkdir -p install-gcc +cd install-gcc + +echo && echo "download and unpack" && echo + +GCC_SOURCES_URL="ftp://ftp.gnu.org/gnu/gcc/gcc-7.2.0/gcc-7.2.0.tar.xz" +wget -c "$GCC_SOURCES_URL" +tar -xf gcc-*.tar.* + +echo && echo "build and install" && echo + +mkdir -p build +cd build +[ -f "../configure.done" ] || ( \ + ../gcc-*/configure --disable-multilib \ + && touch "../configure.done") +make -j`nproc` +make install +(cd /usr/local/bin && ln gcc cc) +cd .. + +echo && echo "add licenses" && echo + +cd gcc-* +PREFIX="/usr/local/share/doc" +TARGET="../copyright" +TARGET_DIRS="gcc g++ gfortran cc c++ fortran" +echo > "$TARGET" +for FILE in README COPYING* MAINTAINERS; do + echo "" >> "$TARGET" + echo "-------------------------------------" >> "$TARGET" + echo " File: $FILE" >> "$TARGET" + echo "-------------------------------------" >> "$TARGET" + echo "" >> "$TARGET" + cat "$FILE" >> "$TARGET" +done +for TARGET_DIR in $TARGET_DIRS; do + mkdir -p "$PREFIX/$TARGET_DIR" + cp "$TARGET" "$PREFIX/$TARGET_DIR/" +done +cd .. + +cd .. + +echo && echo "clean" && echo + +rm -r install-gcc diff --git a/docker/debian-7-64bit/files/sources.list b/docker/debian-7-64bit/files/sources.list new file mode 100644 index 0000000..e97897c --- /dev/null +++ b/docker/debian-7-64bit/files/sources.list @@ -0,0 +1,3 @@ +deb ftp://ftp.de.debian.org/debian/ wheezy main +deb ftp://ftp.de.debian.org/debian/ wheezy-updates main +deb http://security.debian.org/ wheezy/updates main