stagex/packages/elfutils/Containerfile

62 lines
1.6 KiB
Text
Raw Normal View History

2024-08-08 07:47:42 +00:00
FROM scratch AS base
2024-02-05 10:42:27 +00:00
ENV VERSION=0.190
2024-02-09 07:30:28 +00:00
ENV SRC_HASH=8e00a3a9b5f04bc1dc273ae86281d2d26ed412020b391ffcc23198f10231d692
2024-02-05 10:42:27 +00:00
ENV SRC_FILE=elfutils-${VERSION}.tar.bz2
ENV SRC_SITE=https://sourceware.org/elfutils/ftp/${VERSION}/${SRC_FILE}
2024-08-08 07:47:42 +00:00
FROM base AS fetch
2024-02-09 07:30:28 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
2024-02-05 10:42:27 +00:00
2024-08-08 07:47:42 +00:00
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/bison . /
COPY --from=stagex/libtool . /
COPY --from=stagex/zlib . /
COPY --from=stagex/libzstd . /
COPY --from=stagex/flex . /
COPY --from=stagex/perl . /
COPY --from=stagex/autoconf . /
COPY --from=stagex/automake . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/gettext . /
COPY --from=stagex/m4 . /
COPY --from=stagex/argp-standalone . /
COPY --from=stagex/musl . /
COPY --from=stagex/musl-fts . /
COPY --from=stagex/musl-obstack . /
COPY --from=stagex/linux-headers . /
2024-02-09 07:30:28 +00:00
RUN tar -xjf ${SRC_FILE}
2024-08-26 01:18:52 +00:00
WORKDIR /elfutils-${VERSION}
2024-02-05 10:42:27 +00:00
ADD *.patch .
2024-02-09 07:30:28 +00:00
RUN --network=none <<-EOF
set -eux
patch -p1 < musl-macros.patch
autoreconf -vif
CFLAGS="-D_GNU_SOURCE -Wno-error -Wno-null-dereference" \
./configure \
--build="x86_64-linux-musl" \
--host="x86_64-linux-musl" \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var \
--program-prefix=eu- \
--enable-deterministic-archives \
--disable-nls \
--disable-progs \
--disable-libdebuginfod \
--disable-debuginfod \
--with-zstd
make -j "$(nproc)"
2024-02-09 07:30:28 +00:00
EOF
2024-02-05 10:42:27 +00:00
2024-08-08 07:47:42 +00:00
FROM build AS install
2024-02-09 07:30:28 +00:00
RUN --network=none make DESTDIR=/rootfs install
2024-02-05 10:42:27 +00:00
2024-08-08 07:47:42 +00:00
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /