38 lines
960 B
Text
38 lines
960 B
Text
|
FROM scratch as base
|
||
|
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
|
||
|
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
||
|
|
||
|
FROM fetch as build
|
||
|
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
|
||
|
EOF
|
||
|
|
||
|
FROM build as install
|
||
|
RUN make DESTDIR=/rootfs install
|
||
|
RUN find /rootfs -exec touch -hcd "@0" "{}" +
|
||
|
|
||
|
FROM stagex/filesystem as package
|
||
|
COPY --from=install /rootfs/. /
|