stagex/packages/musl-fts/Containerfile

47 lines
1.1 KiB
Text
Raw Normal View History

2024-02-09 07:30:28 +00:00
FROM scratch as base
2024-02-03 15:10:57 +00:00
ENV VERSION=1.2.7
2024-02-10 11:43:02 +00:00
ENV SRC_HASH=49ae567a96dbab22823d045ffebe0d6b14b9b799925e9ca9274d47d26ff482a6
2024-02-03 15:10:57 +00:00
ENV SRC_FILE=v${VERSION}.tar.gz
ENV SRC_SITE=https://github.com/void-linux/musl-fts/archive/refs/tags/${SRC_FILE}
FROM base as fetch
2024-02-10 11:43:02 +00:00
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
2024-02-03 15:10:57 +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/musl . /
COPY --from=stagex/perl . /
COPY --from=stagex/autoconf . /
COPY --from=stagex/automake . /
COPY --from=stagex/libtool . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/m4 . /
2024-02-10 11:43:02 +00:00
RUN tar -xzf ${SRC_FILE}
WORKDIR musl-fts-${VERSION}
2024-02-09 07:30:28 +00:00
RUN --network=none <<-EOF
set -eux
./bootstrap.sh
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--localstatedir=/var
make
EOF
2024-02-03 15:10:57 +00:00
FROM build as install
2024-02-09 07:30:28 +00:00
RUN <<-EOF
set -eux
make DESTDIR=/rootfs install
install -Dm644 musl-fts.pc -t /rootfs/usr/lib/pkgconfig/
EOF
RUN find /rootfs -exec touch -hcd "@0" "{}" +
2024-02-03 15:10:57 +00:00
FROM stagex/filesystem as package
COPY --from=install /rootfs/. /