[pve-devel] [PATCH pmg-docs] use rsvg-convert instead of inkscape

Rhonda D'Vine rhonda at proxmox.com
Tue Sep 18 17:54:03 CEST 2018


This is an analogous change to what was done in pve-docs last year.

The Build-Depends has been adjusted to list all required ones, there
were some missing.  Also, the compat level is set to 9 so bump
debhelper Build-Depends to >= 9~.

Signed-off-by: Rhonda D'Vine <rhonda at proxmox.com>
---
 Makefile                     |  9 +++++----
 asciidoc/dblatex-export.conf | 15 +++++++++++++++
 debian/control.in            |  2 +-
 3 files changed, 21 insertions(+), 5 deletions(-)
 create mode 100644 asciidoc/dblatex-export.conf

diff --git a/Makefile b/Makefile
index de32fbe..992db5c 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 
 GEN_DEB=${GEN_PACKAGE}_${DOCRELEASE}-${PKGREL}_${ARCH}.deb
 DOC_DEB=${DOC_PACKAGE}_${DOCRELEASE}-${PKGREL}_all.deb
-DOC_BUILDDEPS := dblatex, source-highlight, inkscape, imagemagick
+DOC_BUILDDEPS := dblatex, source-highlight, imagemagick, librsvg2-bin
 
 
 all: index.html
@@ -102,15 +102,16 @@ pmg-admin-guide.chunked: ${PMG_ADMIN_GUIDE_ADOCDEPENDS}
 	a2x -a docinfo -a docinfo1 -a icons -f chunked pmg-admin-guide.adoc
 
 PMG_DOCBOOK_CONF=-b $(shell pwd)/asciidoc/pmg-docbook -f asciidoc/asciidoc-pmg.conf
+PMG_DBLATEX_OPTS='-p ./asciidoc/pmg-dblatex.xsl -s asciidoc/dblatex-custom.sty -c asciidoc/dblatex-export.conf'
 
 pmg-admin-guide-docinfo.xml: pmg-admin-guide-docinfo.xml.in
 	sed -e 's/@RELEASE@/${DOCRELEASE}/' <$< >$@
 
 pmg-admin-guide.pdf: ${PMG_ADMIN_GUIDE_ADOCDEPENDS} docinfo.xml pmg-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}<" pmg-admin-guide-docinfo.xml || (echo "wrong release in  pmg-admin-guide-docinfo.xml" && false);
-	a2x -a docinfo -a docinfo1 -f pdf -L --asciidoc-opts="${PMG_DOCBOOK_CONF}" --dblatex-opts "-p ./asciidoc/pmg-dblatex.xsl -s asciidoc/dblatex-custom.sty" pmg-admin-guide.adoc
+	a2x -a docinfo -a docinfo1 -f pdf -L --asciidoc-opts="${PMG_DOCBOOK_CONF}" --dblatex-opts ${PMG_DBLATEX_OPTS} pmg-admin-guide.adoc
 	rm proxmox-logo.pdf proxmox-ci-header.pdf
 
 pmg-admin-guide.epub: ${PMG_ADMIN_GUIDE_ADOCDEPENDS}
diff --git a/asciidoc/dblatex-export.conf b/asciidoc/dblatex-export.conf
new file mode 100644
index 0000000..c42666b
--- /dev/null
+++ b/asciidoc/dblatex-export.conf
@@ -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>
diff --git a/debian/control.in b/debian/control.in
index 9b64bda..76e3f3c 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -2,5 +2,5 @@ Source: pmg-docs
 Section: perl
 Priority: extra
 Maintainer: Proxmox Support Team <support at proxmox.com>
-Build-Depends: debhelper (>= 7.0.50~), lintian
+Build-Depends: asciidoc-dblatex, debhelper (>= 9~), libdbi-perl, libfile-sync-perl, liblockfile-simple-perl, libmime-tools-perl, libnet-ldap-perl, librrds-perl, lintian
 Standards-Version: 3.8.4
-- 
2.11.0





More information about the pve-devel mailing list