feat: package acpica and nasm

This commit is contained in:
Anton Livaja 2024-09-11 12:21:27 -04:00
parent 38d295d61b
commit 787b9fcb20
No known key found for this signature in database
GPG key ID: 44A86CFF1FDF0E85
2 changed files with 65 additions and 0 deletions

View file

@ -0,0 +1,30 @@
FROM scratch as base
ENV VERSION=20230628
ENV SRC_HASH=86876a745e3d224dcfd222ed3de465b47559e85811df2db9820ef09a9dff5cce
ENV SRC_FILE=acpica-unix-${VERSION}.tar.gz
ENV SRC_SITE=https://downloadmirror.intel.com/783549/${SRC_FILE}
FROM base as fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch as build
COPY --from=stagex/busybox . /
COPY --from=stagex/gcc . /
COPY --from=stagex/musl . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/bison . /
COPY --from=stage/flex . /
RUN tar -xf ${SRC_FILE}
WORKDIR acpica-unix-${VERSION}
RUN --network=none <<-EOF
set -eux
export LDFLAGS="${LDFLAGS/-Wl,-z,pack-relative-relocs}"
make NOWERROR=TRUE -j "$(nproc)"
EOF
FROM build AS install
RUN --network=none DESTDIR=/rootfs make install
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

View file

@ -0,0 +1,35 @@
FROM scratch as base
ENV VERSION=2.16.03
ENV SRC_HASH=86876a745e3d224dcfd222ed3de465b47559e85811df2db9820ef09a9dff5cce
ENV SRC_FILE=nasm-${VERSION}.tar.xz
ENV SRC_SITE=https://www.nasm.us/pub/nasm/releasebuilds/${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/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/bison . /
COPY --from=stage/flex . /
COPY --from=stagex/musl . /
COPY --from=stagex/perl . /
RUN tar -xf ${SRC_FILE}
WORKDIR nasm-${VERSION}
RUN --network=none <<-EOF
set -eux
CFLAGS="$CFLAGS -O2 -flto=auto" \
./configure \
--build=x86_64-linux-musl \
--host=x86_64-linux-musl \
--prefix=/usr
make -j "$(nproc)"
EOF
FROM build AS install
RUN --network=none DESTDIR=/rootfs make install
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /