add xorriso
This commit is contained in:
parent
088bb4f08f
commit
3f988b9876
2 changed files with 56 additions and 0 deletions
45
src/core/xorriso/Containerfile
Normal file
45
src/core/xorriso/Containerfile
Normal file
|
@ -0,0 +1,45 @@
|
|||
FROM scratch as base
|
||||
ENV SRC_VERSION=1.5.6
|
||||
ENV SRC_HASH=786f9f5df9865cc5b0c1fecee3d2c0f5e04cab8c9a859bd1c9c7ccd4964fdae1
|
||||
ENV SRC_FILE=xorriso-${SRC_VERSION}.pl02.tar.gz
|
||||
ENV SRC_SITE=https://www.gnu.org/software/xorriso/${SRC_FILE}
|
||||
|
||||
FROM base as fetch
|
||||
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} ${SRC_FILE}
|
||||
|
||||
FROM fetch as build
|
||||
COPY --from=busybox . /
|
||||
COPY --from=gcc . /
|
||||
COPY --from=binutils . /
|
||||
COPY --from=make . /
|
||||
COPY --from=musl . /
|
||||
COPY --from=linux-headers . /
|
||||
RUN tar -xf ${SRC_FILE}
|
||||
WORKDIR xorriso-${SRC_VERSION}
|
||||
RUN --network=none <<-EOF
|
||||
set -eux; \
|
||||
./configure \
|
||||
--prefix=/usr
|
||||
make
|
||||
EOF
|
||||
|
||||
FROM build as install
|
||||
RUN make DESTDIR=/rootfs install
|
||||
RUN find /rootfs -exec touch -hcd "@0" "{}" +
|
||||
|
||||
FROM base as test
|
||||
COPY --from=install /rootfs /
|
||||
COPY --from=musl . /
|
||||
COPY --from=busybox . /
|
||||
RUN xorriso --version
|
||||
RUN /bin/sh <<-EOF
|
||||
set -eux
|
||||
XORRISO_VERSION=$(xorriso --version | grep 'xorriso version' | sed -E 's/^.*: +([^ ]+).*$/\1/')
|
||||
if [ "${SRC_VERSION}.pl02" != "\$XORRISO_VERSION" ]; then
|
||||
echo "Expected xorriso version is \$SRC_VERSION.pl02, but got \$XORRISO_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
EOF
|
||||
|
||||
FROM scratch as package
|
||||
COPY --from=install /rootfs /
|
|
@ -405,6 +405,17 @@ out/sed/index.json: \
|
|||
out/musl/index.json
|
||||
$(call build,core,sed)
|
||||
|
||||
.PHONY: xorriso
|
||||
xorriso: out/xorriso/index.json
|
||||
out/xorriso/index.json: \
|
||||
src/core/xorriso/Containerfile \
|
||||
out/binutils/index.json \
|
||||
out/busybox/index.json \
|
||||
out/gcc/index.json \
|
||||
out/make/index.json \
|
||||
out/musl/index.json
|
||||
$(call build,core,xorriso)
|
||||
|
||||
.PHONY: zlib
|
||||
zlib: out/zlib/index.json
|
||||
out/zlib/index.json: \
|
||||
|
|
Loading…
Reference in a new issue