feat: add file
This commit is contained in:
parent
f1bfb939e6
commit
a1ec18d83a
2 changed files with 58 additions and 2 deletions
39
packages/file/Containerfile
Normal file
39
packages/file/Containerfile
Normal file
|
@ -0,0 +1,39 @@
|
|||
FROM scratch as base
|
||||
ARG ARCH=x86_64
|
||||
ENV VERSION=5.45
|
||||
ENV SRC_HASH=28c01a5ef1a127ef71758222ca019ba6c6bfa4a8fe20c2b525ce75943ee9da3c
|
||||
ENV SRC_FILE=FILE5_45.tar.gz
|
||||
ENV SRC_SITE=https://github.com/file/file/archive/${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/perl . /
|
||||
COPY --from=stagex/autoconf . /
|
||||
COPY --from=stagex/automake . /
|
||||
COPY --from=stagex/libtool . /
|
||||
COPY --from=stagex/m4 . /
|
||||
COPY --from=stagex/gcc . /
|
||||
RUN tar -xf ${SRC_FILE}
|
||||
WORKDIR file-FILE5_45/
|
||||
RUN --network=none <<-EOF
|
||||
set -eux
|
||||
autoreconf -fvi
|
||||
./configure \
|
||||
--build=${ARCH}-linux-musl \
|
||||
--host=${ARCH}-linux-musl \
|
||||
--datadir=/usr/share
|
||||
make -j "$(nproc)"
|
||||
EOF
|
||||
|
||||
FROM build as install
|
||||
RUN --network=none make DESTDIR="/rootfs" install
|
||||
RUN find /rootfs -exec touch -hcd "@0" "{}" +
|
||||
|
||||
FROM scratch as package
|
||||
COPY --from=install /rootfs /
|
|
@ -59,7 +59,6 @@ out/bc/index.json: \
|
|||
out/bash/index.json \
|
||||
out/binutils/index.json \
|
||||
out/bison/index.json \
|
||||
out/busybox/index.json \
|
||||
out/coreutils/index.json \
|
||||
out/ed/index.json \
|
||||
out/findutils/index.json \
|
||||
|
@ -109,7 +108,8 @@ out/busybox/index.json: \
|
|||
.PHONY: ca-certificates
|
||||
ca-certificates: out/ca-certificates/index.json
|
||||
out/ca-certificates/index.json: \
|
||||
packages/ca-certificates/Containerfile
|
||||
packages/ca-certificates/Containerfile \
|
||||
out/busybox/index.json
|
||||
$(call build,ca-certificates)
|
||||
|
||||
.PHONY: cmake
|
||||
|
@ -230,6 +230,22 @@ out/elfutils/index.json: \
|
|||
out/zlib/index.json
|
||||
$(call build,elfutils)
|
||||
|
||||
.PHONY: file
|
||||
file: out/file/index.json
|
||||
out/file/index.json: \
|
||||
packages/file/Containerfile \
|
||||
out/autoconf/index.json \
|
||||
out/automake/index.json \
|
||||
out/binutils/index.json \
|
||||
out/busybox/index.json \
|
||||
out/gcc/index.json \
|
||||
out/libtool/index.json \
|
||||
out/m4/index.json \
|
||||
out/make/index.json \
|
||||
out/musl/index.json \
|
||||
out/perl/index.json
|
||||
$(call build,file)
|
||||
|
||||
.PHONY: findutils
|
||||
findutils: out/findutils/index.json
|
||||
out/findutils/index.json: \
|
||||
|
@ -275,6 +291,7 @@ gcc: out/gcc/index.json
|
|||
out/gcc/index.json: \
|
||||
packages/gcc/Containerfile \
|
||||
out/binutils/index.json \
|
||||
out/busybox/index.json \
|
||||
out/musl/index.json \
|
||||
out/stage3/index.json
|
||||
$(call build,gcc)
|
||||
|
|
Loading…
Reference in a new issue