]> git.proxmox.com Git - pve-docs.git/commitdiff
use rsvg-convert instead of inkscape
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 27 Jun 2017 13:42:00 +0000 (15:42 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 29 Jun 2017 10:15:07 +0000 (12:15 +0200)
we save quite a few build (reverse-)dependencies with this change
rsvg-convert is also a lot faster.
both use the same backend to process SVGs – cairo

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile
asciidoc/dblatex-export.conf [new file with mode: 0644]

index 44d984245b3f8a817bbf7bc4d2e6dc8e412567c2..51b2872615add379580ec2319213603a0d62a41f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,7 @@ ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 GEN_DEB=${GEN_PACKAGE}_${DOCRELEASE}-${PKGREL}_${ARCH}.deb
 DOC_DEB=${DOC_PACKAGE}_${DOCRELEASE}-${PKGREL}_all.deb
 MEDIAWIKI_DEB=${MEDIAWIKI_PACKAGE}_${DOCRELEASE}-${PKGREL}_all.deb
 GEN_DEB=${GEN_PACKAGE}_${DOCRELEASE}-${PKGREL}_${ARCH}.deb
 DOC_DEB=${DOC_PACKAGE}_${DOCRELEASE}-${PKGREL}_all.deb
 MEDIAWIKI_DEB=${MEDIAWIKI_PACKAGE}_${DOCRELEASE}-${PKGREL}_all.deb
-DOC_BUILDDEPS := asciidoc-dblatex, source-highlight, inkscape, imagemagick
+DOC_BUILDDEPS := asciidoc-dblatex, source-highlight, librsvg2-bin
 
 
 all: index.html
 
 
 all: index.html
@@ -123,15 +123,16 @@ pve-admin-guide.chunked: ${PVE_ADMIN_GUIDE_ADOCDEPENDS}
        a2x -a docinfo -a docinfo1 -a icons -f chunked pve-admin-guide.adoc
 
 PVE_DOCBOOK_CONF=-b $(shell pwd)/asciidoc/pve-docbook -f asciidoc/asciidoc-pve.conf
        a2x -a docinfo -a docinfo1 -a icons -f chunked pve-admin-guide.adoc
 
 PVE_DOCBOOK_CONF=-b $(shell pwd)/asciidoc/pve-docbook -f asciidoc/asciidoc-pve.conf
+PVE_DBLATEX_OPTS='-p ./asciidoc/pve-dblatex.xsl -s asciidoc/dblatex-custom.sty -c asciidoc/dblatex-export.conf'
 
 pve-admin-guide-docinfo.xml: pve-admin-guide-docinfo.xml.in
        sed -e 's/@RELEASE@/${DOCRELEASE}/' <$< >$@
 
 pve-admin-guide.pdf: ${PVE_ADMIN_GUIDE_ADOCDEPENDS} docinfo.xml pve-admin-guide-docinfo.xml
 
 pve-admin-guide-docinfo.xml: pve-admin-guide-docinfo.xml.in
        sed -e 's/@RELEASE@/${DOCRELEASE}/' <$< >$@
 
 pve-admin-guide.pdf: ${PVE_ADMIN_GUIDE_ADOCDEPENDS} docinfo.xml pve-admin-guide-docinfo.xml
-       inkscape -z -D --export-pdf=proxmox-logo.pdf images/proxmox-logo.svg
-       inkscape -z -D --export-pdf=proxmox-ci-header.pdf images/proxmox-ci-header.svg
+       rsvg-convert -f pdf -o proxmox-logo.pdf images/proxmox-logo.svg
+       rsvg-convert -f pdf -o proxmox-ci-header.pdf images/proxmox-ci-header.svg
        grep ">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml || (echo "wrong release in  pve-admin-guide-docinfo.xml" && false);
        grep ">Release ${DOCRELEASE}<" pve-admin-guide-docinfo.xml || (echo "wrong release in  pve-admin-guide-docinfo.xml" && false);
-       a2x -a docinfo -a docinfo1 -f pdf -L --asciidoc-opts="${PVE_DOCBOOK_CONF}" --dblatex-opts "-p ./asciidoc/pve-dblatex.xsl -s asciidoc/dblatex-custom.sty" pve-admin-guide.adoc
+       a2x -a docinfo -a docinfo1 -f pdf -L --asciidoc-opts="${PVE_DOCBOOK_CONF}" --dblatex-opts ${PVE_DBLATEX_OPTS} pve-admin-guide.adoc
        rm proxmox-logo.pdf proxmox-ci-header.pdf
 
 pve-admin-guide.epub: ${PVE_ADMIN_GUIDE_ADOCDEPENDS}
        rm proxmox-logo.pdf proxmox-ci-header.pdf
 
 pve-admin-guide.epub: ${PVE_ADMIN_GUIDE_ADOCDEPENDS}
diff --git a/asciidoc/dblatex-export.conf b/asciidoc/dblatex-export.conf
new file mode 100644 (file)
index 0000000..c42666b
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" ?>
+<!--
+  ====================================================================
+  Replace inskcape by rsvg-convert to convert SVG graphics
+  ====================================================================
+-->
+<config xmlns="http://dblatex.sourceforge.net/config">
+  <imagedata>
+    <converter src="svg" dst="*" docformat="pdf">
+      <command>
+         rsvg-convert -a -f %(dst)s -o %(output)s %(input)s
+      </command>
+    </converter>
+  </imagedata>
+</config>