39 lines
998 B
Text
39 lines
998 B
Text
|
FROM scratch as base
|
||
|
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}
|
||
|
|
||
|
FROM base as fetch
|
||
|
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} ${SRC_FILE}
|
||
|
|
||
|
FROM fetch as build
|
||
|
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 \
|
||
|
--datadir=/usr/share \
|
||
|
--enable-nonportable-atomics=no \
|
||
|
--with-devrandom=/dev/urandom
|
||
|
make
|
||
|
EOF
|
||
|
|
||
|
FROM build as install
|
||
|
RUN make DESTDIR=/rootfs install
|
||
|
RUN find /rootfs -exec touch -hcd "@0" "{}" +
|
||
|
|
||
|
FROM stagex/filesystem as package
|
||
|
COPY --from=install /rootfs/. /
|