stagex/packages/nettle/Containerfile

40 lines
1 KiB
Text
Raw Normal View History

2024-02-26 21:24:28 +00:00
FROM scratch AS base
ENV VERSION=3.9.1_release_20230601
ENV SRC_HASH=7278dd8fb89cae88552e1dc4a6294f1c62a8a9548a18f635515242f389797fed
ENV SRC_FILE=nettle-nettle_${VERSION}.tar.gz
ENV SRC_SITE=https://git.lysator.liu.se/nettle/nettle/-/archive/nettle_${VERSION}/${SRC_FILE}
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/binutils . /
COPY --from=stagex/musl . /
COPY --from=stagex/make . /
COPY --from=stagex/perl . /
COPY --from=stagex/autoconf . /
COPY --from=stagex/automake . /
COPY --from=stagex/libtool . /
COPY --from=stagex/m4 . /
COPY --from=stagex/gcc . /
COPY --from=stagex/gmp . /
RUN --network=none tar -xf ${SRC_FILE}
WORKDIR nettle-nettle_${VERSION}
RUN --network=none <<EOF
set -eux
ls
autoreconf -vfi
./configure --prefix=/usr --libdir=/usr/lib --enable-public-key
make
EOF
FROM build AS install
RUN --network=none DESTDIR=/rootfs make install
RUN --network=none find /rootfs -exec touch -hcd "@0" "{}" +
FROM scratch AS package
COPY --from=install /rootfs/. /