stagex/packages/apr/Containerfile

39 lines
1,003 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.4
ENV SRC_HASH=fc648de983f3a2a6c9e78dea1f180639bd2fad6c06d556d4367a701fe5c35577
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}
WORKDIR apr-${VERSION}
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/. /