Created
July 16, 2015 19:57
-
-
Save d-tux/6c3922e65eea42cc19f8 to your computer and use it in GitHub Desktop.
Builds fw4spl in a docker container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian | |
MAINTAINER Denis Wernert <[email protected]> | |
# Might want to bust cache here if looking to upgrade the distribution | |
RUN apt-get update && apt-get upgrade -y | |
# Install build dependencies | |
RUN apt-get install -y mercurial \ | |
make \ | |
gcc \ | |
clang \ | |
python2.7 \ | |
cmake \ | |
ninja-build \ | |
git \ | |
perl \ | |
build-essential \ | |
python \ | |
"^libxcb.*" \ | |
libx11-xcb-dev \ | |
libglu1-mesa-dev \ | |
libxrender-dev \ | |
libxi-dev \ | |
&& apt-get clean | |
ENV FW4SPL_HOME=/src/fw4spl/dev | |
ENV FW4SPL_BINPKG=/src/fw4spl/binpkg/ | |
ENV FW4SPL_VERSION=0.10.2 | |
ENV FW4SPL_BUILDTYPE=Debug | |
ENV FW4SPL_BIN_ARCHIVE=$FW4SPL_BINPKG/Src/fw4spl-deps/archive | |
# Create workspace | |
RUN bash -c "mkdir -p {$FW4SPL_HOME,$FW4SPL_BINPKG}/{Build,Src,Install}" | |
# Clone sources | |
RUN cd $FW4SPL_BINPKG/Src && git clone --depth=1 -b fw4spl_$FW4SPL_VERSION https://github.com/fw4spl-org/fw4spl-deps.git | |
WORKDIR $FW4SPL_BINPKG/Build | |
# Configure project | |
RUN cmake $FW4SPL_BINPKG/Src/fw4spl-deps \ | |
-DCMAKE_INSTALL_PREFIX=$FW4SPL_BINPKG/Install \ | |
-DCMAKE_BUILD_TYPE=$FW4SPL_BUILDTYPE | |
# Build dependencies; removes the downloads after each step in order to reduce snapshot size | |
# Note: build one item at a time to leverage cache. Archives can be copied in from the current directory | |
# if you want to avoid repeated downloads. | |
# COPY zlib-1.2.8.tar.gz $FW4SPL_BIN_ARCHIVE/zlib-1.2.8.tar.gz | |
RUN make zlib && rm -f $FW4SPL_BIN_ARCHIVE/* | |
# COPY Python-2.7.8.tgz $FW4SPL_BIN_ARCHIVE/Python-2.7.8.tgz | |
RUN make python && rm -f $FW4SPL_BIN_ARCHIVE/Python-2.7.8.tgz | |
# COPY numpy-1.9.1.tar.gz $FW4SPL_BIN_ARCHIVE/numpy-1.9.1.tar.gz | |
RUN make numpy && rm -f $FW4SPL_BIN_ARCHIVE/* | |
# ... | |
# RUN cd $FW4SPL_HOME/Src && git clone --depth=1 -b fw4spl_$FW4SPL_VERSION https://github.com/fw4spl-org/fw4spl.git | |
# Uncomment if you want to build the other project | |
# RUN cd $FW4SPL_BINPKG && git clone --depth=1 -b fw4spl_$FW4SPL_VERSION https://github.com/fw4spl-org/fw4spl-ar-deps.git | |
# RUN cd $FW4SPL_BINPKG && git clone --depth=1 -b fw4spl_$FW4SPL_VERSION https://github.com/fw4spl-org/fw4spl-ext-deps.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment