Skip to content

Commit

Permalink
Add LibreOffice to the Dockerfile and include a new make command.
Browse files Browse the repository at this point in the history
Signed-off-by: Dscano <[email protected]>
  • Loading branch information
Dscano committed Dec 30, 2024
1 parent a93198f commit d9aea99
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ jobs:
- uses: actions/checkout@v3
- name: Build spec
run: |
docker run -v `pwd`/docs/v1:/usr/src/p4-spec p4lang/p4rt-asciidoc :latest make
docker run -v `pwd`/docs/v1:/usr/src/p4-spec p4lang/p4rt-asciidoc :latest make ci
ls docs/v1/build
3 changes: 2 additions & 1 deletion docs/tools/Dockerfile.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ LABEL description="Dockerfile used for building the asciidoc specification"
RUN apt-get update && \
apt-get install -y cmake flex bison libglib2.0-dev libcairo2-dev libpango1.0-dev libxml2-dev libwebp-dev libzstd-dev libgdk-pixbuf-2.0-dev time

RUN gem install asciidoctor && \
RUN apt-get install -y libreoffice && \
gem install asciidoctor && \
echo 'gem: --no-document' > /etc/gemrc && \
gem install nokogiri && \
gem install rghost && \
Expand Down
7 changes: 6 additions & 1 deletion docs/v1/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ ROUGE_CSS=style
all: ${SPEC}.pdf ${SPEC}.html

build:
mkdir -p build

${SPEC}.pdf: ${SPEC}.adoc
time asciidoctor-pdf -v \
Expand All @@ -23,5 +22,11 @@ ${SPEC}.html: ${SPEC}.adoc
-r asciidoctor-lists \
-a rouge-css=$(ROUGE_CSS) $<

images:
soffice --convert-to png --outdir resources/figs resources/figs/*.odg > /dev/null 2>&1

ci: images all


clean:
/bin/rm -f ${SPEC}.pdf ${SPEC}.html

0 comments on commit d9aea99

Please sign in to comment.