diff --git a/.gitignore b/.gitignore index 37e6616..fbe92b6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /libcmis-0.1.0.tar.gz +/libcmis-0.2.2.tar.gz diff --git a/0001-Create-the-manpage-conditionaly-and-also-install-it-.patch b/0001-Create-the-manpage-conditionaly-and-also-install-it-.patch new file mode 100644 index 0000000..23a6085 --- /dev/null +++ b/0001-Create-the-manpage-conditionaly-and-also-install-it-.patch @@ -0,0 +1,123 @@ +From e351df6bb4c05d2cffa4f3a22688f04e9a83f8f4 Mon Sep 17 00:00:00 2001 +From: Tomas Chvatal +Date: Wed, 6 Jun 2012 11:03:29 +0200 +Subject: [PATCH] Create the manpage conditionaly, and also install it when + needed. + +Signed-off-by: Tomas Chvatal +--- + Makefile.am | 22 ++++++++++++++++++---- + configure.ac | 30 ++++++++++++++++++++++++------ + doc/Makefile.am | 4 ---- + 3 files changed, 42 insertions(+), 14 deletions(-) + delete mode 100644 doc/Makefile.am + +diff --git a/Makefile.am b/Makefile.am +index 36f6f83..27520e0 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = src doc ++SUBDIRS = src + ACLOCAL_AMFLAGS = -I m4 + + pcfiles = libcmis-@LIBCMIS_API_VERSION@.pc +@@ -8,12 +8,26 @@ libcmis-@LIBCMIS_API_VERSION@.pc: libcmis.pc + pkgconfig_DATA = $(pcfiles) + pkgconfigdir = $(libdir)/pkgconfig + ++if WITH_LIBCMIS_MAN ++cmis-client.1: doc/cmis-client.xml ++ $(DOCBOOK2X) $< ++ ++install-data-am: cmis-client.1 ++ mkdir -p $(DESTDIR)$(mandir)/man1/ ++ $(INSTALL_DATA) cmis-client.1 $(DESTDIR)$(mandir)/man1/ ++ ++uninstall-am: ++ -rm -rf $(DESTDIR)$(mandir)/man1/ ++endif ++ ++dist_man_MANS = doc/cmis-client.xml ++ + EXTRA_DIST = \ + libcmis.pc.in \ + run-test.sh \ +- COPYING.MPL \ +- COPYING.GPL \ +- COPYING.LGPL \ ++ COPYING.MPL \ ++ COPYING.GPL \ ++ COPYING.LGPL \ + src/libcmis/makefile.mk \ + doc/cmis-client.xml + +diff --git a/configure.ac b/configure.ac +index b0c94cc..6bfc23c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -45,10 +45,26 @@ AC_PROG_LIBTOOL + AC_LIBTOOL_WIN32_DLL + + # TODO Check for docbook-to-man +-AC_CHECK_PROG(DOCBOOK2X,[docbook-to-man],[docbook2X]) +-if test "x$DOCBOOK2X" = "x"; then +- AC_MSG_ERROR([docbook-to-man is missing. Install docbook2X package.]) +-fi ++# ============= ++# Documentation ++# ============= ++AC_ARG_WITH(man, ++ [AS_HELP_STRING([--without-man], [Do not build manpage])], ++ [with_man="$withval"], ++ [with_man=yes] ++) ++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_MSG_ERROR([docbook-to-man is missing. Install docbook2X package.]) ++ ]) ++ ]) ++], [build_man=no]) ++AC_SUBST(DOCBOOK2X) ++AM_CONDITIONAL([WITH_LIBCMIS_MAN], [test "x$build_man" != "xno"]) + + AC_ARG_ENABLE([werror], + [AS_HELP_STRING([--disable-werror], [Treat all warnings as errors, usefull for development])], +@@ -108,11 +124,12 @@ AC_TYPE_SIZE_T + + # Checks for library functions. + +-AC_CONFIG_FILES([Makefile ++AC_CONFIG_FILES([ ++ Makefile + libcmis.pc + src/Makefile + src/libcmis/Makefile +- doc/Makefile]) ++]) + AC_OUTPUT + + AC_MSG_NOTICE([ +@@ -123,4 +140,5 @@ libcmis $VERSION: + client: ${enable_client} + werror: ${enable_werror} + tests: ${enable_tests} ++ mans: ${build_man} + ]) +diff --git a/doc/Makefile.am b/doc/Makefile.am +deleted file mode 100644 +index f311cca..0000000 +--- a/doc/Makefile.am ++++ /dev/null +@@ -1,4 +0,0 @@ +-cmis-client.1: cmis-client.xml +- docbook-to-man $< +- +-dist_man_MANS = cmis-client.1 +-- +1.7.10.2 + diff --git a/libcmis.spec b/libcmis.spec index 82689c8..0462e24 100644 --- a/libcmis.spec +++ b/libcmis.spec @@ -1,13 +1,17 @@ Name: libcmis -Version: 0.1.0 -Release: 2%{?dist} +Version: 0.2.2 +Release: 1%{?dist} Summary: A C++ client library for the CMIS interface Group: System Environment/Libraries License: GPL+ or LGPLv2+ or MPLv1.1 URL: http://sourceforge.net/projects/libcmis/ Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +# use pre-built man page for now +Patch0: 0001-Create-the-manpage-conditionaly-and-also-install-it-.patch +BuildRequires: autoconf +BuildRequires: automake BuildRequires: boost-devel BuildRequires: libcurl-devel BuildRequires: libxml2-devel @@ -38,10 +42,12 @@ command line. %prep %setup -q +%patch0 -p1 -b .Create-the-manpage-conditionaly-and-also-install-it-.patch %build -%configure --disable-static --disable-tests --disable-werror +autoreconf --install +%configure --disable-static --disable-tests --disable-werror --without-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' \ @@ -52,7 +58,9 @@ make %{?_smp_mflags} V=1 %install make install DESTDIR=%{buildroot} rm -f %{buildroot}/%{_libdir}/*.la - +rm -rf %{buildroot}/%{_mandir}/manx +mkdir %{buildroot}/%{_mandir}/man1 +cp -p doc/cmis-client.1 %{buildroot}/%{_mandir}/man1 %post -p /sbin/ldconfig @@ -68,7 +76,7 @@ rm -f %{buildroot}/%{_libdir}/*.la %files devel %defattr(-,root,root,-) -%{_includedir}/%{name} +%{_includedir}/%{name}-0.2 %{_libdir}/%{name}-0.2.so %{_libdir}/pkgconfig/%{name}-0.2.pc @@ -76,9 +84,13 @@ rm -f %{buildroot}/%{_libdir}/*.la %files tools %defattr(-,root,root,-) %{_bindir}/cmis-client +%{_mandir}/man1/cmis-client.1* %changelog +* Wed Jun 20 2012 David Tardon 0.2.2-1 +- latest upstream version + * Tue Feb 28 2012 Fedora Release Engineering - 0.1.0-2 - Rebuilt for c++ ABI breakage diff --git a/sources b/sources index 538dfea..7051826 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4be634617054ada5b6d1886f63160f4f libcmis-0.1.0.tar.gz +ce31ac7b92cb5e66459f67213bbb6168 libcmis-0.2.2.tar.gz