diff --git a/packages/libarchive/Containerfile b/packages/libarchive/Containerfile new file mode 100644 index 0000000..8785bfd --- /dev/null +++ b/packages/libarchive/Containerfile @@ -0,0 +1,33 @@ +FROM scratch as base +ARG ARCH=x86_64 +ENV VERSION=3.7.4 +ENV SRC_HASH=f887755c434a736a609cbd28d87ddbfbe9d6a3bb5b703c22c02f6af80a802735 +ENV SRC_FILE=libarchive-${VERSION}.tar.xz +ENV SRC_SITE=https://libarchive.org/downloads/${SRC_FILE} + +FROM base as fetch +ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} . + +FROM fetch as build +COPY --from=stagex/busybox . / +COPY --from=stagex/binutils . / +COPY --from=stagex/musl . / +COPY --from=stagex/make . / +COPY --from=stagex/gcc . / +RUN tar -xf ${SRC_FILE} +WORKDIR libarchive-${VERSION} +RUN --network=none <<-EOF + set -ex + ./configure \ + --build=${ARCH}-linux-musl \ + --host=${ARCH}-linux-musl \ + --prefix=/usr \ + --without-xml2 + make -j "$(nproc)" +EOF + +FROM build as install +RUN --network=none make DESTDIR="/rootfs" install + +FROM stagex/filesystem as package +COPY --from=install /rootfs/. / diff --git a/src/packages.mk b/src/packages.mk index c6f0239..5406963 100644 --- a/src/packages.mk +++ b/src/packages.mk @@ -300,7 +300,8 @@ out/curl/index.json: \ out/gcc/index.json \ out/make/index.json \ out/musl/index.json \ - out/openssl/index.json + out/openssl/index.json \ + out/perl/index.json $(call build,curl) .PHONY: diffutils @@ -861,6 +862,18 @@ out/kustomize-sops/index.json: \ out/go/index.json $(call build,kustomize-sops) +.PHONY: libarchive +libarchive: out/libarchive/index.json +out/libarchive/index.json: \ + packages/libarchive/Containerfile \ + out/binutils/index.json \ + out/busybox/index.json \ + out/filesystem/index.json \ + out/gcc/index.json \ + out/make/index.json \ + out/musl/index.json + $(call build,libarchive) + .PHONY: libassuan libassuan: out/libassuan/index.json out/libassuan/index.json: \