diff --git a/docker-builder-data/build/script/packet/openblas-master.sh b/docker-builder-data/build/script/packet/openblas-master.sh index 83fe63f..2837918 100644 --- a/docker-builder-data/build/script/packet/openblas-master.sh +++ b/docker-builder-data/build/script/packet/openblas-master.sh @@ -8,7 +8,11 @@ source $INCLUDE_SCRIPT_DIR/inc-pkinstall_release-default.sh pkbuild() { cd "$BUILD_PACKET_DIR/$PK_DIRNAME" - if ! PREFIX=${INSTALL_PACKET_DIR} make -j${THREADS}; then + local PK_MAKE_ARG="" + if [ "$PLATFORM" = "linux-i386" ]; then + PK_MAKE_ARG="BINARY=32" + fi + if ! PREFIX=${INSTALL_PACKET_DIR} make $PK_MAKE_ARG -j${THREADS}; then return 1 fi } diff --git a/docker-builder-i386/.gitignore b/docker-builder-i386/.gitignore new file mode 100644 index 0000000..b638cbe --- /dev/null +++ b/docker-builder-i386/.gitignore @@ -0,0 +1 @@ +/debian-wheezy-i386.tar.gz diff --git a/docker-builder-i386/Dockerfile b/docker-builder-i386/Dockerfile new file mode 100644 index 0000000..3091dee --- /dev/null +++ b/docker-builder-i386/Dockerfile @@ -0,0 +1,91 @@ +FROM my/debian-i386:wheezy + +# Update +RUN apt-get -yq update + +# Upgrade +RUN apt-get -yq upgrade + +# Install compilers +RUN apt-get -yq install \ + g++ \ + make + +# Install tools +RUN apt-get -yq install \ + sudo \ + realpath \ + pkg-config + +# Install base libs +RUN apt-get -yq install \ + libpng12-dev \ + libfreetype6-dev \ + libxml2-dev \ + libjasper-dev \ + libffi-dev \ + libasound2-dev \ + libdirectfb-dev \ + x11proto-xext-dev \ + libxfixes-dev \ + libxinerama-dev \ + libxdamage-dev \ + libxcomposite-dev \ + libxcursor-dev \ + libxft-dev \ + libxrender-dev \ + libxt-dev \ + libxrandr-dev \ + libxi-dev \ + libxext-dev \ + libx11-dev \ + libxtst-dev \ + x11proto-gl-dev \ + libx11-xcb-dev \ + libpthread-stubs0-dev \ + libxml-parser-perl \ + libdb-dev uuid-dev \ + libdbus-1-dev \ + python-dev \ + gettext \ + autopoint \ + libpciaccess-dev \ + libudev-dev \ + bzip2 + +# qt deps see: http://doc.qt.io/qt-5/linux-requirements.html +RUN apt-get -yq install \ + libxrender-dev \ + libxcb1-dev \ + libxcb-render0-dev \ + libxcb-render-util0-dev \ + libxcb-shape0-dev \ + libxcb-randr0-dev \ + libxcb-sync0-dev \ + libxcb-shm0-dev \ + libxcb-icccm4-dev \ + libxcb-keysyms1-dev \ + libxcb-image0-dev \ + libxcb-glx0-dev \ + libxcb-xfixes0-dev \ + libfontconfig1-dev \ + libfreetype6-dev \ + libxi-dev \ + libxext-dev \ + libx11-dev \ + libx11-xcb-dev \ + libsm-dev \ + libice-dev \ + libglib2.0-dev \ + libglu1-mesa-dev + +RUN apt-get -yq install \ + liblzma-dev \ + liblzo2-dev \ + freeglut3-dev + +RUN apt-get -yq install gfortran +RUN apt-get -yq install ratfor +RUN apt-get -yq install csh +RUN apt-get -yq install libxcb-xinerama0-dev +RUN apt-get -yq install xsltproc diff --git a/docker-builder-i386/build-base.sh b/docker-builder-i386/build-base.sh new file mode 100755 index 0000000..85036c5 --- /dev/null +++ b/docker-builder-i386/build-base.sh @@ -0,0 +1,15 @@ +#!/bin/bash -x + +set -e + +arch=i386 +suite=wheezy +docker_image="my/debian-$arch:$suite" + +if [ -f debian-$suite-$arch.tar.gz ]; then + docker import - $docker_image < debian-$suite-$arch.tar.gz +else + echo "File debian-$suite-$arch.tar.gz not found" + echo "You may try to create it by command ./build-tgz.sh" + echo "or download it from http://icystar.com/downloads/debian-wheezy-i386.tar.gz" +fi diff --git a/docker-builder-i386/build-tgz.sh b/docker-builder-i386/build-tgz.sh new file mode 100755 index 0000000..ac97ff1 --- /dev/null +++ b/docker-builder-i386/build-tgz.sh @@ -0,0 +1,27 @@ +#!/bin/bash -x + +set -e + +arch=i386 +suite=wheezy +chroot_dir="/var/chroot/$suite" +apt_mirror="ftp://ftp.debian.org/debian/" +docker_image="my/debian-$arch:$suite" + +export DEBIAN_FRONTEND=noninteractive +debootstrap --arch $arch $suite $chroot_dir $apt_mirror + +cat < $chroot_dir/etc/apt/sources.list +deb $apt_mirror $suite main +deb $apt_mirror $suite-updates main +deb http://security.debian.org/ $suite/updates main +EOF + +chroot $chroot_dir apt-get update +chroot $chroot_dir apt-get upgrade -y +chroot $chroot_dir apt-get autoclean +chroot $chroot_dir apt-get clean +chroot $chroot_dir apt-get autoremove + +tar cfz debian-$suite-$arch.tar.gz -C $chroot_dir . +rm -rf $chroot_dir diff --git a/docker-builder-i386/build.sh b/docker-builder-i386/build.sh new file mode 100755 index 0000000..1fb5dee --- /dev/null +++ b/docker-builder-i386/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +SCRIPT_FILE=`realpath "$0"` +SCRIPT_DIR=`dirname "$SCRIPT_FILE"` + +docker build -t my/builder-i386 "$SCRIPT_DIR" diff --git a/docker-builder-i386/run.sh b/docker-builder-i386/run.sh new file mode 100755 index 0000000..3f422b8 --- /dev/null +++ b/docker-builder-i386/run.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +SCRIPT_FILE=`realpath "$0"` +SCRIPT_DIR=`dirname "$SCRIPT_FILE"` +BASE_DIR=`dirname "$SCRIPT_DIR"` +DATA_DIR="$BASE_DIR/docker-builder-data" + +BUILD_DIR=$DATA_DIR/build + +docker stop "builder-i386" || true +docker rm "builder-i386" || true + +docker run -it \ + --name "builder-i386" \ + -v "$BUILD_DIR:/build" \ + -e PLATFORM=linux-i386 \ + my/builder-i386 \ + /build/script/common/manager.sh "$@" +