Merge remote-tracking branch 'origin/lance/jq' into staging
This commit is contained in:
commit
54065d26e4
2 changed files with 51 additions and 0 deletions
39
packages/jq/Containerfile
Normal file
39
packages/jq/Containerfile
Normal file
|
@ -0,0 +1,39 @@
|
|||
FROM scratch as base
|
||||
ARG ARCH=x86_64
|
||||
ENV VERSION=1.7.1
|
||||
ENV SRC_HASH=478c9ca129fd2e3443fe27314b455e211e0d8c60bc8ff7df703873deeee580c2
|
||||
ENV SRC_FILE=jq-${VERSION}.tar.gz
|
||||
ENV SRC_SITE=https://github.com/jqlang/jq/releases/download/jq-${VERSION}/${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 jq-${VERSION}
|
||||
RUN --network=none <<-EOF
|
||||
set -ex
|
||||
./configure \
|
||||
--build=${ARCH}-linux-musl \
|
||||
--host=${ARCH}-linux-musl \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/etc \
|
||||
--mandir=/usr/share/man \
|
||||
--disable-docs
|
||||
make -j "$(nproc)"
|
||||
EOF
|
||||
|
||||
FROM build as install
|
||||
RUN --network=none <<-EOF
|
||||
set -eu
|
||||
make DESTDIR="/rootfs" install
|
||||
EOF
|
||||
|
||||
FROM stagex/filesystem as package
|
||||
COPY --from=install /rootfs/. /
|
|
@ -666,6 +666,18 @@ out/iputils/index.json: \
|
|||
out/zlib/index.json
|
||||
$(call build,iputils)
|
||||
|
||||
.PHONY: jq
|
||||
jq: out/jq/index.json
|
||||
out/jq/index.json: \
|
||||
packages/jq/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,jq)
|
||||
|
||||
.PHONY: json-c
|
||||
json-c: out/json-c/index.json
|
||||
out/json-c/index.json: \
|
||||
|
|
Loading…
Reference in a new issue