You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.2 KiB
34 lines
1.2 KiB
FROM ubuntu:bionic as build
|
|
|
|
# Install required system packages
|
|
RUN apt-get update && apt-get install -y \
|
|
build-essential \
|
|
mingw-w64 \
|
|
autoconf \
|
|
libtool \
|
|
wget \
|
|
unzip
|
|
|
|
ARG UNAME=user
|
|
ARG UID=1000
|
|
ARG GID=1000
|
|
RUN groupadd -g $GID -o $UNAME
|
|
RUN useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME
|
|
|
|
USER $UNAME
|
|
|
|
WORKDIR /home/user
|
|
|
|
RUN wget -O secp256k1_anonswap.zip https://github.com/tecnovert/secp256k1/archive/refs/tags/anonswap_v0.2.zip && \
|
|
unzip secp256k1_anonswap.zip && \
|
|
mv secp256k1-anonswap_v0.2 64bit
|
|
|
|
RUN cd 64bit && \
|
|
./autogen.sh && \
|
|
echo "LDFLAGS = -no-undefined" >> Makefile.am && \
|
|
./configure --host=x86_64-w64-mingw32 --enable-module-recovery --enable-experimental --enable-module-ecdh --enable-module-extrakeys --enable-module-schnorrsig --enable-benchmark=no --enable-tests=no --enable-openssl-tests=no --enable-exhaustive-tests=no --enable-static --disable-dependency-tracking --with-pic --enable-module-ed25519 --enable-module-generator --enable-module-dleag --enable-module-ecdsaotves && \
|
|
make && \
|
|
mv .libs/libsecp256k1-0.dll .
|
|
|
|
FROM scratch as artifact
|
|
COPY --from=build /home/user/64bit/libsecp256k1-0.dll /coincurve/libsecp256k1.dll
|
|
|