nbdkit/0010-docs-Add-podwrapper-fr...

3977 lines
124 KiB
Diff

From 24a0a8ced608395b614ad42ae550588e08d3c636 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sun, 15 Jul 2018 14:13:53 +0100
Subject: [PATCH 10/12] docs: Add podwrapper from libguestfs.
Use podwrapper from libguestfs to generate man pages instead of
pod2man. This allows finer control over how man pages are generated,
lets us add standard sections, lets us perform more checks on the POD,
and lets us generate HTML.
Note I have relicensed my code under a BSD license for nbdkit.
---
.gitignore | 7 +-
Makefile.am | 1 +
README | 6 +-
configure.ac | 31 +-
docs/Makefile.am | 54 +-
...nbdkit-filter.pod.in => nbdkit-filter.pod} | 42 --
...nbdkit-plugin.pod.in => nbdkit-plugin.pod} | 42 --
docs/{nbdkit.pod.in => nbdkit.pod} | 42 --
filters/blocksize/Makefile.am | 10 +-
filters/blocksize/nbdkit-blocksize-filter.pod | 42 --
filters/cache/Makefile.am | 10 +-
filters/cache/nbdkit-cache-filter.pod | 42 --
filters/cow/Makefile.am | 10 +-
filters/cow/nbdkit-cow-filter.pod | 42 --
filters/delay/Makefile.am | 10 +-
filters/delay/nbdkit-delay-filter.pod | 42 --
filters/fua/Makefile.am | 10 +-
filters/fua/nbdkit-fua-filter.pod | 42 --
filters/log/Makefile.am | 10 +-
filters/log/nbdkit-log-filter.pod | 42 --
filters/nozero/Makefile.am | 10 +-
filters/nozero/nbdkit-nozero-filter.pod | 42 --
filters/offset/Makefile.am | 10 +-
filters/offset/nbdkit-offset-filter.pod | 42 --
filters/partition/Makefile.am | 10 +-
filters/partition/nbdkit-partition-filter.pod | 42 --
html/pod.css | 155 ++++++
plugins/curl/Makefile.am | 10 +-
plugins/curl/nbdkit-curl-plugin.pod | 42 --
plugins/example1/Makefile.am | 10 +-
plugins/example1/nbdkit-example1-plugin.pod | 42 --
plugins/example2/Makefile.am | 10 +-
plugins/example2/nbdkit-example2-plugin.pod | 42 --
plugins/example3/Makefile.am | 10 +-
plugins/example3/nbdkit-example3-plugin.pod | 42 --
plugins/example4/Makefile.am | 10 +-
plugins/example4/example4.pl | 42 --
plugins/ext2/Makefile.am | 10 +-
plugins/ext2/nbdkit-ext2-plugin.pod | 42 --
plugins/file/Makefile.am | 10 +-
plugins/file/nbdkit-file-plugin.pod | 42 --
plugins/guestfs/Makefile.am | 10 +-
plugins/guestfs/nbdkit-guestfs-plugin.pod | 42 --
plugins/gzip/Makefile.am | 10 +-
plugins/gzip/nbdkit-gzip-plugin.pod | 42 --
plugins/libvirt/Makefile.am | 10 +-
plugins/libvirt/nbdkit-libvirt-plugin.pod | 42 --
plugins/lua/Makefile.am | 10 +-
plugins/lua/nbdkit-lua-plugin.pod | 42 --
plugins/memory/Makefile.am | 10 +-
plugins/memory/nbdkit-memory-plugin.pod | 42 --
plugins/nbd/Makefile.am | 10 +-
plugins/nbd/nbdkit-nbd-plugin.pod | 42 --
plugins/null/Makefile.am | 10 +-
plugins/null/nbdkit-null-plugin.pod | 42 --
plugins/ocaml/Makefile.am | 10 +-
plugins/ocaml/nbdkit-ocaml-plugin.pod | 42 --
plugins/pattern/Makefile.am | 10 +-
plugins/pattern/nbdkit-pattern-plugin.pod | 42 --
plugins/perl/Makefile.am | 10 +-
plugins/perl/nbdkit-perl-plugin.pod | 42 --
plugins/python/Makefile.am | 10 +-
plugins/python/nbdkit-python-plugin.pod | 42 --
plugins/random/Makefile.am | 10 +-
plugins/random/nbdkit-random-plugin.pod | 42 --
plugins/ruby/Makefile.am | 10 +-
plugins/ruby/nbdkit-ruby-plugin.pod | 42 --
plugins/split/Makefile.am | 10 +-
plugins/split/nbdkit-split-plugin.pod | 42 --
plugins/streaming/Makefile.am | 10 +-
plugins/streaming/nbdkit-streaming-plugin.pod | 42 --
plugins/tar/Makefile.am | 10 +-
plugins/tar/tar.pl | 42 --
plugins/tcl/Makefile.am | 10 +-
plugins/tcl/nbdkit-tcl-plugin.pod | 42 --
plugins/vddk/Makefile.am | 10 +-
plugins/vddk/nbdkit-vddk-plugin.pod | 42 --
plugins/xz/Makefile.am | 10 +-
plugins/xz/nbdkit-xz-plugin.pod | 42 --
plugins/zero/Makefile.am | 10 +-
plugins/zero/nbdkit-zero-plugin.pod | 42 --
podwrapper.pl.in | 496 ++++++++++++++++++
82 files changed, 889 insertions(+), 1859 deletions(-)
rename docs/{nbdkit-filter.pod.in => nbdkit-filter.pod} (93%)
rename docs/{nbdkit-plugin.pod.in => nbdkit-plugin.pod} (95%)
rename docs/{nbdkit.pod.in => nbdkit.pod} (95%)
create mode 100644 html/pod.css
create mode 100755 podwrapper.pl.in
diff --git a/.gitignore b/.gitignore
index 2692542..a84ad9a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,9 +32,9 @@ Makefile.in
/config.sub
/configure
/depcomp
-/docs/nbdkit-filter.pod
-/docs/nbdkit-plugin.pod
-/docs/nbdkit.pod
+/docs/filter-links.pod
+/docs/plugin-links.pod
+/html/*.html
/INSTALL
/install-sh
/libtool
@@ -43,6 +43,7 @@ Makefile.in
/nbdkit
/plugins/example4/nbdkit-example4-plugin
/plugins/tar/nbdkit-tar-plugin
+/podwrapper.pl
/src/nbdkit
/src/nbdkit.pc
/src/test-utils
diff --git a/Makefile.am b/Makefile.am
index fc4d750..6a3a377 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -37,6 +37,7 @@ ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = \
.dir-locals.el \
.gitignore \
+ html/pod.css \
LICENSE \
nbdkit.in \
OTHER_PLUGINS \
diff --git a/README b/README
index 9642579..685b41f 100644
--- a/README
+++ b/README
@@ -32,9 +32,11 @@ Building from source
By default nbdkit needs nothing except Linux and reasonably recent gcc.
-To build the man pages, you will need to install:
+To build the man pages, you will optionally need to install:
- - pod2man (included with perl)
+ - perl
+
+ - Pod::Man and Pod::Simple (perl library)
There are some *optional* libraries you may want to install for
plugins or extra features.
diff --git a/configure.ac b/configure.ac
index 6304ac8..9fe147c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -197,28 +197,31 @@ PKG_CHECK_MODULES([BASH_COMPLETION], [bash-completion >= 2.0], [
])
AM_CONDITIONAL([HAVE_BASH_COMPLETION],[test "x$bash_completion" = "xyes"])
-dnl Check for Perl POD.
-AC_CHECK_PROG([POD2MAN], [pod2man], [pod2man], [no])
-AS_IF([test "x$POD2MAN" != "xno"],[
- POD2MAN_ARGS="--center=nbdkit --release=nbdkit"
- # Check whether pod2man supports --utf8, and if so add it to $POD2MAN_ARGS.
- AC_MSG_CHECKING([if $POD2MAN supports --utf8])
- AS_IF([$POD2MAN --help 2>&1 | grep -s -q -- --utf8],[
- AC_MSG_RESULT([yes])
- POD2MAN_ARGS="$POD2MAN_ARGS --utf8"
+dnl Check we have enough to run podwrapper.
+AC_CHECK_PROG([PERL],[perl],[perl],[no])
+AS_IF([test "x$PERL" != "xno"],[
+ AC_MSG_CHECKING([if we have perl Pod::Man and Pod::Simple])
+ AS_IF([$PERL -MPod::Man -MPod::Simple -e 1 >&AS_MESSAGE_LOG_FD 2>&1],[
+ enable_pod=yes
],[
- AC_MSG_RESULT([no])
+ enable_pod=no
])
- AC_SUBST([POD2MAN_ARGS])
+ AC_MSG_RESULT([$enable_pod])
])
-AM_CONDITIONAL([HAVE_POD2MAN], [test "x$POD2MAN" != "xno"])
+AM_CONDITIONAL([HAVE_POD],
+ [test "x$PERL" != "xno" && test "x$enable_pod" = "xyes"])
+dnl Define the path to the podwrapper program.
+PODWRAPPER="$PERL $(pwd)/podwrapper.pl"
+AC_SUBST([PODWRAPPER])
+
+dnl Allow all plugins and filters to be disabled.
AC_ARG_ENABLE([plugins],
[AS_HELP_STRING([--disable-plugins], [disable all bundled plugins and filters])])
AM_CONDITIONAL([HAVE_PLUGINS], [test "x$enable_plugins" != "xno"])
dnl Check for Perl, for embedding in the perl plugin.
-AC_CHECK_PROG([PERL],[perl],[perl],[no])
+dnl Note that the perl binary is checked above.
AC_ARG_ENABLE([perl],
AS_HELP_STRING([--disable-perl], [disable Perl embed plugin]),
[],
@@ -590,6 +593,8 @@ dnl Produce output files.
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([nbdkit],
[chmod +x,-w nbdkit])
+AC_CONFIG_FILES([podwrapper.pl],
+ [chmod +x,-w podwrapper.pl])
AC_CONFIG_FILES([Makefile
bash/Makefile
docs/Makefile
diff --git a/docs/Makefile.am b/docs/Makefile.am
index a3d7071..2c1243a 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -34,11 +34,11 @@ include $(top_srcdir)/common-rules.mk
EXTRA_DIST = \
make-links.sh \
- nbdkit.pod.in \
- nbdkit-plugin.pod.in \
- nbdkit-filter.pod.in
+ nbdkit.pod \
+ nbdkit-plugin.pod \
+ nbdkit-filter.pod
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = \
nbdkit.1 \
@@ -46,28 +46,36 @@ man_MANS = \
nbdkit-filter.3
CLEANFILES += $(man_MANS)
-nbdkit.1: nbdkit.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=nbdkit $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+nbdkit.1: nbdkit.pod plugin-links.pod filter-links.pod
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ --insert plugin-links.pod:__PLUGIN_LINKS__ \
+ --insert filter-links.pod:__FILTER_LINKS__ \
+ $<
-nbdkit-plugin.3: nbdkit-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=3 --name=nbdkit-plugin $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+nbdkit-plugin.3: nbdkit-plugin.pod plugin-links.pod
+ $(PODWRAPPER) --section=3 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ --insert plugin-links.pod:__PLUGIN_LINKS__ \
+ $<
-nbdkit-filter.3: nbdkit-filter.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=3 --name=nbdkit-filter $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+nbdkit-filter.3: nbdkit-filter.pod filter-links.pod
+ $(PODWRAPPER) --section=3 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ --insert filter-links.pod:__FILTER_LINKS__ \
+ $<
-%.pod: %.pod.in
+endif HAVE_POD
+
+# XXX Language links are broken - they link to section 1 instead of section 3.
+plugin-links.pod: $(top_srcdir)/common-rules.mk
+ rm -f $@ $@-t
+ $(srcdir)/make-links.sh plugin 1 $(plugins) > $@-t
+ mv $@-t $@
+
+filter-links.pod: $(top_srcdir)/common-rules.mk
rm -f $@ $@-t
- $(SED) \
- -e 's/__PLUGIN_LINKS__/$(shell $(srcdir)/make-links.sh plugin 1 $(plugins))/' \
- -e 's/__FILTER_LINKS__/$(shell $(srcdir)/make-links.sh filter 1 $(filters))/' \
- $< > $@-t
- chmod -w $@-t
+ $(srcdir)/make-links.sh filter 1 $(filters) > $@-t
mv $@-t $@
-endif
+MAINTAINERCLEANFILES = plugin-links.pod filter-links.pod
diff --git a/docs/nbdkit-filter.pod.in b/docs/nbdkit-filter.pod
similarity index 93%
rename from docs/nbdkit-filter.pod.in
rename to docs/nbdkit-filter.pod
index 16be2c7..77a5e79 100644
--- a/docs/nbdkit-filter.pod.in
+++ b/docs/nbdkit-filter.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-filter - How to write nbdkit filters
@@ -604,43 +602,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2013-2018 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/docs/nbdkit-plugin.pod.in b/docs/nbdkit-plugin.pod
similarity index 95%
rename from docs/nbdkit-plugin.pod.in
rename to docs/nbdkit-plugin.pod
index f32d1af..fb43f8c 100644
--- a/docs/nbdkit-plugin.pod.in
+++ b/docs/nbdkit-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-plugin - How to write nbdkit plugins
@@ -897,43 +895,3 @@ Pino Toscano
=head1 COPYRIGHT
Copyright (C) 2013-2018 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/docs/nbdkit.pod.in b/docs/nbdkit.pod
similarity index 95%
rename from docs/nbdkit.pod.in
rename to docs/nbdkit.pod
index bfd9da9..be69619 100644
--- a/docs/nbdkit.pod.in
+++ b/docs/nbdkit.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit - A toolkit for creating NBD servers
@@ -1023,43 +1021,3 @@ Pino Toscano
=head1 COPYRIGHT
Copyright (C) 2013-2018 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/filters/blocksize/Makefile.am b/filters/blocksize/Makefile.am
index bd09a2d..02db7bb 100644
--- a/filters/blocksize/Makefile.am
+++ b/filters/blocksize/Makefile.am
@@ -47,14 +47,14 @@ nbdkit_blocksize_filter_la_CFLAGS = \
nbdkit_blocksize_filter_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-blocksize-filter.1
CLEANFILES += $(man_MANS)
nbdkit-blocksize-filter.1: nbdkit-blocksize-filter.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
diff --git a/filters/blocksize/nbdkit-blocksize-filter.pod b/filters/blocksize/nbdkit-blocksize-filter.pod
index 39a2ffc..d271aba 100644
--- a/filters/blocksize/nbdkit-blocksize-filter.pod
+++ b/filters/blocksize/nbdkit-blocksize-filter.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-blocksize-filter - nbdkit blocksize filter
@@ -99,43 +97,3 @@ Eric Blake
=head1 COPYRIGHT
Copyright (C) 2018 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/filters/cache/Makefile.am b/filters/cache/Makefile.am
index 1e932e8..867812e 100644
--- a/filters/cache/Makefile.am
+++ b/filters/cache/Makefile.am
@@ -47,14 +47,14 @@ nbdkit_cache_filter_la_CFLAGS = \
nbdkit_cache_filter_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-cache-filter.1
CLEANFILES += $(man_MANS)
nbdkit-cache-filter.1: nbdkit-cache-filter.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
diff --git a/filters/cache/nbdkit-cache-filter.pod b/filters/cache/nbdkit-cache-filter.pod
index a59c54e..ed9df19 100644
--- a/filters/cache/nbdkit-cache-filter.pod
+++ b/filters/cache/nbdkit-cache-filter.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-cache-filter - nbdkit caching filter
@@ -80,43 +78,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2018 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/filters/cow/Makefile.am b/filters/cow/Makefile.am
index 3b83142..778df1e 100644
--- a/filters/cow/Makefile.am
+++ b/filters/cow/Makefile.am
@@ -47,14 +47,14 @@ nbdkit_cow_filter_la_CFLAGS = \
nbdkit_cow_filter_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-cow-filter.1
CLEANFILES += $(man_MANS)
nbdkit-cow-filter.1: nbdkit-cow-filter.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
diff --git a/filters/cow/nbdkit-cow-filter.pod b/filters/cow/nbdkit-cow-filter.pod
index accf81c..a4b8d72 100644
--- a/filters/cow/nbdkit-cow-filter.pod
+++ b/filters/cow/nbdkit-cow-filter.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-cow-filter - nbdkit copy-on-write (COW) filter
@@ -120,43 +118,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2018 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/filters/delay/Makefile.am b/filters/delay/Makefile.am
index a907ea6..17bec3b 100644
--- a/filters/delay/Makefile.am
+++ b/filters/delay/Makefile.am
@@ -47,14 +47,14 @@ nbdkit_delay_filter_la_CFLAGS = \
nbdkit_delay_filter_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-delay-filter.1
CLEANFILES += $(man_MANS)
nbdkit-delay-filter.1: nbdkit-delay-filter.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
diff --git a/filters/delay/nbdkit-delay-filter.pod b/filters/delay/nbdkit-delay-filter.pod
index 10aba94..32e29d7 100644
--- a/filters/delay/nbdkit-delay-filter.pod
+++ b/filters/delay/nbdkit-delay-filter.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-delay-filter - nbdkit delay filter
@@ -46,43 +44,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2018 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/filters/fua/Makefile.am b/filters/fua/Makefile.am
index 557e585..d4af39a 100644
--- a/filters/fua/Makefile.am
+++ b/filters/fua/Makefile.am
@@ -47,14 +47,14 @@ nbdkit_fua_filter_la_CFLAGS = \
nbdkit_fua_filter_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-fua-filter.1
CLEANFILES += $(man_MANS)
nbdkit-fua-filter.1: nbdkit-fua-filter.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
diff --git a/filters/fua/nbdkit-fua-filter.pod b/filters/fua/nbdkit-fua-filter.pod
index cec54d5..601e308 100644
--- a/filters/fua/nbdkit-fua-filter.pod
+++ b/filters/fua/nbdkit-fua-filter.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-fua-filter - nbdkit FUA filter
@@ -77,43 +75,3 @@ Eric Blake
=head1 COPYRIGHT
Copyright (C) 2018 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/filters/log/Makefile.am b/filters/log/Makefile.am
index 95bce2b..b9b661e 100644
--- a/filters/log/Makefile.am
+++ b/filters/log/Makefile.am
@@ -47,14 +47,14 @@ nbdkit_log_filter_la_CFLAGS = \
nbdkit_log_filter_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-log-filter.1
CLEANFILES += $(man_MANS)
nbdkit-log-filter.1: nbdkit-log-filter.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
diff --git a/filters/log/nbdkit-log-filter.pod b/filters/log/nbdkit-log-filter.pod
index b011624..89ea551 100644
--- a/filters/log/nbdkit-log-filter.pod
+++ b/filters/log/nbdkit-log-filter.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-log-filter - nbdkit log filter
@@ -75,43 +73,3 @@ Eric Blake
=head1 COPYRIGHT
Copyright (C) 2018 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/filters/nozero/Makefile.am b/filters/nozero/Makefile.am
index 3e2eebc..f0cc2c6 100644
--- a/filters/nozero/Makefile.am
+++ b/filters/nozero/Makefile.am
@@ -47,14 +47,14 @@ nbdkit_nozero_filter_la_CFLAGS = \
nbdkit_nozero_filter_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-nozero-filter.1
CLEANFILES += $(man_MANS)
nbdkit-nozero-filter.1: nbdkit-nozero-filter.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
diff --git a/filters/nozero/nbdkit-nozero-filter.pod b/filters/nozero/nbdkit-nozero-filter.pod
index 4065302..bb8743c 100644
--- a/filters/nozero/nbdkit-nozero-filter.pod
+++ b/filters/nozero/nbdkit-nozero-filter.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-nozero-filter - nbdkit nozero filter
@@ -57,43 +55,3 @@ Eric Blake
=head1 COPYRIGHT
Copyright (C) 2018 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/filters/offset/Makefile.am b/filters/offset/Makefile.am
index e055ed4..0fe9106 100644
--- a/filters/offset/Makefile.am
+++ b/filters/offset/Makefile.am
@@ -47,14 +47,14 @@ nbdkit_offset_filter_la_CFLAGS = \
nbdkit_offset_filter_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-offset-filter.1
CLEANFILES += $(man_MANS)
nbdkit-offset-filter.1: nbdkit-offset-filter.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
diff --git a/filters/offset/nbdkit-offset-filter.pod b/filters/offset/nbdkit-offset-filter.pod
index 7579d9f..ee8061b 100644
--- a/filters/offset/nbdkit-offset-filter.pod
+++ b/filters/offset/nbdkit-offset-filter.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-offset-filter - nbdkit offset filter
@@ -76,43 +74,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2018 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/filters/partition/Makefile.am b/filters/partition/Makefile.am
index a1bb0d9..9ab8730 100644
--- a/filters/partition/Makefile.am
+++ b/filters/partition/Makefile.am
@@ -47,14 +47,14 @@ nbdkit_partition_filter_la_CFLAGS = \
nbdkit_partition_filter_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-partition-filter.1
CLEANFILES += $(man_MANS)
nbdkit-partition-filter.1: nbdkit-partition-filter.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
diff --git a/filters/partition/nbdkit-partition-filter.pod b/filters/partition/nbdkit-partition-filter.pod
index 0b78d6b..bc5f346 100644
--- a/filters/partition/nbdkit-partition-filter.pod
+++ b/filters/partition/nbdkit-partition-filter.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-partition-filter - nbdkit partition filter
@@ -57,43 +55,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2018 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/html/pod.css b/html/pod.css
new file mode 100644
index 0000000..1c07ec8
--- /dev/null
+++ b/html/pod.css
@@ -0,0 +1,155 @@
+/* CSS to make pod2html files look a little bit better. */
+
+body {
+ margin-left: 4em;
+}
+
+body p, body ul, ol, body dl {
+ margin-left: 2em;
+ width: 31em;
+}
+
+pre {
+ width: 31em;
+}
+
+li {
+ padding-bottom: 0.5em;
+}
+
+/* Code sections. */
+
+pre {
+ background-color: #f8f8f8;
+ color: rgb(204,0,0);
+ font-weight: 550;
+ border-left: 6px solid rgb(204,64,64);
+ padding: 6px;
+ margin-left: 1em;
+ font-size: 120%;
+}
+
+/* Bold, italic in man pages. */
+b, strong {
+ color: rgb(204,0,0);
+}
+
+i, em {
+ color: rgb(204,0,0);
+}
+
+/* Name heading. */
+
+body > h1:first-of-type {
+ display: none;
+}
+
+body > h1:first-of-type + p {
+ font-size: 125%;
+ font-weight: bold;
+ color: rgb(204,0,0);
+ margin-left: -32px;
+}
+
+/* Warning heading in man pages. */
+a[name="warning"] {
+ -moz-border-radius-topleft: 5px;
+ -moz-border-radius-topright: 5px;
+ border-radius-topleft: 5px;
+ border-radius-topright: 5px;
+
+ color: white;
+ background-color: rgb(204,0,0);
+}
+a[name="warning"]:before {
+ content: "\00a0\00a0\00a0";
+}
+a[name="warning"]:after {
+ content: "\00a0\00a0\00a0";
+}
+
+/* Put the index on the right hand side in a floating box. */
+ul[id="index"] {
+ float: right;
+ width: 18em;
+ border-left: 3em solid white;
+ background-color: #fcfcfc;
+ margin-top: 32px;
+ padding-top: 0px;
+ margin-left: 1em;
+ padding-left: 1em;
+ padding-right: 1em;
+ font-size: 90%;
+}
+
+ul[id="index"] a[href] {
+ text-decoration: none;
+}
+
+ul[id="index"] a[href]:hover {
+ text-decoration: underline;
+}
+
+ul[id="index"] a[href]:before {
+ content: '#\00a0';
+ color: rgb(204,0,0);
+ font-size: x-small;
+}
+
+ul[id="index"] {
+ width: 17em;
+ list-style: none;
+ margin-left: 0px;
+ margin-right: 0px;
+ padding-left: 0px;
+ padding-right: 0px;
+}
+
+ul[id="index"] > li {
+ margin-bottom: 0.5em;
+}
+
+ul[id="index"] > li ul {
+ width: 16em;
+ list-style: none;
+ margin-left: 0px;
+ margin-right: 0px;
+ padding-left: 0px;
+ padding-right: 0px;
+ margin-bottom: 0.5em;
+}
+
+ul[id="index"] > li ul li {
+ display: inline;
+ margin-right: 1em;
+}
+
+/*
+ul[id="index"] > li ul li:after {
+ color: #ccc;
+ content: '\2014';
+}
+*/
+
+/* Get rid of those horrible <hr>'s :-( */
+hr { display: none; }
+
+/* Demote <h1>'s and set rest of headers relative. */
+h1 {
+ font-size: 100%;
+ color: black;
+ border-bottom: solid 1px rgb(204,0,0);
+}
+
+h2 {
+ font-size: 95%;
+ border-bottom: none;
+}
+
+h3 {
+ font-size: 90%;
+}
+
+h4 {
+ font-size: 85%;
+}
diff --git a/plugins/curl/Makefile.am b/plugins/curl/Makefile.am
index 91a3a3a..b58b40c 100644
--- a/plugins/curl/Makefile.am
+++ b/plugins/curl/Makefile.am
@@ -52,16 +52,16 @@ nbdkit_curl_plugin_la_LIBADD = \
nbdkit_curl_plugin_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-curl-plugin.1
CLEANFILES += $(man_MANS)
nbdkit-curl-plugin.1: nbdkit-curl-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
endif
diff --git a/plugins/curl/nbdkit-curl-plugin.pod b/plugins/curl/nbdkit-curl-plugin.pod
index 30e2949..9bbd285 100644
--- a/plugins/curl/nbdkit-curl-plugin.pod
+++ b/plugins/curl/nbdkit-curl-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-curl-plugin - nbdkit curl plugin (HTTP, FTP, SSH and other protocols)
@@ -122,43 +120,3 @@ Parts derived from Alexander Graf's "QEMU Block driver for CURL images".
=head1 COPYRIGHT
Copyright (C) 2014 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/example1/Makefile.am b/plugins/example1/Makefile.am
index 8c66bbb..e324dd8 100644
--- a/plugins/example1/Makefile.am
+++ b/plugins/example1/Makefile.am
@@ -47,14 +47,14 @@ nbdkit_example1_plugin_la_CFLAGS = \
nbdkit_example1_plugin_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-example1-plugin.1
CLEANFILES += $(man_MANS)
nbdkit-example1-plugin.1: nbdkit-example1-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
diff --git a/plugins/example1/nbdkit-example1-plugin.pod b/plugins/example1/nbdkit-example1-plugin.pod
index a28e5f2..81a80de 100644
--- a/plugins/example1/nbdkit-example1-plugin.pod
+++ b/plugins/example1/nbdkit-example1-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-example1-plugin - A minimal nbdkit plugin
@@ -32,43 +30,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2013 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/example2/Makefile.am b/plugins/example2/Makefile.am
index 810d735..3125b8e 100644
--- a/plugins/example2/Makefile.am
+++ b/plugins/example2/Makefile.am
@@ -47,14 +47,14 @@ nbdkit_example2_plugin_la_CFLAGS = \
nbdkit_example2_plugin_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-example2-plugin.1
CLEANFILES += $(man_MANS)
nbdkit-example2-plugin.1: nbdkit-example2-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
diff --git a/plugins/example2/nbdkit-example2-plugin.pod b/plugins/example2/nbdkit-example2-plugin.pod
index 1a22bc6..dc16260 100644
--- a/plugins/example2/nbdkit-example2-plugin.pod
+++ b/plugins/example2/nbdkit-example2-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-example2-plugin - An example nbdkit plugin
@@ -30,43 +28,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2013 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/example3/Makefile.am b/plugins/example3/Makefile.am
index 5ca25ad..f4a423d 100644
--- a/plugins/example3/Makefile.am
+++ b/plugins/example3/Makefile.am
@@ -47,14 +47,14 @@ nbdkit_example3_plugin_la_CFLAGS = \
nbdkit_example3_plugin_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-example3-plugin.1
CLEANFILES += $(man_MANS)
nbdkit-example3-plugin.1: nbdkit-example3-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
diff --git a/plugins/example3/nbdkit-example3-plugin.pod b/plugins/example3/nbdkit-example3-plugin.pod
index 11dfc99..5c51f83 100644
--- a/plugins/example3/nbdkit-example3-plugin.pod
+++ b/plugins/example3/nbdkit-example3-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-example3-plugin - An example nbdkit plugin
@@ -40,43 +38,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2013 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/example4/Makefile.am b/plugins/example4/Makefile.am
index cf9f687..589b3f5 100644
--- a/plugins/example4/Makefile.am
+++ b/plugins/example4/Makefile.am
@@ -48,16 +48,16 @@ nbdkit-example4-plugin: $(source)
mv $@-t $@
chmod 0555 $@
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-example4-plugin.1
CLEANFILES += $(man_MANS)
nbdkit-example4-plugin.1: $(source)
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --name nbdkit-example4-plugin --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
endif
diff --git a/plugins/example4/example4.pl b/plugins/example4/example4.pl
index b0086ac..0f0baa8 100644
--- a/plugins/example4/example4.pl
+++ b/plugins/example4/example4.pl
@@ -3,8 +3,6 @@
=pod
-=encoding utf8
-
=head1 NAME
nbdkit-example4-plugin - An example nbdkit plugin written in Perl
@@ -48,46 +46,6 @@ Richard W.M. Jones
Copyright (C) 2017 Red Hat Inc.
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
=cut
use strict;
diff --git a/plugins/ext2/Makefile.am b/plugins/ext2/Makefile.am
index b644451..da92c1b 100644
--- a/plugins/ext2/Makefile.am
+++ b/plugins/ext2/Makefile.am
@@ -52,15 +52,15 @@ nbdkit_ext2_plugin_la_LIBADD = \
nbdkit_ext2_plugin_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-ext2-plugin.1
CLEANFILES += $(man_MANS)
nbdkit-ext2-plugin.1: nbdkit-ext2-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
endif
diff --git a/plugins/ext2/nbdkit-ext2-plugin.pod b/plugins/ext2/nbdkit-ext2-plugin.pod
index 7479ebe..5cdda06 100644
--- a/plugins/ext2/nbdkit-ext2-plugin.pod
+++ b/plugins/ext2/nbdkit-ext2-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-ext2-plugin - Read and write files inside ext2, ext3 or
@@ -89,43 +87,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2018 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/file/Makefile.am b/plugins/file/Makefile.am
index 7500438..00eaf59 100644
--- a/plugins/file/Makefile.am
+++ b/plugins/file/Makefile.am
@@ -47,14 +47,14 @@ nbdkit_file_plugin_la_CFLAGS = \
nbdkit_file_plugin_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-file-plugin.1
CLEANFILES += $(man_MANS)
nbdkit-file-plugin.1: nbdkit-file-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
diff --git a/plugins/file/nbdkit-file-plugin.pod b/plugins/file/nbdkit-file-plugin.pod
index 016513a..824058e 100644
--- a/plugins/file/nbdkit-file-plugin.pod
+++ b/plugins/file/nbdkit-file-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-file-plugin - nbdkit file plugin
@@ -54,43 +52,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2013 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/guestfs/Makefile.am b/plugins/guestfs/Makefile.am
index 79b97c5..19fe31a 100644
--- a/plugins/guestfs/Makefile.am
+++ b/plugins/guestfs/Makefile.am
@@ -52,16 +52,16 @@ nbdkit_guestfs_plugin_la_LIBADD = \
nbdkit_guestfs_plugin_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-guestfs-plugin.1
CLEANFILES += $(man_MANS)
nbdkit-guestfs-plugin.1: nbdkit-guestfs-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
endif
diff --git a/plugins/guestfs/nbdkit-guestfs-plugin.pod b/plugins/guestfs/nbdkit-guestfs-plugin.pod
index 9fde4b4..4bdb7ab 100644
--- a/plugins/guestfs/nbdkit-guestfs-plugin.pod
+++ b/plugins/guestfs/nbdkit-guestfs-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-guestfs-plugin - nbdkit libguestfs plugin
@@ -201,43 +199,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2013 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/gzip/Makefile.am b/plugins/gzip/Makefile.am
index 6e95a66..b1e42c7 100644
--- a/plugins/gzip/Makefile.am
+++ b/plugins/gzip/Makefile.am
@@ -52,16 +52,16 @@ nbdkit_gzip_plugin_la_LIBADD = \
nbdkit_gzip_plugin_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-gzip-plugin.1
CLEANFILES += $(man_MANS)
nbdkit-gzip-plugin.1: nbdkit-gzip-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
endif
diff --git a/plugins/gzip/nbdkit-gzip-plugin.pod b/plugins/gzip/nbdkit-gzip-plugin.pod
index 7959329..a5f6b79 100644
--- a/plugins/gzip/nbdkit-gzip-plugin.pod
+++ b/plugins/gzip/nbdkit-gzip-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-gzip-plugin - nbdkit gzip plugin
@@ -33,43 +31,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2013 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/libvirt/Makefile.am b/plugins/libvirt/Makefile.am
index 1f53cbc..f7ab44a 100644
--- a/plugins/libvirt/Makefile.am
+++ b/plugins/libvirt/Makefile.am
@@ -52,16 +52,16 @@ nbdkit_libvirt_plugin_la_LIBADD = \
nbdkit_libvirt_plugin_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-libvirt-plugin.1
CLEANFILES += $(man_MANS)
nbdkit-libvirt-plugin.1: nbdkit-libvirt-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
endif
diff --git a/plugins/libvirt/nbdkit-libvirt-plugin.pod b/plugins/libvirt/nbdkit-libvirt-plugin.pod
index 2ee18cc..4bfa972 100644
--- a/plugins/libvirt/nbdkit-libvirt-plugin.pod
+++ b/plugins/libvirt/nbdkit-libvirt-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-libvirt-plugin - nbdkit libvirt plugin using virDomainBlockPeek
@@ -62,43 +60,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2013-2017 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/lua/Makefile.am b/plugins/lua/Makefile.am
index 91d0395..9135b88 100644
--- a/plugins/lua/Makefile.am
+++ b/plugins/lua/Makefile.am
@@ -53,16 +53,16 @@ nbdkit_lua_plugin_la_LDFLAGS = \
-module -avoid-version -shared \
$(LUA_LIBS)
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-lua-plugin.3
CLEANFILES += $(man_MANS)
nbdkit-lua-plugin.3: nbdkit-lua-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=3 --name=`basename $@ .3` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=3 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
endif
diff --git a/plugins/lua/nbdkit-lua-plugin.pod b/plugins/lua/nbdkit-lua-plugin.pod
index dfeef4f..9ebebab 100644
--- a/plugins/lua/nbdkit-lua-plugin.pod
+++ b/plugins/lua/nbdkit-lua-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-lua-plugin - nbdkit Lua plugin
@@ -286,43 +284,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2018 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/memory/Makefile.am b/plugins/memory/Makefile.am
index 8bd3949..3eaedca 100644
--- a/plugins/memory/Makefile.am
+++ b/plugins/memory/Makefile.am
@@ -47,14 +47,14 @@ nbdkit_memory_plugin_la_CFLAGS = \
nbdkit_memory_plugin_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-memory-plugin.1
CLEANFILES += $(man_MANS)
nbdkit-memory-plugin.1: nbdkit-memory-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
diff --git a/plugins/memory/nbdkit-memory-plugin.pod b/plugins/memory/nbdkit-memory-plugin.pod
index 6f7fc46..5d11d86 100644
--- a/plugins/memory/nbdkit-memory-plugin.pod
+++ b/plugins/memory/nbdkit-memory-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-memory-plugin - nbdkit virtual memory plugin
@@ -50,43 +48,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2017 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/nbd/Makefile.am b/plugins/nbd/Makefile.am
index b4a0d94..f930b26 100644
--- a/plugins/nbd/Makefile.am
+++ b/plugins/nbd/Makefile.am
@@ -48,14 +48,14 @@ nbdkit_nbd_plugin_la_CFLAGS = \
nbdkit_nbd_plugin_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-nbd-plugin.1
CLEANFILES += $(man_MANS)
nbdkit-nbd-plugin.1: nbdkit-nbd-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
diff --git a/plugins/nbd/nbdkit-nbd-plugin.pod b/plugins/nbd/nbdkit-nbd-plugin.pod
index 2b3a054..74df7ed 100644
--- a/plugins/nbd/nbdkit-nbd-plugin.pod
+++ b/plugins/nbd/nbdkit-nbd-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-nbd-plugin - nbdkit nbd plugin
@@ -54,43 +52,3 @@ Eric Blake
=head1 COPYRIGHT
Copyright (C) 2017 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/null/Makefile.am b/plugins/null/Makefile.am
index f37e1ba..b98b041 100644
--- a/plugins/null/Makefile.am
+++ b/plugins/null/Makefile.am
@@ -47,14 +47,14 @@ nbdkit_null_plugin_la_CFLAGS = \
nbdkit_null_plugin_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-null-plugin.1
CLEANFILES += $(man_MANS)
nbdkit-null-plugin.1: nbdkit-null-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
diff --git a/plugins/null/nbdkit-null-plugin.pod b/plugins/null/nbdkit-null-plugin.pod
index 55affb8..fd6f4d6 100644
--- a/plugins/null/nbdkit-null-plugin.pod
+++ b/plugins/null/nbdkit-null-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-null-plugin - nbdkit bitbucket plugin
@@ -44,43 +42,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2017 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/ocaml/Makefile.am b/plugins/ocaml/Makefile.am
index 22970f9..484d041 100644
--- a/plugins/ocaml/Makefile.am
+++ b/plugins/ocaml/Makefile.am
@@ -67,16 +67,16 @@ libnbdkitocaml_la_CFLAGS = \
$(WARNINGS_CFLAGS) \
-fPIC
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-ocaml-plugin.3
CLEANFILES += $(man_MANS)
nbdkit-ocaml-plugin.3: nbdkit-ocaml-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=3 --name=`basename $@ .3` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=3 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
endif
diff --git a/plugins/ocaml/nbdkit-ocaml-plugin.pod b/plugins/ocaml/nbdkit-ocaml-plugin.pod
index 8f67d9b..80af5bb 100644
--- a/plugins/ocaml/nbdkit-ocaml-plugin.pod
+++ b/plugins/ocaml/nbdkit-ocaml-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-ocaml-plugin - writing nbdkit plugins in OCaml
@@ -122,43 +120,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2014 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/pattern/Makefile.am b/plugins/pattern/Makefile.am
index da092db..f5b99a2 100644
--- a/plugins/pattern/Makefile.am
+++ b/plugins/pattern/Makefile.am
@@ -47,14 +47,14 @@ nbdkit_pattern_plugin_la_CFLAGS = \
nbdkit_pattern_plugin_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-pattern-plugin.1
CLEANFILES += $(man_MANS)
nbdkit-pattern-plugin.1: nbdkit-pattern-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
diff --git a/plugins/pattern/nbdkit-pattern-plugin.pod b/plugins/pattern/nbdkit-pattern-plugin.pod
index 425cae6..1b22f39 100644
--- a/plugins/pattern/nbdkit-pattern-plugin.pod
+++ b/plugins/pattern/nbdkit-pattern-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-pattern-plugin - plugin to serve a fixed pattern of data for testing
@@ -70,43 +68,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2018 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/perl/Makefile.am b/plugins/perl/Makefile.am
index 293d059..1b792a2 100644
--- a/plugins/perl/Makefile.am
+++ b/plugins/perl/Makefile.am
@@ -54,16 +54,16 @@ nbdkit_perl_plugin_la_LDFLAGS = \
-module -avoid-version -shared \
$(PERL_LDOPTS)
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-perl-plugin.3
CLEANFILES += $(man_MANS)
nbdkit-perl-plugin.3: nbdkit-perl-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=3 --name=`basename $@ .3` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=3 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
endif
diff --git a/plugins/perl/nbdkit-perl-plugin.pod b/plugins/perl/nbdkit-perl-plugin.pod
index ce8bb51..1ddd6b6 100644
--- a/plugins/perl/nbdkit-perl-plugin.pod
+++ b/plugins/perl/nbdkit-perl-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-perl-plugin - nbdkit perl plugin
@@ -366,43 +364,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2013-2014 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/python/Makefile.am b/plugins/python/Makefile.am
index bcd102f..292d30b 100644
--- a/plugins/python/Makefile.am
+++ b/plugins/python/Makefile.am
@@ -55,16 +55,16 @@ nbdkit_python_plugin_la_LDFLAGS = \
-module -avoid-version -shared \
$(PYTHON_LDFLAGS)
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-python-plugin.3
CLEANFILES += $(man_MANS)
nbdkit-python-plugin.3: nbdkit-python-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=3 --name=`basename $@ .3` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=3 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
endif
diff --git a/plugins/python/nbdkit-python-plugin.pod b/plugins/python/nbdkit-python-plugin.pod
index c80af9b..f6ada4d 100644
--- a/plugins/python/nbdkit-python-plugin.pod
+++ b/plugins/python/nbdkit-python-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-python-plugin - nbdkit python plugin
@@ -285,43 +283,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2013-2014 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/random/Makefile.am b/plugins/random/Makefile.am
index fac200d..d990158 100644
--- a/plugins/random/Makefile.am
+++ b/plugins/random/Makefile.am
@@ -47,14 +47,14 @@ nbdkit_random_plugin_la_CFLAGS = \
nbdkit_random_plugin_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-random-plugin.1
CLEANFILES += $(man_MANS)
nbdkit-random-plugin.1: nbdkit-random-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
diff --git a/plugins/random/nbdkit-random-plugin.pod b/plugins/random/nbdkit-random-plugin.pod
index 6539d61..9967f5b 100644
--- a/plugins/random/nbdkit-random-plugin.pod
+++ b/plugins/random/nbdkit-random-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-random-plugin - plugin to serve random data
@@ -54,43 +52,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2018 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/ruby/Makefile.am b/plugins/ruby/Makefile.am
index 092f9e6..c5af56d 100644
--- a/plugins/ruby/Makefile.am
+++ b/plugins/ruby/Makefile.am
@@ -55,16 +55,16 @@ nbdkit_ruby_plugin_la_LDFLAGS = \
-module -avoid-version -shared \
$(RUBY_LDFLAGS)
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-ruby-plugin.3
CLEANFILES += $(man_MANS)
nbdkit-ruby-plugin.3: nbdkit-ruby-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=3 --name=`basename $@ .3` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=3 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
endif
diff --git a/plugins/ruby/nbdkit-ruby-plugin.pod b/plugins/ruby/nbdkit-ruby-plugin.pod
index 29d072a..fab816f 100644
--- a/plugins/ruby/nbdkit-ruby-plugin.pod
+++ b/plugins/ruby/nbdkit-ruby-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-ruby-plugin - nbdkit ruby plugin
@@ -300,43 +298,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2013-2016 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/split/Makefile.am b/plugins/split/Makefile.am
index 42b9bfd..49c13f4 100644
--- a/plugins/split/Makefile.am
+++ b/plugins/split/Makefile.am
@@ -47,14 +47,14 @@ nbdkit_split_plugin_la_CFLAGS = \
nbdkit_split_plugin_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-split-plugin.1
CLEANFILES += $(man_MANS)
nbdkit-split-plugin.1: nbdkit-split-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
diff --git a/plugins/split/nbdkit-split-plugin.pod b/plugins/split/nbdkit-split-plugin.pod
index fb47faf..a7cb5ff 100644
--- a/plugins/split/nbdkit-split-plugin.pod
+++ b/plugins/split/nbdkit-split-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-split-plugin - nbdkit plugin to concatenate split files into one disk
@@ -79,43 +77,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2017 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/streaming/Makefile.am b/plugins/streaming/Makefile.am
index ea64109..5443c4b 100644
--- a/plugins/streaming/Makefile.am
+++ b/plugins/streaming/Makefile.am
@@ -47,14 +47,14 @@ nbdkit_streaming_plugin_la_CFLAGS = \
nbdkit_streaming_plugin_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-streaming-plugin.1
CLEANFILES += $(man_MANS)
nbdkit-streaming-plugin.1: nbdkit-streaming-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
diff --git a/plugins/streaming/nbdkit-streaming-plugin.pod b/plugins/streaming/nbdkit-streaming-plugin.pod
index 98e8337..b33f756 100644
--- a/plugins/streaming/nbdkit-streaming-plugin.pod
+++ b/plugins/streaming/nbdkit-streaming-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-streaming-plugin - nbdkit streaming plugin
@@ -81,43 +79,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2014 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/tar/Makefile.am b/plugins/tar/Makefile.am
index d65ebf7..c4872d4 100644
--- a/plugins/tar/Makefile.am
+++ b/plugins/tar/Makefile.am
@@ -48,16 +48,16 @@ nbdkit-tar-plugin: $(source)
mv $@-t $@
chmod 0555 $@
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-tar-plugin.1
CLEANFILES += $(man_MANS)
nbdkit-tar-plugin.1: $(source)
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --name nbdkit-tar-plugin --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
endif
diff --git a/plugins/tar/tar.pl b/plugins/tar/tar.pl
index 69f693e..e92f748 100644
--- a/plugins/tar/tar.pl
+++ b/plugins/tar/tar.pl
@@ -3,8 +3,6 @@
=pod
-=encoding utf8
-
=head1 NAME
nbdkit-tar-plugin - Read and write files inside tar files without unpacking.
@@ -72,46 +70,6 @@ Based on the virt-v2v OVA importer written by Tomáš Golembiovský.
Copyright (C) 2017 Red Hat Inc.
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
=cut
use strict;
diff --git a/plugins/tcl/Makefile.am b/plugins/tcl/Makefile.am
index fb21481..befaf07 100644
--- a/plugins/tcl/Makefile.am
+++ b/plugins/tcl/Makefile.am
@@ -53,16 +53,16 @@ nbdkit_tcl_plugin_la_LDFLAGS = \
-module -avoid-version -shared \
$(TCL_LIBS)
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-tcl-plugin.3
CLEANFILES += $(man_MANS)
nbdkit-tcl-plugin.3: nbdkit-tcl-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=3 --name=`basename $@ .3` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=3 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
endif
diff --git a/plugins/tcl/nbdkit-tcl-plugin.pod b/plugins/tcl/nbdkit-tcl-plugin.pod
index 17b5c5f..2d40ba1 100644
--- a/plugins/tcl/nbdkit-tcl-plugin.pod
+++ b/plugins/tcl/nbdkit-tcl-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-tcl-plugin - nbdkit Tcl plugin
@@ -292,43 +290,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2018 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/vddk/Makefile.am b/plugins/vddk/Makefile.am
index 3b3e8aa..5d5762f 100644
--- a/plugins/vddk/Makefile.am
+++ b/plugins/vddk/Makefile.am
@@ -54,16 +54,16 @@ nbdkit_vddk_plugin_la_LIBADD = \
nbdkit_vddk_plugin_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-vddk-plugin.1
CLEANFILES += $(man_MANS)
nbdkit-vddk-plugin.1: nbdkit-vddk-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
endif
diff --git a/plugins/vddk/nbdkit-vddk-plugin.pod b/plugins/vddk/nbdkit-vddk-plugin.pod
index 241a992..25e78ff 100644
--- a/plugins/vddk/nbdkit-vddk-plugin.pod
+++ b/plugins/vddk/nbdkit-vddk-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-vddk-plugin - VMware VDDK plugin for nbdkit
@@ -328,43 +326,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2013-2017 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/xz/Makefile.am b/plugins/xz/Makefile.am
index 39baef8..9b20718 100644
--- a/plugins/xz/Makefile.am
+++ b/plugins/xz/Makefile.am
@@ -56,16 +56,16 @@ nbdkit_xz_plugin_la_LIBADD = \
nbdkit_xz_plugin_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-xz-plugin.1
CLEANFILES += $(man_MANS)
nbdkit-xz-plugin.1: nbdkit-xz-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
endif
diff --git a/plugins/xz/nbdkit-xz-plugin.pod b/plugins/xz/nbdkit-xz-plugin.pod
index 7d8332a..e5e708f 100644
--- a/plugins/xz/nbdkit-xz-plugin.pod
+++ b/plugins/xz/nbdkit-xz-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-xz-plugin - nbdkit xz plugin
@@ -96,43 +94,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2013 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/plugins/zero/Makefile.am b/plugins/zero/Makefile.am
index 11ccce0..0dcbbf0 100644
--- a/plugins/zero/Makefile.am
+++ b/plugins/zero/Makefile.am
@@ -47,14 +47,14 @@ nbdkit_zero_plugin_la_CFLAGS = \
nbdkit_zero_plugin_la_LDFLAGS = \
-module -avoid-version -shared
-if HAVE_POD2MAN
+if HAVE_POD
man_MANS = nbdkit-zero-plugin.1
CLEANFILES += $(man_MANS)
nbdkit-zero-plugin.1: nbdkit-zero-plugin.pod
- $(POD2MAN) $(POD2MAN_ARGS) --section=1 --name=`basename $@ .1` $< $@.t && \
- if grep 'POD ERROR' $@.t; then rm $@.t; exit 1; fi && \
- mv $@.t $@
+ $(PODWRAPPER) --section=1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
-endif
+endif HAVE_POD
diff --git a/plugins/zero/nbdkit-zero-plugin.pod b/plugins/zero/nbdkit-zero-plugin.pod
index 015c70a..72bb1aa 100644
--- a/plugins/zero/nbdkit-zero-plugin.pod
+++ b/plugins/zero/nbdkit-zero-plugin.pod
@@ -1,5 +1,3 @@
-=encoding utf8
-
=head1 NAME
nbdkit-zero-plugin - nbdkit zero length plugin
@@ -31,43 +29,3 @@ Richard W.M. Jones
=head1 COPYRIGHT
Copyright (C) 2018 Red Hat Inc.
-
-=head1 LICENSE
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-=over 4
-
-=item *
-
-Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-=item *
-
-Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-=item *
-
-Neither the name of Red Hat nor the names of its contributors may be
-used to endorse or promote products derived from this software without
-specific prior written permission.
-
-=back
-
-THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
diff --git a/podwrapper.pl.in b/podwrapper.pl.in
new file mode 100755
index 0000000..6518b4b
--- /dev/null
+++ b/podwrapper.pl.in
@@ -0,0 +1,496 @@
+#!/usr/bin/env perl
+# podwrapper.pl
+# @configure_input@
+# Copyright (C) 2010-2018 Red Hat Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# * Neither the name of Red Hat nor the names of its contributors may be
+# used to endorse or promote products derived from this software without
+# specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+
+use warnings;
+use strict;
+
+use Pod::Usage;
+use Getopt::Long;
+use Pod::Man;
+use Pod::Simple;
+use Pod::Simple::Text;
+use Pod::Simple::XHTML;
+use File::Basename;
+
+# https://www.redhat.com/archives/libguestfs/2013-May/thread.html#00088
+eval { $Text::Wrap::huge = "overflow" };
+
+=head1 NAME
+
+podwrapper.pl - Generate documentation from POD input files
+
+=head1 SYNOPSIS
+
+ EXTRA_DIST = foo.pod
+
+ if HAVE_POD
+
+ man_MANS = foo.1
+ CLEANFILES += $(man_MANS)
+
+ foo.1: foo.pod
+ $(PODWRAPPER) --section 1 --man $@ \
+ --html $(top_builddir)/html/$@.html \
+ $<
+
+ endif HAVE_POD
+
+=head1 DESCRIPTION
+
+podwrapper.pl is a Perl script that generates various output formats
+from POD input files that nbdkit uses for most documentation.
+
+You must specify one input file, and one or more output formats. The
+output options are I<--man>, I<--html> and I<--text> (see below).
+
+In C<Makefile.am> files, use a variation of the boilerplate shown in
+the L</SYNOPSIS> section above.
+
+For information about the POD format, see L<perlpod(1)>.
+
+=head1 OPTIONS
+
+=over 4
+
+=cut
+
+my $help;
+
+=item B<--help>
+
+Display brief help.
+
+=cut
+
+my $html;
+
+=item B<--html output.html>
+
+Write a web page to C<output.html>. If this option is not
+given, then no web page output is produced.
+
+=cut
+
+my @inserts;
+
+=item B<--insert filename:__PATTERN__>
+
+In the input file, replace the literal text C<__PATTERN__> with the
+replacement file C<filename>. You can give this option multiple
+times.
+
+The contents of C<filename> are treated as POD.
+Compare and contrast with I<--verbatim>.
+
+Although it is conventional to use C<__...__> (double underscores) for
+patterns, in fact you can use any string as the pattern.
+
+=cut
+
+my $man;
+
+=item B<--man output.n>
+
+Write a man page to C<output.n> (C<n> is the manual section number).
+If this option is not given, then no man page output is produced.
+
+=cut
+
+my $name;
+
+=item B<--name name>
+
+Set the name of the man page. If not set, defaults to the basename
+of the input file.
+
+=cut
+
+my $section;
+
+=item B<--section N>
+
+Set the section of the man page (a number such as C<1> for
+command line utilities or C<3> for C API documentation). If
+not set, defaults to C<1>.
+
+=cut
+
+my $text;
+
+=item B<--text output.txt>
+
+Write a text file to C<output.txt>. If this option is not
+given, then no text output is produced.
+
+=cut
+
+my @verbatims;
+
+=item B<--verbatim filename:__PATTERN__>
+
+In the input file, replace the literal text C<__PATTERN__> with the
+replacement file C<filename>. You can give this option multiple
+times.
+
+The contents of C<filename> are inserted as verbatim text, and
+are I<not> interpreted as POD.
+Compare and contrast with I<--insert>.
+
+Although it is conventional to use C<__...__> (double underscores) for
+patterns, in fact you can use any string as the pattern.
+
+=cut
+
+# Clean up the program name.
+my $progname = $0;
+$progname =~ s{.*/}{};
+
+# Parse options.
+GetOptions ("help|?" => \$help,
+ "html=s" => \$html,
+ "insert=s" => \@inserts,
+ "man=s" => \$man,
+ "name=s" => \$name,
+ "section=s" => \$section,
+ "text=s" => \$text,
+ "verbatim=s" => \@verbatims,
+ ) or pod2usage (2);
+pod2usage (1) if $help;
+
+die "$progname: missing argument: podwrapper input.pod\n" unless @ARGV == 1;
+my $input = $ARGV[0];
+
+# There should be at least one output.
+die "$progname: $input: no output format specified. Use --man and/or --html and/or --text.\n"
+ unless defined $man || defined $html || defined $text;
+
+# Default for $name and $section.
+$name = basename ($input, ".pod") unless defined $name;
+$section = 1 unless defined $section;
+
+# Note that these @...@ are substituted by ./configure.
+my $abs_top_srcdir = "@abs_top_srcdir@";
+my $abs_top_builddir = "@abs_top_builddir@";
+my $package_name = "@PACKAGE_NAME@";
+my $package_version = "@PACKAGE_VERSION@";
+
+die "$progname: ./configure substitutions were not performed"
+ unless $abs_top_srcdir && $abs_top_builddir &&
+ $package_name && $package_version;
+
+# Create a stable date (thanks Hilko Bengen).
+my $date;
+my $filename = "$abs_top_srcdir/.git";
+if (!$date && -d $filename) {
+ local $ENV{GIT_DIR} = $filename;
+ $_ = `git show -s --format=%ci`;
+ $date = $1 if /^(\d+-\d+-\d+)\s/;
+}
+if (!$date) {
+ my ($day, $month, $year) = (localtime)[3,4,5];
+ $date = sprintf ("%04d-%02d-%02d", $year+1900, $month+1, $day);
+}
+
+# Create a release string.
+my $release = "$package_name-$package_version";
+
+#print "input=$input\n";
+#print "name=$name\n";
+#print "section=$section\n";
+#print "date=$date\n";
+
+# Read the input.
+my $content = read_whole_file ($input);
+
+# Perform @inserts.
+foreach (@inserts) {
+ my @a = split /:/, $_, 2;
+ die "$progname: $input: no colon in parameter of --insert\n" unless @a >= 2;
+ my $replacement = read_whole_file ($a[0]);
+ my $oldcontent = $content;
+ $content =~ s/$a[1]/$replacement/ge;
+ die "$progname: $input: could not find pattern '$a[1]' in input file\n"
+ if $content eq $oldcontent;
+}
+
+# Turn external links to this man page into simple cross-section links.
+$content =~ s,\QL<$name($section)/\E,L</,g;
+
+# Perform @verbatims.
+foreach (@verbatims) {
+ my @a = split /:/, $_, 2;
+ die "$progname: $input: no colon in parameter of --verbatim\n" unless @a >= 2;
+ my $replacement = read_verbatim_file ($a[0]);
+ my $oldcontent = $content;
+ $content =~ s/$a[1]/$replacement/ge;
+ die "$progname: $input: could not find pattern '$a[1]' in input file\n"
+ if $content eq $oldcontent;
+}
+
+# There should be no =encoding line present in the content (we will add one).
+die "$progname: $input: =encoding must not be present in input\n"
+ if $content =~ /^=encoding/m;
+
+$content =~ s/^=(.*)/\n=encoding utf8\n\n=$1/m;
+
+# Verify sections present / not present.
+die "$progname: $input: missing DESCRIPTION section\n"
+ if $content !~ /^=head1 DESCRIPTION/m;
+die "$progname: $input: missing AUTHOR or AUTHORS section\n"
+ unless $content =~ /^=head1 AUTHOR/m;
+die "$progname: $input: missing SEE ALSO section\n"
+ unless $content =~ /^=head1 SEE ALSO/m;
+die "$progname: $input: missing COPYRIGHT section\n"
+ unless $content =~ /^=head1 COPYRIGHT/m;
+die "$progname: $input: BUGS is now added automatically, do not add it to the POD file\n"
+ if $content =~ /^=head1 (REPORTING )?BUGS/m;
+die "$progname: $input: LICENSE is now added automatically, do not add it to the POD file\n"
+ if $content =~ /^=head1 LICENSE/m;
+
+# Add standard LICENSE section at the end.
+$content .=
+"
+
+=head1 LICENSE
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+=over 4
+
+=item *
+
+Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+=item *
+
+Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+=item *
+
+Neither the name of Red Hat nor the names of its contributors may be
+used to endorse or promote products derived from this software without
+specific prior written permission.
+
+=back
+
+THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+";
+
+# Check no over-long lines in the input. (As a special exception this
+# is permitted in verbatim sections or if the line contains a URL).
+my @lines = split /\n/, $content;
+foreach (@lines) {
+ die "$progname: $input: line too long:\n$_\n"
+ if length $_ > 76 &&
+ substr ($_, 0, 1) ne ' ' &&
+ ! m/https?:/;
+}
+
+# Output man page.
+SUBMAN: {
+ package Podwrapper::Man;
+
+ use vars qw(@ISA $VERSION);
+ @ISA = qw(Pod::Man);
+ $VERSION = $package_version;
+
+ # Override the L<> method.
+ sub cmd_l
+ {
+ my ($self, $attrs, $text) = @_;
+ return $text;
+ }
+}
+
+if ($man) {
+ my $parser = Podwrapper::Man->new (
+ name => $name,
+ release => $release, section => $section,
+ center => "Virtualization Support",
+ date => $date,
+ stderr => 1, utf8 => 1
+ );
+ my $output;
+ $parser->no_errata_section (1);
+ $parser->complain_stderr (1);
+ $parser->output_string (\$output);
+ $parser->parse_string_document ($content)
+ or die "$progname: could not parse input document";
+ open OUT, ">$man" or die "$progname: $man: $!";
+ print OUT $output or die "$progname: $man: $!";
+ close OUT or die "$progname: $man: $!";
+ if ($parser->any_errata_seen) {
+ unlink $man;
+ die "$input: errors or warnings in this POD file, see messages above\n"
+ }
+ #print "$progname: wrote $man\n";
+}
+
+# Output HTML.
+SUBHTML: {
+ # Subclass Pod::Simple::XHTML. See the documentation.
+ package Podwrapper::XHTML;
+
+ use vars qw(@ISA $VERSION);
+ @ISA = qw(Pod::Simple::XHTML);
+ $VERSION = $package_version;
+
+ sub is_an_nbdkit_page
+ {
+ local $_ = shift;
+
+ return 1 if /^nbdkit/;
+ return 0;
+ }
+
+ sub resolve_man_page_link
+ {
+ my $self = shift;
+ my $name = $_[0]; # eg. "nbdkit(1)", can be undef
+ my $anchor = $_[1]; # eg. "SYNOPSIS", can be undef
+ my $r = "";
+ if (defined $name) {
+ return $self->SUPER::resolve_man_page_link (@_)
+ unless is_an_nbdkit_page ($name);
+ $name =~ s/\((.*)\)$/.$1/;
+ $r .= "$name.html";
+ }
+ $r .= "#" . $self->idify ($anchor, 1) if defined $anchor;
+ $r;
+ }
+
+ # For some reason Pod::Simple::XHTML usually cannot find a
+ # title for the page. This defaults the HTML <title> field
+ # to the same as the man page name.
+ sub default_title { $name }
+}
+
+if ($html) {
+ mkdir "$abs_top_builddir/html";
+
+ my $parser = Podwrapper::XHTML->new;
+ my $output;
+ $parser->no_errata_section (1);
+ $parser->complain_stderr (1);
+ $parser->output_string (\$output);
+ # Added in Pod::Simple 3.16, 2011-03-14.
+ eval { $parser->html_charset ("UTF-8") };
+ $parser->html_css ("pod.css");
+ $parser->index (1);
+ $parser->parse_string_document ($content);
+
+ # Hack for Perl 5.16.
+ $output =~ s{/>pod.css<}{/>\n<};
+
+ open OUT, ">$html" or die "$progname: $html: $!";
+ print OUT $output or die "$progname: $html: $!";
+ close OUT or die "$progname: $html: $!";
+ if ($parser->any_errata_seen) {
+ unlink $html;
+ die "$input: errors or warnings in this POD file, see messages above\n"
+ }
+ #print "$progname: wrote $html\n";
+}
+
+# Output text.
+if ($text) {
+ my $parser = Pod::Simple::Text->new;
+ my $output;
+ $parser->no_errata_section (1);
+ $parser->complain_stderr (1);
+ $parser->output_string (\$output);
+ $parser->parse_string_document ($content);
+ open OUT, ">$text" or die "$progname: $text: $!";
+ binmode OUT, ":utf8";
+ print OUT $output or die "$progname: $text: $!";
+ close OUT or die "$progname: $text: $!";
+ if ($parser->any_errata_seen) {
+ unlink $text;
+ die "$input: errors or warnings in this POD file, see messages above\n"
+ }
+ #print "$progname: wrote $text\n";
+}
+
+sub read_whole_file
+{
+ my $input = shift;
+ local $/ = undef;
+
+ open FILE, "<:encoding(UTF-8)", $input or die "$progname: $input: $!";
+ $_ = <FILE>;
+ close FILE;
+ $_;
+}
+
+sub read_verbatim_file
+{
+ my $input = shift;
+ my $r = "";
+
+ open FILE, "<:encoding(UTF-8)", $input or die "$progname: $input: $!";
+ while (<FILE>) {
+ $r .= " $_";
+ }
+ close FILE;
+ $r;
+}
+
+=head1 SEE ALSO
+
+L<perlpod(1)>,
+L<Pod::Simple(3pm)>.
+
+=head1 AUTHOR
+
+Richard W.M. Jones.
+
+=head1 COPYRIGHT
+
+Copyright (C) 2012-2018 Red Hat Inc.
--
2.17.1