stagex/packages/flex/Containerfile

44 lines
1.2 KiB
Text
Raw Normal View History

2024-02-09 07:30:28 +00:00
FROM scratch as base
2024-02-03 13:24:28 +00:00
ENV VERSION=2.6.4
ENV SRC_HASH=e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995
ENV SRC_FILE=flex-${VERSION}.tar.gz
2024-02-09 07:30:28 +00:00
ENV SRC_SITE=https://github.com/westes/flex/releases/download/v${VERSION}/${SRC_FILE}
2024-02-02 21:38:33 +00:00
FROM base as fetch
2024-02-10 10:37:48 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
2024-02-02 21:38:33 +00:00
FROM fetch as build
COPY --from=stagex/busybox . /
COPY --from=stagex/perl . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/m4 . /
COPY --from=stagex/libtool . /
COPY --from=stagex/autoconf . /
COPY --from=stagex/automake . /
COPY --from=stagex/bison . /
COPY --from=stagex/gettext . /
COPY --from=stagex/musl . /
2024-02-10 10:39:07 +00:00
RUN tar -xzf ${SRC_FILE}
WORKDIR flex-${VERSION}
2024-02-09 07:30:28 +00:00
RUN --network=none <<-EOF
set -eux
./autogen.sh
./configure \
--build=x86_64-unknown-linux-musl \
--host=x86_64-unknown-linux-musl \
--prefix=/usr \
--bindir=/usr/bin \
2024-02-09 07:30:28 +00:00
--mandir=/usr/share/man \
--infodir=/usr/share/info
make LDFLAGS=-static
EOF
2024-02-02 21:38:33 +00:00
FROM build as install
2024-02-09 07:30:28 +00:00
RUN --network=none make DESTDIR=/rootfs install
RUN find /rootfs -exec touch -hcd "@0" "{}" +
2024-02-02 21:38:33 +00:00
FROM stagex/filesystem as package
COPY --from=install /rootfs/. /