[libvirt] [dbus PATCH v2] docs: Introduce man file for libvirt-dbus daemon

Pavel Hrdina posted 1 patch 5 years, 11 months ago
Failed in applying to current master (apply log)
.gitignore            |  2 ++
Makefile.am           |  2 +-
configure.ac          |  1 +
docs/Makefile.am      | 13 +++++++++
docs/libvirt-dbus.pod | 66 +++++++++++++++++++++++++++++++++++++++++++
libvirt-dbus.spec.in  |  2 ++
6 files changed, 85 insertions(+), 1 deletion(-)
create mode 100644 docs/Makefile.am
create mode 100644 docs/libvirt-dbus.pod
[libvirt] [dbus PATCH v2] docs: Introduce man file for libvirt-dbus daemon
Posted by Pavel Hrdina 5 years, 11 months ago
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
---

changes in v2:
    - added pod2man build dependency into spec file

 .gitignore            |  2 ++
 Makefile.am           |  2 +-
 configure.ac          |  1 +
 docs/Makefile.am      | 13 +++++++++
 docs/libvirt-dbus.pod | 66 +++++++++++++++++++++++++++++++++++++++++++
 libvirt-dbus.spec.in  |  2 ++
 6 files changed, 85 insertions(+), 1 deletion(-)
 create mode 100644 docs/Makefile.am
 create mode 100644 docs/libvirt-dbus.pod

diff --git a/.gitignore b/.gitignore
index c6d9754..0bf09cf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,6 +29,8 @@ vgcore.*
 /data/system/libvirt-dbus.rules
 /data/system/org.libvirt.conf
 
+/docs/*.1
+
 /src/.deps/
 /src/libvirt-dbus
 /src/org.libvirt.service
diff --git a/Makefile.am b/Makefile.am
index 16f57b2..bb5ff5c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
 
-SUBDIRS = data src tests
+SUBDIRS = data docs src tests
 
 ACLOCAL_AMFLAGS = -I m4
 
diff --git a/configure.ac b/configure.ac
index cc8947c..707a03e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,6 +74,7 @@ AC_CONFIG_FILES([run],
                 [chmod +x,-w run])
 AC_OUTPUT(Makefile
           data/Makefile
+          docs/Makefile
           src/Makefile
           tests/Makefile
           libvirt-dbus.spec)
diff --git a/docs/Makefile.am b/docs/Makefile.am
new file mode 100644
index 0000000..c41ffae
--- /dev/null
+++ b/docs/Makefile.am
@@ -0,0 +1,13 @@
+POD2MAN = pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)"
+
+PODFILES = libvirt-dbus.pod
+
+%.8: %.pod
+	$(AM_V_GEN)$(POD2MAN) -s 8 $< $@ \
+		&& if grep 'POD ERROR' $@; then rm $@; exit 1; fi
+
+man8_MANS = libvirt-dbus.8
+
+EXTRA_DIST = $(PODFILES)
+
+CLEANFILES = $(man8_MANS)
diff --git a/docs/libvirt-dbus.pod b/docs/libvirt-dbus.pod
new file mode 100644
index 0000000..49de044
--- /dev/null
+++ b/docs/libvirt-dbus.pod
@@ -0,0 +1,66 @@
+=head1 NAME
+
+libvirt-dbus - D-Bus daemon exporting libvirt API
+
+=head1 SYNOPSIS
+
+B<libvirt-dbus> [I<OPTION>]...
+
+=head1 DESCRIPTION
+
+libvirt-dbus wraps libvirt API to provide a high-level object-oriented
+API better suited for dbus-based applications.
+
+Normally libvirt-dbus is started by D-Bus daemon on demand.
+
+=head1 OPTIONS
+
+=over
+
+=item B<-h --help>
+
+Display command line help usage then exit.
+
+=item B<--system>
+
+Connect to the system bus.
+
+=item B<--session>
+
+Connect to the session bus.
+
+=item B<-t --threads> I<NUM>
+
+Configure maximal number of worker threads.
+
+=back
+
+=head1 BUGS
+
+Please report all bugs you discover.  This should be done via either:
+
+=over
+
+=item a) the mailing list
+
+L<https://libvirt.org/contact.html>
+
+=item b) the bug tracker
+
+L<https://libvirt.org/bugs.html>
+
+=back
+
+Alternatively, you may report bugs to your software distribution / vendor.
+
+=head1 AUTHORS
+
+Please refer to the AUTHORS file distributed with libvirt-dbus.
+
+=head1 LICENSE
+
+libvirt-dbus is Free Software and licenced under LGPLv2+.
+
+=head1 SEE ALSO
+
+L<https://libvirt.org/dbus.html>, L<https://libvirt.org/>
diff --git a/libvirt-dbus.spec.in b/libvirt-dbus.spec.in
index 1543197..db58483 100644
--- a/libvirt-dbus.spec.in
+++ b/libvirt-dbus.spec.in
@@ -17,6 +17,7 @@ BuildRequires: gcc
 BuildRequires: glib2-devel >= %{glib2_version}
 BuildRequires: libvirt-devel >= %{libvirt_version}
 BuildRequires: libvirt-glib-devel >= %{libvirt_glib_version}
+BuildRequires: /usr/bin/pod2man
 
 Requires: dbus
 Requires: glib2 >= %{glib2_version}
@@ -55,5 +56,6 @@ exit 0
 %{_datadir}/dbus-1/system-services/org.libvirt.service
 %{_datadir}/dbus-1/system.d/org.libvirt.conf
 %{_datadir}/dbus-1/interfaces/org.libvirt.*.xml
+%{_mandir}/man8/libvirt-dbus.8*
 
 %changelog
-- 
2.17.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [dbus PATCH v2] docs: Introduce man file for libvirt-dbus daemon
Posted by Daniel P. Berrangé 5 years, 11 months ago
On Tue, May 15, 2018 at 03:48:28PM +0200, Pavel Hrdina wrote:
> Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
> ---
> 
> changes in v2:
>     - added pod2man build dependency into spec file
> 
>  .gitignore            |  2 ++
>  Makefile.am           |  2 +-
>  configure.ac          |  1 +
>  docs/Makefile.am      | 13 +++++++++
>  docs/libvirt-dbus.pod | 66 +++++++++++++++++++++++++++++++++++++++++++
>  libvirt-dbus.spec.in  |  2 ++
>  6 files changed, 85 insertions(+), 1 deletion(-)
>  create mode 100644 docs/Makefile.am
>  create mode 100644 docs/libvirt-dbus.pod

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list