]> git.pld-linux.org Git - packages/ots.git/commitdiff
- replaced gtkdoc patch by some fixes, build gtk-doc documentation auto/th/ots-0.5.0-2
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 15 May 2016 15:57:26 +0000 (17:57 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 15 May 2016 15:57:26 +0000 (17:57 +0200)
- more verbose files, drop .la file
- release 2

gtkdoc.patch
ots.spec

index 03f3d3b1e08c7615a7c4a40d67743427dcf990a4..66b6a1fde6d59038e60cdfccea3c09d51839dc02 100644 (file)
@@ -1,8 +1,54 @@
---- ots-0.5.0/doc/Makefile.am.orig     2007-04-08 18:21:30.000000000 +0200
-+++ ots-0.5.0/doc/Makefile.am  2014-01-15 18:26:28.297013384 +0100
-@@ -41,4 +41,4 @@ GTKDOC_CFLAGS = -I$(top_srcdir)
- GTKDOC_LIBS =
+--- ots-0.5.0/configure.in.orig        2007-04-08 20:12:42.000000000 +0200
++++ ots-0.5.0/configure.in     2016-05-15 16:13:58.673148022 +0200
+@@ -129,27 +129,8 @@
  
+ AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
  
--include $(top_srcdir)/gtk-doc.make
-+#include $(datadir)/gtk-doc/data/gtk-doc.make
+-gtk_doc_min_version=0.9
+ if $GTKDOC ; then 
+-    gtk_doc_version=`gtkdoc-mkdb --version`
+-    AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
+-
+-    IFS="${IFS=       }"; gtk_save_IFS="$IFS"; IFS="."
+-    set $gtk_doc_version
+-    for min in $gtk_doc_min_version ; do
+-        cur=$1; shift
+-        if test -z $min ; then break; fi
+-        if test -z $cur ; then GTKDOC=false; break; fi
+-        if test $cur -gt $min ; then break ; fi
+-        if test $cur -lt $min ; then GTKDOC=false; break ; fi
+-    done
+-    IFS="$gtk_save_IFS"
+-
+-    if $GTKDOC ; then
+-      AC_MSG_RESULT(yes)
+-   else
+-      AC_MSG_RESULT(no)
+-   fi
++GTK_DOC_CHECK([0.9])
+ fi
+ AC_CHECK_PROG(DB2HTML, db2html, true, false)
+--- ots-0.5.0/doc/ots-docs.sgml.orig   2007-04-08 18:15:32.000000000 +0200
++++ ots-0.5.0/doc/ots-docs.sgml        2016-05-15 17:35:07.602943704 +0200
+@@ -1,11 +1,13 @@
+-<!doctype book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
+-      <!notation PNG system "PNG">
+-      <!entity % local.notation.class "| PNG">
++<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.1.2//EN"
++ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
++[
++      <!NOTATION PNG SYSTEM "PNG">
++      <!ENTITY % local.notation.class "| PNG">
+-      <!entity hash "#">
+-      <!entity percent "%">
+-      <!entity ObjectIndex    SYSTEM "sgml/object_index.sgml">
+-      <!entity TreeIndex      SYSTEM "sgml/tree_index.sgml">
++      <!ENTITY hash "#">
++      <!-- !ENTITY percent "%" -->
++      <!ENTITY ObjectIndex    SYSTEM "sgml/object_index.sgml">
++      <!ENTITY TreeIndex      SYSTEM "sgml/tree_index.sgml">
+ ]>
+ <book id="index">
index 4ef7ef0a9e29284df9fc72280fd7a02831e8242f..8264e82735baade886bc550705e2419726b0a7ca 100644 (file)
--- a/ots.spec
+++ b/ots.spec
@@ -1,9 +1,14 @@
+#
+# Conditional build:
+%bcond_without apidocs         # gtk-doc API documentation
+%bcond_without static_libs     # static library
+#
 Summary:       Open Text Summarizer
 Summary(pl.UTF-8):     Otwarte narzędzie do streszczania tekstu
 Name:          ots
 Version:       0.5.0
-Release:       1
-License:       GPL
+Release:       2
+License:       GPL v2+
 Group:         Libraries
 Source0:       http://downloads.sourceforge.net/libots/%{name}-%{version}.tar.gz
 # Source0-md5: 1e140a4bf9d720b4339a5c2bdf4976e8
@@ -49,7 +54,6 @@ Summary(pl.UTF-8):    Pliki nagłówkowe biblioteki ots
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 Requires:      glib2-devel >= 1:2.12.0
-Requires:      gtk-doc-common
 Requires:      libxml2-devel >= 1:2.6.26
 
 %description devel
@@ -70,20 +74,34 @@ Static ots library.
 %description static -l pl.UTF-8
 Statyczna biblioteka ots.
 
+%package apidocs
+Summary:       API documentation for ots library
+Summary(pl.UTF-8):     Dokumentacja API biblioteki ots
+Group:         Documentation
+Requires:      gtk-doc-common
+Conflicts:     ots-devel < 0.5.0-2
+
+%description apidocs
+API documentation for ots library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki ots.
+
 %prep
 %setup -q
 %patch0 -p1
 %patch1 -p1
 
 %build
+%{__gtkdocize}
 %{__libtoolize}
 %{__aclocal}
 %{__autoconf}
 %{__autoheader}
 %{__automake}
-# documentation build fails
 %configure \
-       --disable-gtk-doc \
+       %{?with_apidocs:--enable-gtk-doc} \
+       %{!?with_static_libs:--disable-static} \
        --with-html-dir=%{_gtkdocdir}/libots
 
 %{__make} -j1
@@ -94,6 +112,9 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libots-1.la
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -104,19 +125,24 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog NEWS README TODO
 %attr(755,root,root) %{_bindir}/ots
-%attr(755,root,root) %{_libdir}/lib*.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/lib*.so.0
+%attr(755,root,root) %{_libdir}/libots-1.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libots-1.so.0
 %{_datadir}/%{name}
-#%{_mandir}/man1/ots.1*
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/lib*.so
-%{_libdir}/lib*.la
-%{_includedir}/libots*
-%{_pkgconfigdir}/*.pc
-#%{_gtkdocdir}/libots
+%attr(755,root,root) %{_libdir}/libots-1.so
+%{_includedir}/libots-1
+%{_pkgconfigdir}/libots-1.pc
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
-%{_libdir}/lib*.a
+%{_libdir}/libots-1.a
+%endif
+
+%if %{with apidocs}
+%files apidocs
+%defattr(644,root,root,755)
+%{_gtkdocdir}/libots
+%endif
This page took 0.074984 seconds and 4 git commands to generate.