use xmlto for generating man page

f41
David Tardon 12 years ago
parent f756a8bb67
commit 144e49b0bc

@ -0,0 +1,23 @@
From b1c9854b080a896053657a38487c7b65af53bd40 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Sat, 15 Dec 2012 08:36:48 +0100
Subject: [PATCH 1/4] add public and system ID to doctype
---
doc/cmis-client.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/cmis-client.xml b/doc/cmis-client.xml
index 06f9ce1..22f041b 100644
--- a/doc/cmis-client.xml
+++ b/doc/cmis-client.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE refentry>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<refentry>
<refentryinfo>
<date>2012-02-21</date>
--
1.8.0

@ -0,0 +1,324 @@
From b26784d5b6cab51e3119a706bcde01438478e310 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Sat, 15 Dec 2012 08:40:28 +0100
Subject: [PATCH 2/4] make the man page valid docbook
---
doc/cmis-client.xml | 300 ++++++++++++++++++++++++++--------------------------
1 file changed, 151 insertions(+), 149 deletions(-)
diff --git a/doc/cmis-client.xml b/doc/cmis-client.xml
index 22f041b..b7dce51 100644
--- a/doc/cmis-client.xml
+++ b/doc/cmis-client.xml
@@ -281,156 +281,158 @@
</refsect2>
<refsect2>
<title>COMMANDS</title>
- <varlistentry>
- <term>help</term>
- <listitem>
- <para>
- Show the help and exit.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>list-repos</term>
- <listitem>
- <para>
- List the repositories available on the server.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>show-root</term>
- <listitem>
- <para>
- Displays the root node infos and children.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>get-content <replaceable class="parameter">id</replaceable></term>
- <listitem>
- <para>
- Download the content of the CMIS object corresponding to
- <replaceable class="parameter">id</replaceable> in the current directory.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>set-content <replaceable class="parameter">id</replaceable></term>
- <listitem>
- <para>
- Upload a file as the content stream of the CMIS object corresponding to
- <replaceable class="parameter">id</replaceable>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>create-folder <replaceable class="parameter">parent-id name</replaceable></term>
- <listitem>
- <para>
- Create a sub folder in folder <replaceable class="parameter">parent-id</replaceable>
- named <replaceable class="parameter">name</replaceable>. The default type of the folder
- to create is cmis:folder, but this can be changed using --object-type option.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>create-document <replaceable class="parameter">parent-id name</replaceable></term>
- <listitem>
- <para>
- Create a document in folder <replaceable class="parameter">parent-id</replaceable>
- named <replaceable class="parameter">name</replaceable>. The default type of the document
- to create is cmis:document, but this can be changed using --object-type option.
- </para>
- <para>
- Note that the --input-file and --input-type may be mandatory, depending on the type of
- the document to create and its constraints.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>update-object <replaceable class="parameter">object-id</replaceable></term>
- <listitem>
- <para>
- Replace the writeable properties given with --object-property option on the object
- matching id <replaceable class="parameter">object-id</replaceable>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>type-by-id <replaceable class="parameter">arg...</replaceable></term>
- <listitem>
- <para>
- Displays the infos and children (if any) of all the CMIS types corresponding
- to the listed ids.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>show-by-id <replaceable class="parameter">arg...</replaceable></term>
- <listitem>
- <para>
- Displays the infos and children (if any) of all the CMIS objects corresponding
- to the listed ids.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>show-by-path <replaceable class="parameter">arg...</replaceable></term>
- <listitem>
- <para>
- Displays the infos and children (if any) of all the CMIS objects corresponding
- to the listed paths.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>delete <replaceable class="parameter">arg...</replaceable></term>
- <listitem>
- <para>
- Deletes the CMIS objects corresponding to the listed ids. If the node
- is a folder, its content will be removed as well.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>checkout <replaceable class="parameter">arg</replaceable></term>
- <listitem>
- <para>
- Checkout the document corresponding to the provided id and display
- the infos of the created private working copy.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>cancel-checkout <replaceable class="parameter">arg</replaceable></term>
- <listitem>
- <para>
- Cancel the Private Working Copy corresponding to the node id.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>get-versions <replaceable class="parameter">arg</replaceable></term>
- <listitem>
- <para>
- Display the versions (if any) of all the CMIS object corresponding
- to the provided id.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>checkin <replaceable class="parameter">arg</replaceable></term>
- <listitem>
- <para>
- Check in the private working copy corresponding to the provided id and display
- the infos of the resulting document. Use the --major and --message options to
- define the version to create and the commit to associate to it.
+ <variablelist>
+ <varlistentry>
+ <term>help</term>
+ <listitem>
+ <para>
+ Show the help and exit.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>list-repos</term>
+ <listitem>
+ <para>
+ List the repositories available on the server.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>show-root</term>
+ <listitem>
+ <para>
+ Displays the root node infos and children.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>get-content <replaceable class="parameter">id</replaceable></term>
+ <listitem>
+ <para>
+ Download the content of the CMIS object corresponding to
+ <replaceable class="parameter">id</replaceable> in the current directory.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>set-content <replaceable class="parameter">id</replaceable></term>
+ <listitem>
+ <para>
+ Upload a file as the content stream of the CMIS object corresponding to
+ <replaceable class="parameter">id</replaceable>.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>create-folder <replaceable class="parameter">parent-id name</replaceable></term>
+ <listitem>
+ <para>
+ Create a sub folder in folder <replaceable class="parameter">parent-id</replaceable>
+ named <replaceable class="parameter">name</replaceable>. The default type of the folder
+ to create is cmis:folder, but this can be changed using --object-type option.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>create-document <replaceable class="parameter">parent-id name</replaceable></term>
+ <listitem>
+ <para>
+ Create a document in folder <replaceable class="parameter">parent-id</replaceable>
+ named <replaceable class="parameter">name</replaceable>. The default type of the document
+ to create is cmis:document, but this can be changed using --object-type option.
+ </para>
+ <para>
+ Note that the --input-file and --input-type may be mandatory, depending on the type of
+ the document to create and its constraints.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>update-object <replaceable class="parameter">object-id</replaceable></term>
+ <listitem>
+ <para>
+ Replace the writeable properties given with --object-property option on the object
+ matching id <replaceable class="parameter">object-id</replaceable>.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>type-by-id <replaceable class="parameter">arg...</replaceable></term>
+ <listitem>
+ <para>
+ Displays the infos and children (if any) of all the CMIS types corresponding
+ to the listed ids.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>show-by-id <replaceable class="parameter">arg...</replaceable></term>
+ <listitem>
+ <para>
+ Displays the infos and children (if any) of all the CMIS objects corresponding
+ to the listed ids.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>show-by-path <replaceable class="parameter">arg...</replaceable></term>
+ <listitem>
+ <para>
+ Displays the infos and children (if any) of all the CMIS objects corresponding
+ to the listed paths.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>delete <replaceable class="parameter">arg...</replaceable></term>
+ <listitem>
+ <para>
+ Deletes the CMIS objects corresponding to the listed ids. If the node
+ is a folder, its content will be removed as well.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>checkout <replaceable class="parameter">arg</replaceable></term>
+ <listitem>
+ <para>
+ Checkout the document corresponding to the provided id and display
+ the infos of the created private working copy.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>cancel-checkout <replaceable class="parameter">arg</replaceable></term>
+ <listitem>
+ <para>
+ Cancel the Private Working Copy corresponding to the node id.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>get-versions <replaceable class="parameter">arg</replaceable></term>
+ <listitem>
+ <para>
+ Display the versions (if any) of all the CMIS object corresponding
+ to the provided id.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>checkin <replaceable class="parameter">arg</replaceable></term>
+ <listitem>
+ <para>
+ Check in the private working copy corresponding to the provided id and display
+ the infos of the resulting document. Use the --major and --message options to
+ define the version to create and the commit to associate to it.
- Note that repositories without the ability to update the private working copies
- will need the --input-file, --input-type and --object-property options.
- </para>
- </listitem>
- </varlistentry>
+ Note that repositories without the ability to update the private working copies
+ will need the --input-file, --input-type and --object-property options.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</refsect2>
</refsect1>
<refsect1>
--
1.8.0

@ -0,0 +1,51 @@
From b1c108ce364e8133b75787db1a7aa9e0fcd722c9 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Wed, 19 Dec 2012 14:35:49 +0100
Subject: [PATCH 3/4] rename DOCBOOK2X to DOCBOOK2MAN
---
Makefile.am | 2 +-
configure.ac | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 8ee37fb..8b02a95 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,7 +13,7 @@ pkgconfigdir = $(libdir)/pkgconfig
if WITH_LIBCMIS_MAN
cmis-client.1: doc/cmis-client.xml
- $(DOCBOOK2X) $<
+ $(DOCBOOK2MAN) $<
install-man: cmis-client.1
mkdir -p $(DESTDIR)$(mandir)/man1/
diff --git a/configure.ac b/configure.ac
index 85ac16b..e45d9c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,15 +66,15 @@ AC_ARG_WITH(man,
)
AS_IF([test "x$with_man" != "xno"], [
build_man=yes
- AC_PATH_PROG(DOCBOOK2X,[docbook-to-man])
- AS_IF([test -z "$DOCBOOK2X"], [
- AC_PATH_PROG(DOCBOOK2X,[docbook2man.pl])
- AS_IF([test -z "$DOCBOOK2X"], [
+ AC_PATH_PROG(DOCBOOK2MAN,[docbook-to-man])
+ AS_IF([test -z "$DOCBOOK2MAN"], [
+ AC_PATH_PROG(DOCBOOK2MAN,[docbook2man.pl])
+ AS_IF([test -z "$DOCBOOK2MAN"], [
AC_MSG_ERROR([docbook-to-man is missing. Install docbook2X package.])
])
])
], [build_man=no])
-AC_SUBST(DOCBOOK2X)
+AC_SUBST(DOCBOOK2MAN)
AM_CONDITIONAL([WITH_LIBCMIS_MAN], [test "x$build_man" != "xno"])
AC_ARG_ENABLE([werror],
--
1.8.0

@ -0,0 +1,39 @@
From 3432c259e32518ad676f4e912662ce018c77fd4f Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Wed, 19 Dec 2012 14:39:11 +0100
Subject: [PATCH 4/4] allow setting of DOCBOOK2MAN on configure cmdline
---
configure.ac | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/configure.ac b/configure.ac
index e45d9c3..946c307 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,13 +66,15 @@ AC_ARG_WITH(man,
)
AS_IF([test "x$with_man" != "xno"], [
build_man=yes
- AC_PATH_PROG(DOCBOOK2MAN,[docbook-to-man])
- AS_IF([test -z "$DOCBOOK2MAN"], [
- AC_PATH_PROG(DOCBOOK2MAN,[docbook2man.pl])
- AS_IF([test -z "$DOCBOOK2MAN"], [
- AC_MSG_ERROR([docbook-to-man is missing. Install docbook2X package.])
- ])
- ])
+ AS_IF([test -z "$DOCBOOK2MAN"], [
+ AC_PATH_PROG(DOCBOOK2MAN,[docbook-to-man])
+ AS_IF([test -z "$DOCBOOK2MAN"], [
+ AC_PATH_PROG(DOCBOOK2MAN,[docbook2man.pl])
+ AS_IF([test -z "$DOCBOOK2MAN"], [
+ AC_MSG_ERROR([docbook-to-man is missing. Install docbook2X package.])
+ ])
+ ])
+ ])
], [build_man=no])
AC_SUBST(DOCBOOK2MAN)
AM_CONDITIONAL([WITH_LIBCMIS_MAN], [test "x$build_man" != "xno"])
--
1.8.0

@ -1,17 +1,23 @@
Name: libcmis
Version: 0.3.0
Release: 5%{?dist}
Release: 6%{?dist}
Summary: A C++ client library for the CMIS interface
Group: System Environment/Libraries
License: GPLv2+ or LGPLv2+ or MPLv1.1
URL: http://sourceforge.net/projects/libcmis/
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Patch0: 0001-add-public-and-system-ID-to-doctype.patch
Patch1: 0002-make-the-man-page-valid-docbook.patch
Patch2: 0003-rename-DOCBOOK2X-to-DOCBOOK2MAN.patch
Patch3: 0004-allow-setting-of-DOCBOOK2MAN-on-configure-cmdline.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: boost-devel
BuildRequires: docbook2X
BuildRequires: libcurl-devel
BuildRequires: libxml2-devel
BuildRequires: xmlto
%description
LibCMIS is a C++ client library for the CMIS interface. This allows C++
@ -38,11 +44,17 @@ command line.
%prep
%setup -q
sed -i -e 's/docbook-to-man/db2x_docbook2man/' configure
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
%configure --disable-static --disable-tests --disable-werror
aclocal -I m4
automake -a -c --foreign
autoconf
%configure --disable-static --disable-tests --disable-werror DOCBOOK2MAN='xmlto man'
sed -i \
-e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
@ -82,6 +94,9 @@ rm -f %{buildroot}/%{_libdir}/*.la
%changelog
* Wed Dec 19 2012 David Tardon <dtardon@redhat.com> - 0.3.0-6
- use xmlto for generating man page
* Sat Dec 08 2012 David Tardon <dtardon@redhat.com> - 0.3.0-5
- another pointless bump

Loading…
Cancel
Save