2024-08-08 07:47:42 +00:00
|
|
|
FROM scratch AS base
|
2024-02-10 21:09:22 +00:00
|
|
|
ENV VERSION=3.4.2
|
|
|
|
ENV SRC_HASH=27d05534699735dc69e86add5b808d6cb35900ad3fd63fa82e3eb644336abfa0
|
|
|
|
ENV SRC_FILE=bison-${VERSION}.tar.xz
|
|
|
|
ENV SRC_SITE=http://mirrors.kernel.org/gnu/bison/${SRC_FILE}
|
2024-02-02 21:38:33 +00:00
|
|
|
|
2024-08-08 07:47:42 +00:00
|
|
|
FROM base AS fetch
|
2024-02-09 11:23:22 +00:00
|
|
|
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
2024-02-02 21:38:33 +00:00
|
|
|
|
2024-08-08 07:47:42 +00:00
|
|
|
FROM fetch AS build
|
2024-02-15 15:22:38 +00:00
|
|
|
COPY --from=stagex/musl . /
|
|
|
|
COPY --from=stagex/busybox . /
|
|
|
|
COPY --from=stagex/gcc . /
|
|
|
|
COPY --from=stagex/binutils . /
|
|
|
|
COPY --from=stagex/perl . /
|
|
|
|
COPY --from=stagex/autoconf . /
|
|
|
|
COPY --from=stagex/automake . /
|
|
|
|
COPY --from=stagex/make . /
|
|
|
|
COPY --from=stagex/m4 . /
|
2024-02-02 21:38:33 +00:00
|
|
|
RUN tar -xf ${SRC_FILE}
|
2024-02-09 07:30:28 +00:00
|
|
|
WORKDIR bison-${VERSION}
|
2024-02-10 21:09:22 +00:00
|
|
|
ENV M4=/usr/bin/m4
|
2024-02-09 07:30:28 +00:00
|
|
|
RUN --network=none <<-EOF
|
|
|
|
set -eux
|
|
|
|
./configure \
|
2024-02-10 21:09:22 +00:00
|
|
|
--prefix=/usr \
|
|
|
|
--disable-nls
|
|
|
|
make -j1 MAKEINFO=false
|
2024-02-09 07:30:28 +00:00
|
|
|
EOF
|
2024-02-02 21:38:33 +00:00
|
|
|
|
2024-08-08 07:50:50 +00:00
|
|
|
FROM build AS install
|
2024-02-09 07:30:28 +00:00
|
|
|
RUN --network=none make DESTDIR=/rootfs install
|
2024-02-02 21:38:33 +00:00
|
|
|
|
2024-08-08 07:47:42 +00:00
|
|
|
FROM stagex/filesystem AS package
|
2024-03-01 18:30:23 +00:00
|
|
|
COPY --from=install /rootfs/. /
|