Skip to content

Commit

Permalink
Builds ghostscript 10.02.0
Browse files Browse the repository at this point in the history
  • Loading branch information
stumpylog committed Nov 7, 2023
1 parent b5a9c40 commit ae5aaa3
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions ghostscript.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
# Purpose:
# - Installs common packages
# - Sets common environment variables related to dpkg
# - Aquires the qpdf source from bookwork
# - Aquires the ghostscript source from bookwork
# Useful Links:
# - https://qpdf.readthedocs.io/en/stable/installation.html#system-requirements
# - https://wiki.debian.org/Multiarch/HOWTO
# - https://wiki.debian.org/CrossCompiling
#
Expand All @@ -23,7 +22,7 @@ ARG COMMON_BUILD_PACKAGES="\
equivs \
packaging-dev"

ENV DEB_BUILD_OPTIONS="terse nocheck nodoc parallel=2"
ENV DEB_BUILD_OPTIONS="terse nocheck nodoc parallel=4"

WORKDIR /usr/src

Expand Down Expand Up @@ -81,13 +80,15 @@ RUN set -eux \
&& echo "Building amd64" \
&& dpkg-buildpackage --build=binary --unsigned-source --unsigned-changes --post-clean \
&& echo "Removing debug files" \
&& rm -f ../*dbgsym*
&& rm -f ../*dbgsym* \
&& echo "Get build package versions" \
&& dpkg-query -f '${Package;-40}${Version}\n' -W > ../pkg-list.txt

#
# Stage: aarch64-builder
# Purpose:
# - Sets aarch64 specific environment
# - Builds qpdf for aarch64 (cross compile)
# - Builds ghostscript for aarch64 (cross compile)
#
FROM pre-build as aarch64-builder

Expand Down Expand Up @@ -133,11 +134,17 @@ RUN set -eux \
&& echo "Building arm64" \
&& dpkg-buildpackage --build=binary --unsigned-source --unsigned-changes --post-clean --host-arch arm64 \
&& echo "Removing debug files" \
&& rm -f ../*dbgsym*
&& rm -f ../*dbgsym* \
&& echo "Get build package versions" \
&& dpkg-query -f '${Package;-40}${Version}\n' -W > ../pkg-list.txt

FROM debian:bookworm-slim as package

WORKDIR /usr/src/ghostscript

COPY --from=amd64-builder /usr/src/*.deb .
COPY --from=amd64-builder /usr/src/pkg-list.txt amd64-pkg-list.txt
COPY --from=aarch64-builder /usr/src/*.deb .
COPY --from=aarch64-builder /usr/src/pkg-list.txt aarch64-pkg-list.txt

ENTRYPOINT [ "/usr/bin/bash" ]

0 comments on commit ae5aaa3

Please sign in to comment.