2024-02-09 07:30:28 +00:00
|
|
|
FROM scratch as base
|
2024-02-03 14:38:55 +00:00
|
|
|
ENV VERSION=1.5.0
|
|
|
|
ENV SRC_FILE=${VERSION}.tar.gz
|
|
|
|
ENV SRC_SITE=https://github.com/argp-standalone/argp-standalone/archive/refs/tags/${SRC_FILE}
|
|
|
|
ENV SRC_HASH=c29eae929dfebd575c38174f2c8c315766092cec99a8f987569d0cad3c6d64f6
|
|
|
|
|
|
|
|
FROM base as fetch
|
2024-02-09 11:23:22 +00:00
|
|
|
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
2024-02-03 14:38:55 +00:00
|
|
|
|
|
|
|
FROM fetch as build
|
2024-02-15 15:22:38 +00:00
|
|
|
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/m4 . /
|
2024-02-03 14:38:55 +00:00
|
|
|
RUN tar -xf ${SRC_FILE}
|
|
|
|
WORKDIR argp-standalone-${VERSION}
|
2024-04-11 20:09:20 +00:00
|
|
|
RUN --network=none <<-EOF
|
2024-02-09 07:30:28 +00:00
|
|
|
set -eux
|
2024-02-10 05:02:22 +00:00
|
|
|
/usr/bin/autoreconf -vif
|
2024-02-09 07:30:28 +00:00
|
|
|
CFLAGS="-fPIC" \
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--infodir=/usr/share/info \
|
|
|
|
--localstatedir=/var
|
2024-03-14 07:16:26 +00:00
|
|
|
make -j "$(nproc)"
|
2024-02-09 07:30:28 +00:00
|
|
|
EOF
|
2024-02-03 14:38:55 +00:00
|
|
|
|
|
|
|
FROM build as install
|
2024-02-09 07:30:28 +00:00
|
|
|
RUN <<-EOF
|
|
|
|
set -eux
|
|
|
|
install -D -m644 argp.h /rootfs/usr/include/argp.h
|
|
|
|
install -D -m755 libargp.a /rootfs/usr/lib/libargp.a
|
|
|
|
EOF
|
2024-02-03 14:38:55 +00:00
|
|
|
|
2024-03-01 18:30:23 +00:00
|
|
|
FROM stagex/filesystem as package
|
|
|
|
COPY --from=install /rootfs/. /
|