From 144e49b0bc5c7d12f5d82f629c62885db9989dd2 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Wed, 19 Dec 2012 15:19:23 +0100 Subject: [PATCH] use xmlto for generating man page --- ...-add-public-and-system-ID-to-doctype.patch | 23 ++ 0002-make-the-man-page-valid-docbook.patch | 324 ++++++++++++++++++ 0003-rename-DOCBOOK2X-to-DOCBOOK2MAN.patch | 51 +++ ...-of-DOCBOOK2MAN-on-configure-cmdline.patch | 39 +++ libcmis.spec | 23 +- 5 files changed, 456 insertions(+), 4 deletions(-) create mode 100644 0001-add-public-and-system-ID-to-doctype.patch create mode 100644 0002-make-the-man-page-valid-docbook.patch create mode 100644 0003-rename-DOCBOOK2X-to-DOCBOOK2MAN.patch create mode 100644 0004-allow-setting-of-DOCBOOK2MAN-on-configure-cmdline.patch diff --git a/0001-add-public-and-system-ID-to-doctype.patch b/0001-add-public-and-system-ID-to-doctype.patch new file mode 100644 index 0000000..0bb2cbc --- /dev/null +++ b/0001-add-public-and-system-ID-to-doctype.patch @@ -0,0 +1,23 @@ +From b1c9854b080a896053657a38487c7b65af53bd40 Mon Sep 17 00:00:00 2001 +From: David Tardon +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 @@ + +- ++ + + + 2012-02-21 +-- +1.8.0 + diff --git a/0002-make-the-man-page-valid-docbook.patch b/0002-make-the-man-page-valid-docbook.patch new file mode 100644 index 0000000..ebfafad --- /dev/null +++ b/0002-make-the-man-page-valid-docbook.patch @@ -0,0 +1,324 @@ +From b26784d5b6cab51e3119a706bcde01438478e310 Mon Sep 17 00:00:00 2001 +From: David Tardon +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 @@ + + + COMMANDS +- +- help +- +- +- Show the help and exit. +- +- +- +- +- list-repos +- +- +- List the repositories available on the server. +- +- +- +- +- show-root +- +- +- Displays the root node infos and children. +- +- +- +- +- get-content id +- +- +- Download the content of the CMIS object corresponding to +- id in the current directory. +- +- +- +- +- set-content id +- +- +- Upload a file as the content stream of the CMIS object corresponding to +- id. +- +- +- +- +- create-folder parent-id name +- +- +- Create a sub folder in folder parent-id +- named name. The default type of the folder +- to create is cmis:folder, but this can be changed using --object-type option. +- +- +- +- +- create-document parent-id name +- +- +- Create a document in folder parent-id +- named name. The default type of the document +- to create is cmis:document, but this can be changed using --object-type option. +- +- +- Note that the --input-file and --input-type may be mandatory, depending on the type of +- the document to create and its constraints. +- +- +- +- +- update-object object-id +- +- +- Replace the writeable properties given with --object-property option on the object +- matching id object-id. +- +- +- +- +- type-by-id arg... +- +- +- Displays the infos and children (if any) of all the CMIS types corresponding +- to the listed ids. +- +- +- +- +- show-by-id arg... +- +- +- Displays the infos and children (if any) of all the CMIS objects corresponding +- to the listed ids. +- +- +- +- +- show-by-path arg... +- +- +- Displays the infos and children (if any) of all the CMIS objects corresponding +- to the listed paths. +- +- +- +- +- delete arg... +- +- +- Deletes the CMIS objects corresponding to the listed ids. If the node +- is a folder, its content will be removed as well. +- +- +- +- +- checkout arg +- +- +- Checkout the document corresponding to the provided id and display +- the infos of the created private working copy. +- +- +- +- +- cancel-checkout arg +- +- +- Cancel the Private Working Copy corresponding to the node id. +- +- +- +- +- get-versions arg +- +- +- Display the versions (if any) of all the CMIS object corresponding +- to the provided id. +- +- +- +- +- checkin arg +- +- +- 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. ++ ++ ++ help ++ ++ ++ Show the help and exit. ++ ++ ++ ++ ++ list-repos ++ ++ ++ List the repositories available on the server. ++ ++ ++ ++ ++ show-root ++ ++ ++ Displays the root node infos and children. ++ ++ ++ ++ ++ get-content id ++ ++ ++ Download the content of the CMIS object corresponding to ++ id in the current directory. ++ ++ ++ ++ ++ set-content id ++ ++ ++ Upload a file as the content stream of the CMIS object corresponding to ++ id. ++ ++ ++ ++ ++ create-folder parent-id name ++ ++ ++ Create a sub folder in folder parent-id ++ named name. The default type of the folder ++ to create is cmis:folder, but this can be changed using --object-type option. ++ ++ ++ ++ ++ create-document parent-id name ++ ++ ++ Create a document in folder parent-id ++ named name. The default type of the document ++ to create is cmis:document, but this can be changed using --object-type option. ++ ++ ++ Note that the --input-file and --input-type may be mandatory, depending on the type of ++ the document to create and its constraints. ++ ++ ++ ++ ++ update-object object-id ++ ++ ++ Replace the writeable properties given with --object-property option on the object ++ matching id object-id. ++ ++ ++ ++ ++ type-by-id arg... ++ ++ ++ Displays the infos and children (if any) of all the CMIS types corresponding ++ to the listed ids. ++ ++ ++ ++ ++ show-by-id arg... ++ ++ ++ Displays the infos and children (if any) of all the CMIS objects corresponding ++ to the listed ids. ++ ++ ++ ++ ++ show-by-path arg... ++ ++ ++ Displays the infos and children (if any) of all the CMIS objects corresponding ++ to the listed paths. ++ ++ ++ ++ ++ delete arg... ++ ++ ++ Deletes the CMIS objects corresponding to the listed ids. If the node ++ is a folder, its content will be removed as well. ++ ++ ++ ++ ++ checkout arg ++ ++ ++ Checkout the document corresponding to the provided id and display ++ the infos of the created private working copy. ++ ++ ++ ++ ++ cancel-checkout arg ++ ++ ++ Cancel the Private Working Copy corresponding to the node id. ++ ++ ++ ++ ++ get-versions arg ++ ++ ++ Display the versions (if any) of all the CMIS object corresponding ++ to the provided id. ++ ++ ++ ++ ++ checkin arg ++ ++ ++ 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. +- +- +- ++ Note that repositories without the ability to update the private working copies ++ will need the --input-file, --input-type and --object-property options. ++ ++ ++ ++ + + + +-- +1.8.0 + diff --git a/0003-rename-DOCBOOK2X-to-DOCBOOK2MAN.patch b/0003-rename-DOCBOOK2X-to-DOCBOOK2MAN.patch new file mode 100644 index 0000000..83e4960 --- /dev/null +++ b/0003-rename-DOCBOOK2X-to-DOCBOOK2MAN.patch @@ -0,0 +1,51 @@ +From b1c108ce364e8133b75787db1a7aa9e0fcd722c9 Mon Sep 17 00:00:00 2001 +From: David Tardon +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 + diff --git a/0004-allow-setting-of-DOCBOOK2MAN-on-configure-cmdline.patch b/0004-allow-setting-of-DOCBOOK2MAN-on-configure-cmdline.patch new file mode 100644 index 0000000..0f30b45 --- /dev/null +++ b/0004-allow-setting-of-DOCBOOK2MAN-on-configure-cmdline.patch @@ -0,0 +1,39 @@ +From 3432c259e32518ad676f4e912662ce018c77fd4f Mon Sep 17 00:00:00 2001 +From: David Tardon +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 + diff --git a/libcmis.spec b/libcmis.spec index 70d963b..04416fc 100644 --- a/libcmis.spec +++ b/libcmis.spec @@ -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 - 0.3.0-6 +- use xmlto for generating man page + * Sat Dec 08 2012 David Tardon - 0.3.0-5 - another pointless bump