Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch switch to asciidoctor or other manpage renderer #32

Closed
cbiedl opened this issue Aug 11, 2018 · 2 comments
Closed

Switch switch to asciidoctor or other manpage renderer #32

cbiedl opened this issue Aug 11, 2018 · 2 comments

Comments

@cbiedl
Copy link

cbiedl commented Aug 11, 2018

Hello,

tang 7 introduced rendering the manpages during build, using asciidoc. However, asciidoc is EOL, see for example https://github.com/asciidoc/asciidoc/releases.

Switching to asciidoctor is fairly simple, however the invocation is not identical. I'll use

-	$(A2X) -f manpage $^ -D $(top_builddir)/$$(dirname $@)
+	$(A2X) --attribute reproducible --backend=manpage  $^ -D $(top_builddir)/$$(dirname $@)

in the Debian packaging (after exchanging the A2X definition, of course).

@cbiedl
Copy link
Author

cbiedl commented May 19, 2020

The build system switch required a re-write, so please use the following (or if the markup doesn't get it right, pick from https://sources.debian.org/data/main/c/clevis/13-1/debian/patches/debian.use-asciidoctor-to-build-manpages.patch - that URL isn't stable to, so plan B is to start at https://sources.debian.org/src/clevis/>, then pick the latest version and debian/patches/debian.use-asciidoctor-to-build-manpages.patch/ within that one.

--- a/meson.build
+++ b/meson.build
@@ -39,7 +39,7 @@
 
 jansson = dependency('jansson', version: '>=2.10', required: false)
 jose = dependency('jose', version: '>=8')
-a2x = find_program('a2x', required: false)
+asciidoctor = find_program('asciidoctor', required: false)
 
 bins = []
 mans = []
@@ -48,10 +48,10 @@
 
 install_data(bins, install_dir: bindir)
 
-if a2x.found()
+if asciidoctor.found()
   foreach m : mans
     custom_target(m.split('/')[-1], input: m + '.adoc', output: m.split('/')[-1],
-      command: [a2x, '-f', 'manpage', '-D', meson.current_build_dir(), '@INPUT@'],
+      command: [asciidoctor, '--attribute', 'reproducible', '--backend=manpage', '-D', meson.current_build_dir(), '@INPUT@'],
       install_dir: join_paths(get_option('mandir'), 'man' + m.split('.')[-1]),
       install: true
     )

@cbiedl
Copy link
Author

cbiedl commented Jan 24, 2021

Strike that, asciidoc is still alive.

@cbiedl cbiedl closed this as completed Jan 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant