Skip to content

Commit

Permalink
add jing for fedora builds. (GPSBabel#942)
Browse files Browse the repository at this point in the history
* add jing for fedora builds.

fedora f35 and on don't have a maintainer and thus the package
isn't available.  kludge in jing on f35.

* improve document validation.

* don't force jeng on f35
  • Loading branch information
tsteven4 authored Nov 24, 2022
1 parent c21589e commit 39e3dee
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tools/Dockerfile_f32
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN dnf install --assumeyes libusbx-devel zlib-devel shapelib-devel && \
RUN dnf install --assumeyes qt5-qtbase-devel qt5-qtserialport-devel qt5-qtwebengine-devel qt5-linguist qt5-qttranslations && \
dnf clean all
# tools to build the docs
RUN dnf install --assumeyes expat desktop-file-utils libxslt docbook-style-xsl fop && \
RUN dnf install --assumeyes expat desktop-file-utils libxslt docbook-style-xsl fop docbook5-style-xsl jing && \
dnf clean all
# create a link as fedora uses the name qmake-qt5 for Qt5's qmake.
RUN alternatives --install /usr/bin/qmake qt /usr/lib64/qt5/bin/qmake 100
2 changes: 1 addition & 1 deletion tools/Dockerfile_f35
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN dnf install --assumeyes libusb1-devel zlib-devel shapelib-devel && \
RUN dnf install --assumeyes qt5-qtbase-devel qt5-qtserialport-devel qt5-qtwebengine-devel qt5-linguist qt5-qttranslations && \
dnf clean all
# tools to build the docs
RUN dnf install --assumeyes expat desktop-file-utils libxslt docbook-style-xsl fop && \
RUN dnf install --assumeyes expat desktop-file-utils libxslt docbook-style-xsl fop docbook5-style-xsl && \
dnf clean all
# create a link as fedora uses the name qmake-qt5 for Qt5's qmake.
RUN alternatives --install /usr/bin/qmake qt /usr/lib64/qt5/bin/qmake 100
13 changes: 13 additions & 0 deletions tools/make_gpsbabel_doc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
set -ex

perl xmldoc/makedoc
xmllint --noout --relaxng http://www.oasis-open.org/docbook/xml/5.0/rng/docbook.rng xmldoc/readme.xml
# the following doesn't seem to work.
#xmllint --noout --schematron http://www.oasis-open.org/docbook/xml/5.0/sch/docbook.sch xmldoc/readme.xml
# jing and many depedencies removed from fedora
if command -v jing >/dev/null 2>&1; then
jing http://docs.oasis-open.org/docbook/xml/5.0/rng/docbook.rng xmldoc/readme.xml
# can seed a failure by removing version="5.0" from xmldoc/readme.xml
jing http://docs.oasis-open.org/docbook/xml/5.0/sch/docbook.sch xmldoc/readme.xml
fi
5 changes: 3 additions & 2 deletions tools/make_gpsbabel_html.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/bin/sh
set -ex

perl xmldoc/makedoc
jing http://docs.oasis-open.org/docbook/rng/5.0/docbook.rng xmldoc/readme.xml
tooldir=$(cd "$(dirname "$0")" && pwd)

"$tooldir"/make_gpsbabel_doc.sh
xsltproc \
--output gpsbabel.html \
--stringparam toc.section.depth "1" \
Expand Down
12 changes: 6 additions & 6 deletions tools/make_gpsbabel_org.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#!/bin/sh
set -ex

web=$1
docversion=$2
web=${1:-gpsbabel.org}
docversion=${2:-x.y.z}
tooldir=$(cd "$(dirname "$0")" && pwd)

mkdir -p "${web}/htmldoc-${docversion}"
perl xmldoc/makedoc
jing http://docs.oasis-open.org/docbook/rng/5.0/docbook.rng xmldoc/readme.xml
"$tooldir"/make_gpsbabel_doc.sh
xsltproc \
--stringparam base.dir "${web}/htmldoc-${docversion}/" \
--stringparam root.filename "index" \
xmldoc/babelmain.xsl \
xmldoc/readme.xml
tools/fixdoc "${web}/htmldoc-${docversion}" "GPSBabel ${docversion}:"
tools/mkcapabilities "${web}" "${web}/htmldoc-${docversion}"
"${tooldir}"/fixdoc "${web}/htmldoc-${docversion}" "GPSBabel ${docversion}:"
"${tooldir}"/mkcapabilities "${web}" "${web}/htmldoc-${docversion}"
cp gpsbabel.pdf "${web}/htmldoc-${docversion}/gpsbabel-${docversion}.pdf"
5 changes: 3 additions & 2 deletions tools/make_gpsbabel_pdf.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/sh
set -ex

perl xmldoc/makedoc
jing http://docs.oasis-open.org/docbook/rng/5.0/docbook.rng xmldoc/readme.xml
tooldir=$(cd "$(dirname "$0")" && pwd)

"$tooldir"/make_gpsbabel_doc.sh
xsltproc -o gpsbabel.fo xmldoc/babelpdf.xsl xmldoc/readme.xml
HOME=. fop -q -fo gpsbabel.fo -pdf gpsbabel.pdf

0 comments on commit 39e3dee

Please sign in to comment.