stagex/packages/re2c/Containerfile

38 lines
974 B
Text
Raw Normal View History

FROM scratch AS base
2024-08-16 19:26:04 +00:00
ENV VERSION=3.1
ENV SRC_HASH=087c44de0400fb15caafde09fd72edc7381e688a35ef505ee65e0e3d2fac688b
ENV SRC_FILE=${VERSION}.tar.gz
ENV SRC_SITE=https://github.com/skvadrik/re2c/archive/refs/tags/${SRC_FILE}
FROM base AS fetch
2024-08-16 19:26:04 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
2024-08-16 19:26:04 +00:00
COPY --from=stagex/autoconf . /
COPY --from=stagex/automake . /
COPY --from=stagex/binutils . /
COPY --from=stagex/busybox . /
COPY --from=stagex/libtool . /
COPY --from=stagex/perl . /
COPY --from=stagex/python . /
COPY --from=stagex/gcc . /
COPY --from=stagex/make . /
COPY --from=stagex/m4 . /
COPY --from=stagex/musl . /
RUN tar -xvf $SRC_FILE
WORKDIR re2c-${VERSION}
RUN --network=none <<-EOF
set -eux
autoreconf -i -W all
./configure \
--prefix=/usr
make -j "$(nproc)"
2024-08-16 19:26:04 +00:00
EOF
FROM build AS install
2024-08-16 19:26:04 +00:00
RUN make DESTDIR=/rootfs install
RUN find /rootfs -exec touch -hcd "@0" "{}" +
FROM stagex/filesystem AS package
2024-08-16 19:26:04 +00:00
COPY --from=install /rootfs/. /