[tracker: 1/2] manpages: Fix generation of manpages with asciidoc 10
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker: 1/2] manpages: Fix generation of manpages with asciidoc 10
- Date: Tue, 15 Feb 2022 23:42:05 +0000 (UTC)
commit a87b93ef283866cd001945a684e02a4a3e5f989a
Author: Jan Alexander Steffens (heftig) <heftig archlinux org>
Date: Tue Feb 15 21:37:56 2022 +0000
manpages: Fix generation of manpages with asciidoc 10
We should use asciidoc's `a2x` driver instead of running xsltproc
ourselves. asciidoc 10 ships its stylesheets in a private directory.
Fixes: https://gitlab.gnome.org/GNOME/tracker/-/issues/347
docs/manpages/meson.build | 47 +++++++++-------------
...xdg-portal.1.txt => tracker-xdg-portal-3.1.txt} | 0
...cker-endpoint.1.txt => tracker3-endpoint.1.txt} | 0
...{tracker-export.1.txt => tracker3-export.1.txt} | 0
...{tracker-import.1.txt => tracker3-import.1.txt} | 0
...{tracker-sparql.1.txt => tracker3-sparql.1.txt} | 0
.../{tracker-sql.1.txt => tracker3-sql.1.txt} | 0
meson.build | 3 +-
8 files changed, 21 insertions(+), 29 deletions(-)
---
diff --git a/docs/manpages/meson.build b/docs/manpages/meson.build
index f90c757cf..74afe3a71 100644
--- a/docs/manpages/meson.build
+++ b/docs/manpages/meson.build
@@ -1,39 +1,32 @@
manpages = [
- ['endpoint', 'tracker3-endpoint', 1],
- ['export', 'tracker3-export', 1],
- ['import', 'tracker3-import', 1],
- ['sparql', 'tracker3-sparql', 1],
- ['sql', 'tracker3-sql', 1],
- ['xdg-portal', 'tracker-xdg-portal-3', 1],
+ ['tracker3-endpoint', 1],
+ ['tracker3-export', 1],
+ ['tracker3-import', 1],
+ ['tracker3-sparql', 1],
+ ['tracker3-sql', 1],
+ ['tracker-xdg-portal-3', 1],
]
foreach m : manpages
- src = m[0]
- dst = m[1]
- section = m[2]
+ name = m[0]
+ section = m[1]
- manpage_src = 'tracker-@0@.@1@.txt'.format(src, section)
- manpage_xml = '@0@.@1@.xml'.format(dst, section)
- manpage = '@0@.@1@'.format(dst, section)
+ manpage = '@0@.@1@'.format(name, section)
- xml = custom_target(manpage_xml,
- command: [asciidoc,
+ custom_target(manpage,
+ command: [a2x,
'--attribute=author=The Tracker developers',
'--attribute=manversion=@0@'.format(meson.project_version()),
'--attribute=manmanual=Tracker manual',
- '--backend', 'docbook',
- '--doctype', 'manpage',
- '--out-file', '@OUTPUT@', '@INPUT@'],
- input: manpage_src,
- output: manpage_xml
- )
-
- custom_target(manpage,
- command: [xsltproc,
- '--output', '@OUTPUT@',
- '--stringparam', 'man.authors.section.enabled', '0',
- '/etc/asciidoc/docbook-xsl/manpage.xsl', '@INPUT@'],
- input: xml,
+ '--doctype=manpage',
+ '--format=manpage',
+ '--no-xmllint',
+ '--xsltproc-opts=' + ' '.join([
+ '--stringparam', 'man.authors.section.enabled', '0',
+ ]),
+ '-D', '@OUTDIR@',
+ '@INPUT@'],
+ input: manpage + '.txt',
output: manpage,
install: true,
install_dir: get_option('mandir') / 'man@0@'.format(section),
diff --git a/docs/manpages/tracker-xdg-portal.1.txt b/docs/manpages/tracker-xdg-portal-3.1.txt
similarity index 100%
rename from docs/manpages/tracker-xdg-portal.1.txt
rename to docs/manpages/tracker-xdg-portal-3.1.txt
diff --git a/docs/manpages/tracker-endpoint.1.txt b/docs/manpages/tracker3-endpoint.1.txt
similarity index 100%
rename from docs/manpages/tracker-endpoint.1.txt
rename to docs/manpages/tracker3-endpoint.1.txt
diff --git a/docs/manpages/tracker-export.1.txt b/docs/manpages/tracker3-export.1.txt
similarity index 100%
rename from docs/manpages/tracker-export.1.txt
rename to docs/manpages/tracker3-export.1.txt
diff --git a/docs/manpages/tracker-import.1.txt b/docs/manpages/tracker3-import.1.txt
similarity index 100%
rename from docs/manpages/tracker-import.1.txt
rename to docs/manpages/tracker3-import.1.txt
diff --git a/docs/manpages/tracker-sparql.1.txt b/docs/manpages/tracker3-sparql.1.txt
similarity index 100%
rename from docs/manpages/tracker-sparql.1.txt
rename to docs/manpages/tracker3-sparql.1.txt
diff --git a/docs/manpages/tracker-sql.1.txt b/docs/manpages/tracker3-sql.1.txt
similarity index 100%
rename from docs/manpages/tracker-sql.1.txt
rename to docs/manpages/tracker3-sql.1.txt
diff --git a/meson.build b/meson.build
index 8a7a3b721..4e59b8240 100644
--- a/meson.build
+++ b/meson.build
@@ -72,8 +72,7 @@ if not libsoup2.found() and not libsoup3.found()
endif
if get_option('man')
- asciidoc = find_program('asciidoc')
- xsltproc = find_program('xsltproc')
+ a2x = find_program('a2x')
endif
py_modules = ['gi']
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]