FROM fedora:27

ENV LANG en_US.utf8
ENV LC_ALL en_US.utf8

RUN dnf -y upgrade

# General
RUN dnf -y groupinstall "Minimal Install"
RUN dnf -y install \
 unzip \
 openssh \
 rsync

# Mingw 32/64
RUN dnf -y install \
 mingw32-binutils \
 mingw32-gcc \
 mingw32-headers \
 mingw32-crt \
 mingw32-gcc-c++ \
 mingw32-pkg-config \
 mingw32-nsis \
 mingw64-binutils \
 mingw64-gcc \
 mingw64-headers \
 mingw64-crt \
 mingw64-gcc-c++ \
 mingw64-pkg-config

# Build environment
RUN dnf -y install \
 git \
 gawk \
 yasm \
 gettext-devel \
 cmake \
 patch \
 libtool \
 automake \
 make \
 xz \
 bzip2 \
 which \
 sudo \
 java-1.8.0-openjdk \
 java-1.8.0-openjdk-devel

# LRC Req
RUN dnf -y install \
 mingw32-qt5-qtbase \
 mingw32-qt5-qttools \
 mingw64-qt5-qtbase \
 mingw64-qt5-qttools

# Client Req
RUN dnf -y install \
 mingw32-qt5-qtsvg \
 mingw64-qt5-qtsvg \
 mingw32-qt5-qtwinextras \
 mingw64-qt5-qtwinextras \
 mingw32-libidn \
 mingw64-libidn \
 mingw32-xz-libs \
 mingw64-xz-libs

# Buid Env. Var.

ENV CMAKE_PREFIX_PATH /usr/i686-w64-mingw32/sys-root/mingw/lib/cmake:/usr/x86_64-w64-mingw32/sys-root/mingw/lib/cmake
ENV QTDIR /usr/i686-w64-mingw32/sys-root/mingw/lib/qt5/:/usr/x86_64-w64-mingw32/sys-root/mingw/lib/qt5/
ENV PATH /usr/i686-w64-mingw32/bin/qt5/:/usr/x86_64-w64-mingw32/bin/qt5/:$PATH
