stagex/packages/apr/Containerfile

39 lines
1,004 B
Text
Raw Normal View History

2024-08-18 23:09:39 +00:00
FROM scratch AS base
2024-08-16 19:26:04 +00:00
ARG ARCH=x86_64
ENV VERSION=1.7.5
ENV SRC_HASH=cd0f5d52b9ab1704c72160c5ee3ed5d3d4ca2df4a7f8ab564e3cb352b67232f2
2024-08-16 19:26:04 +00:00
ENV SRC_FILE=apr-${VERSION}.tar.bz2
ENV SRC_SITE=https://www.apache.org/dist/apr/${SRC_FILE}
2024-08-18 23:09:39 +00:00
FROM base AS fetch
2024-08-16 19:26:04 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} ${SRC_FILE}
2024-08-18 23:09:39 +00:00
FROM fetch AS build
2024-08-16 19:26:04 +00:00
COPY --from=stagex/musl . /
COPY --from=stagex/gcc . /
COPY --from=stagex/busybox . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/util-linux . /
RUN tar -xf ${SRC_FILE}
2024-08-26 01:18:52 +00:00
WORKDIR /apr-${VERSION}
2024-08-16 19:26:04 +00:00
COPY *.patch .
RUN --network=none <<-EOF
set -eux \
patch -p1 apr-1.6.2-dont-test-dlclose.patch
patch -p1 semtimedop-s390x.patch
./configure \
--prefix=/usr \
2024-08-16 19:26:04 +00:00
--datadir=/usr/share \
--enable-nonportable-atomics=no \
--with-devrandom=/dev/urandom
make -j "$(nproc)"
2024-08-16 19:26:04 +00:00
EOF
2024-08-18 23:09:39 +00:00
FROM build AS install
2024-08-16 19:26:04 +00:00
RUN make DESTDIR=/rootfs install
RUN find /rootfs -exec touch -hcd "@0" "{}" +
2024-08-18 23:09:39 +00:00
FROM stagex/filesystem AS package
2024-08-16 19:26:04 +00:00
COPY --from=install /rootfs/. /