stagex/packages/libunwind/Containerfile

42 lines
1.1 KiB
Text
Raw Normal View History

2024-02-09 07:30:28 +00:00
FROM scratch as base
ENV VERSION=1.7.2
2023-12-06 12:56:43 +00:00
ENV SRC_HASH=a18a6a24307443a8ace7a8acc2ce79fbbe6826cd0edf98d6326d0225d6a5d6e6
2024-02-09 07:30:28 +00:00
ENV SRC_FILE=libunwind-${VERSION}.tar.gz
ENV SRC_SITE=https://github.com/libunwind/libunwind/releases/download/v${VERSION}/${SRC_FILE}
2023-12-16 23:50:40 +00:00
FROM base as fetch
2024-02-09 07:30:28 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
2023-12-16 23:50:40 +00:00
FROM fetch as build
2024-02-09 07:30:28 +00:00
COPY --from=busybox . /
COPY --from=gcc . /
COPY --from=make . /
COPY --from=musl . /
COPY --from=binutils . /
COPY --from=autoconf . /
COPY --from=automake . /
COPY --from=libtool . /
RUN tar -xf ${SRC_FILE}
WORKDIR libunwind-${VERSION}
RUN --network=none <<-EOF
set -eux
./configure \
--build=x86_64-unknown-linux-musl \
--host=x86_64-unknown-linux-musl \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/usr/share/man \
--enable-cxx-exceptions \
--disable-tests \
--infodir=/usr/share/info || cat config.log
make
EOF
2023-12-16 23:50:40 +00:00
FROM build as install
RUN --network=none make DESTDIR=/rootfs install
RUN find /rootfs -exec touch -hcd "@0" "{}" +
2023-12-06 12:56:43 +00:00
2023-12-12 17:45:39 +00:00
FROM scratch as package
2023-12-16 23:50:40 +00:00
COPY --from=install /rootfs /