diff --git a/Dockerfiles/gpg/Dockerfile.gpg b/Dockerfiles/gpg/Dockerfile.gpg index 8f18524..b1092aa 100644 --- a/Dockerfiles/gpg/Dockerfile.gpg +++ b/Dockerfiles/gpg/Dockerfile.gpg @@ -1,35 +1,46 @@ FROM mingw-w64 + +ARG GNUPG_VERSION=2.4.5 +ARG ICONV_VERSION=1.16 +ARG LIBASSUAN_VERSION=2.5.5 +ARG LIBGCRYPT_VERSION=1.10.2 +ARG LIBGPGERROR_VERSION=1.47 +ARG LIBKSBA_VERSION=1.6.3 +ARG NPTH_VERSION=1.6 +ARG PINENTRY_VERSION=1.2.1 + RUN mkdir -p /sources/tarballs /opt/deps /opt/gpg ENV DEP_PREFIX=/opt/deps ENV PREFIX=/opt/gpg WORKDIR /sources/tarballs # Fetch sources RUN curl -L --remote-name-all\ - https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.4.3.tar.bz2 \ - https://gnupg.org/ftp/gcrypt/npth/npth-1.6.tar.bz2 \ - https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.47.tar.bz2 \ - https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.10.2.tar.bz2 \ - https://gnupg.org/ftp/gcrypt/libksba/libksba-1.6.3.tar.bz2 \ - https://gnupg.org/ftp/gcrypt/libassuan/libassuan-2.5.5.tar.bz2 \ - https://gnupg.org/ftp/gcrypt/pinentry/pinentry-1.2.1.tar.bz2 \ - https://ftp.gnu.org/gnu/libiconv/pinentry-1.2.1.tar.bz2 + https://gnupg.org/ftp/gcrypt/gnupg/gnupg-$GNUPG_VERSION.tar.bz2 \ + https://gnupg.org/ftp/gcrypt/npth/npth-$NPTH_VERSION.tar.bz2 \ + https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-$LIBGPGERROR_VERSION.tar.bz2 \ + https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-$LIBGCRYPT_VERSION.tar.bz2 \ + https://gnupg.org/ftp/gcrypt/libksba/libksba-$LIBKSBA_VERSION.tar.bz2 \ + https://gnupg.org/ftp/gcrypt/libassuan/libassuan-$LIBASSUAN_VERSION.tar.bz2 \ + https://gnupg.org/ftp/gcrypt/pinentry/pinentry-$PINENTRY_VERSION.tar.bz2 \ + https://ftp.gnu.org/gnu/libiconv/libiconv-$ICONV_VERSION.tar.gz WORKDIR /sources/source # Extract sources -RUN tar -oxf /sources/tarballs/gnupg-2.4.3.tar.bz2 -RUN tar -oxf /sources/tarballs/npth-1.6.tar.bz2 -RUN tar -oxf /sources/tarballs/libgcrypt-1.10.2.tar.bz2 -RUN tar -oxf /sources/tarballs/libksba-1.6.3.tar.bz2 -RUN tar -oxf /sources/tarballs/libassuan-2.5.5.tar.bz2 -RUN tar -oxf /sources/tarballs/pinentry-1.2.1.tar.bz2 -RUN tar -oxf /sources/tarballs/pinentry-1.2.1.tar.bz2 +RUN tar -oxf /sources/tarballs/gnupg-$GNUPG_VERSION.tar.bz2 +RUN tar -oxf /sources/tarballs/npth-$NPTH_VERSION.tar.bz2 +RUN tar -oxf /sources/tarballs/libgcrypt-$LIBGCRYPT_VERSION.tar.bz2 +RUN tar -oxf /sources/tarballs/libksba-$LIBKSBA_VERSION.tar.bz2 +RUN tar -oxf /sources/tarballs/libassuan-$LIBASSUAN_VERSION.tar.bz2 +RUN tar -oxf /sources/tarballs/pinentry-$PINENTRY_VERSION.tar.bz2 +RUN tar -oxf /sources/tarballs/libiconv-$ICONV_VERSION.tar.gz +RUN tar -oxf /sources/tarballs/libgpg-error-$LIBGPGERROR_VERSION.tar.bz2 WORKDIR /sources/source # install npth -RUN cd npth && \ - /npth-1.6/configure && \ +RUN cd npth-$NPTH_VERSION && \ + ./configure \ --host=x86_64-w64-mingw32 \ --prefix="${DEP_PREFIX}" \ --enable-shared=no \ @@ -39,8 +50,8 @@ RUN cd npth && \ make install # install libgpg-error -RUN cd libgpg-erro && \ - libgpg-error/configure \ +RUN cd libgpg-error-$LIBGPGERROR_VERSION && \ + ./configure \ --host=x86_64-w64-mingw32 \ --prefix="${DEP_PREFIX}" \ --enable-shared=no \ @@ -54,8 +65,8 @@ RUN cd libgpg-erro && \ && cp src/gpg-error-config /deps/bin/ # install libassuan -RUN cd libassuan && \ - libassuan-2.5.5/configure \ +RUN cd libassuan-$LIBASSUAN_VERSION && \ + ./configure \ --host=x86_64-w64-mingw32 \ --prefix="${DEP_PREFIX}" \ --enable-shared=no \ @@ -65,8 +76,8 @@ RUN cd libassuan && \ && make -j$(nproc) \ && make install -WORKDIR /libgcrypt -RUN /libgcrypt-$LIBGCRYPT_VERSION/configure \ +RUN cd libgcrypt-$LIBGCRYPT_VERSION &&\ + ./configure \ --host=x86_64-w64-mingw32 \ --prefix="${DEP_PREFIX}" \ --enable-shared=no \ @@ -77,8 +88,8 @@ RUN /libgcrypt-$LIBGCRYPT_VERSION/configure \ && make -j$(nproc) \ && make install -WORKDIR /libksba -RUN /libksba-$LIBKSBA_VERSION/configure \ +RUN cd libksba-$LIBKSBA_VERSION && \ + ./configure \ --host=x86_64-w64-mingw32 \ --prefix="${DEP_PREFIX}" \ --enable-shared=no \ @@ -87,8 +98,8 @@ RUN /libksba-$LIBKSBA_VERSION/configure \ && make -j$(nproc) \ && make install -WORKDIR /gnupg -RUN /gnupg-$GNUPG_VERSION/configure \ +RUN cd gnupg-$GNUPG_VERSION && \ + ./configure \ --host=x86_64-w64-mingw32 \ --prefix="${PREFIX}" \ --with-npth-prefix="${DEP_PREFIX}" \ @@ -124,8 +135,8 @@ RUN /gnupg-$GNUPG_VERSION/configure \ && make -j$(nproc) \ && make install -WORKDIR /iconv -RUN /libiconv-$ICONV_VERSION/configure \ +RUN cd libiconv-$ICONV_VERSION && \ + ./configure \ --host=x86_64-w64-mingw32 \ --prefix="${DEP_PREFIX}" \ --enable-shared=no \ @@ -136,8 +147,8 @@ RUN /libiconv-$ICONV_VERSION/configure \ && make -j$(nproc) \ && make install -WORKDIR /pinentry -RUN /pinentry-$PINENTRY_VERSION/configure \ +RUN cd pinentry-$PINENTRY_VERSION &&\ + ./configure \ --host=x86_64-w64-mingw32 \ --prefix="${PREFIX}" \ --with-libgpg-error-prefix="${DEP_PREFIX}" \