Skip to content

Commit

Permalink
update gpg
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwparent committed May 22, 2024
1 parent c758248 commit 1a9e4a9
Showing 1 changed file with 42 additions and 31 deletions.
73 changes: 42 additions & 31 deletions Dockerfiles/gpg/Dockerfile.gpg
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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}" \
Expand Down Expand Up @@ -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 \
Expand All @@ -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}" \
Expand Down

0 comments on commit 1a9e4a9

Please sign in to comment.