stagex/packages/argp-standalone/Containerfile

46 lines
1.1 KiB
Text
Raw Normal View History

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
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-02-09 07:30:28 +00:00
RUN <<-EOF
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
make
EOF
2024-02-03 14:38:55 +00:00
FROM build as install
USER 0:0
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
RUN find /rootfs -exec touch -hcd "@0" "{}" +
2024-02-03 14:38:55 +00:00
FROM stagex/filesystem as package
COPY --from=install /rootfs/. /