packages/

bison

Details
Source
FROM scratch AS base
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}

FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .

FROM fetch AS build
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 . /
RUN tar -xf ${SRC_FILE}
WORKDIR /bison-${VERSION}
ENV M4=/usr/bin/m4
RUN --network=none <<-EOF
	set -eux
	./configure \
		--prefix=/usr \
        --disable-nls
	make -j1 MAKEINFO=false
EOF

FROM build AS install
RUN --network=none make DESTDIR=/rootfs install

FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /