[packages/mdds] - updated to 1.0.0 (now with versioned API, currently 1.0) - added doc patch, build apidocs

qboosh qboosh at pld-linux.org
Sun Nov 29 16:21:46 CET 2015


commit 17e8410641c03992a4c3a8245a9eab28ec920a3d
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Nov 29 16:22:25 2015 +0100

    - updated to 1.0.0 (now with versioned API, currently 1.0)
    - added doc patch, build apidocs

 mdds-doc.patch | 11 +++++++++++
 mdds.spec      | 57 ++++++++++++++++++++++++++++++++++++++++++++-------------
 2 files changed, 55 insertions(+), 13 deletions(-)
---
diff --git a/mdds.spec b/mdds.spec
index 265b7ff..1d34b93 100644
--- a/mdds.spec
+++ b/mdds.spec
@@ -1,18 +1,29 @@
+#
+# Conditional build:
+%bcond_without	apidocs	# doxygen/sphinx+breathe API documentation
+#
 Summary:	A collection of multi-dimensional data structures and indexing algorithms
 Summary(pl.UTF-8):	Zbiór struktur danych wielowymiarowych oraz algorytmów indeksujących
 Name:		mdds
-Version:	0.12.1
+Version:	1.0.0
 Release:	1
 License:	MIT
 Group:		Development/Libraries
 #Source0Download: https://gitlab.com/mdds/mdds
 Source0:	http://kohei.us/files/mdds/src/%{name}_%{version}.tar.bz2
-# Source0-md5:	ef2560ed5416652a7fe195305b14cebe
+# Source0-md5:	74e0a81c5af4137285fe6a52217f71e4
+Patch0:		%{name}-doc.patch
 URL:		https://gitlab.com/mdds/mdds
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	boost-devel >= 1.39
+BuildRequires:	libstdc++-devel >= 6:4.7
 BuildRequires:	rpmbuild(macros) >= 1.446
 BuildRequires:	sed >= 4.0
+%if %{with apidocs}
+BuildRequires:	doxygen
+BuildRequires:	python-sphinx_bootstrap_theme
+BuildRequires:	sphinx-pdg
+%endif
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -41,6 +52,7 @@ Summary:	A collection of multi-dimensional data structures and indexing algorith
 Summary(pl.UTF-8):	Zbiór struktur danych wielowymiarowych oraz algorytmów indeksujących
 Group:		Development/Libraries
 Requires:	boost-devel >= 1.39
+Requires:	libstdc++-devel >= 6:4.7
 
 %description devel
 A collection of multi-dimensional data structures and indexing
@@ -62,30 +74,49 @@ Zaimplementowane są następujące struktury danych:
 - drzewo czwórkowe (quadtree) dla punktów
 - macierz mieszana
 
+%package apidocs
+Summary:	API documentation for MDDS
+Summary(pl.UTF-8):	Dokumentacja API biblioteki MDDS
+Group:		Documentation
+
+%description apidocs
+API documentation for MDDS.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki MDDS.
+
 %prep
 %setup -q -n %{name}_%{version}
+%patch0 -p1
 
 # this is only used in tests
-sed -i -e '/^CPPFLAGS_NODEBUG/s/-Wall -Os -g/%{rpmcflags} -Wall/' configure.ac
+sed -i -e '/^CPPFLAGS=/s/-Os -g /%{rpmcflags} /' configure.ac
 
 %build
 %{__autoconf}
-# we can switch from boost to c++0x (the default) if sufficiently new C++11 compliant g++ is enforced
-%configure \
-	--with-hash-container=boost
-%{__make}
+%configure
+
+%{__make} all %{?with_apidocs:build-doc} \
+	CXX="%{__cxx}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_includedir}/mdds
-cp -a include/mdds/* $RPM_BUILD_ROOT%{_includedir}/mdds
-install -Dp misc/mdds.pc $RPM_BUILD_ROOT%{_npkgconfigdir}/mdds.pc
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+# packaged as %doc
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mdds-1.0
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files devel
 %defattr(644,root,root,755)
-%doc AUTHORS COPYING NEWS README
-%{_includedir}/mdds
-%{_npkgconfigdir}/mdds.pc
+%doc AUTHORS CHANGELOG LICENSE README.md
+%{_includedir}/mdds-1.0
+%{_npkgconfigdir}/mdds-1.0.pc
+
+%files apidocs
+%defattr(644,root,root,755)
+%doc doc/html doc/_build/{_static,*.html,*.js}
diff --git a/mdds-doc.patch b/mdds-doc.patch
new file mode 100644
index 0000000..f2f8a38
--- /dev/null
+++ b/mdds-doc.patch
@@ -0,0 +1,11 @@
+--- mdds_1.0.0/Makefile.in.orig	2015-10-07 00:57:07.000000000 +0200
++++ mdds_1.0.0/Makefile.in	2015-11-29 15:52:19.781596214 +0100
+@@ -237,7 +237,7 @@
+ 
+ build-doc-sphinx:
+ 	@echo "Building documentation by sphinx..."
+-	@sphinx-build -b html ./doc/ ./doc/_build
++	cd doc && sphinx-build -b html ./ ./_build
+ 
+ build-doc: build-doc-doxygen build-doc-sphinx
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mdds.git/commitdiff/17e8410641c03992a4c3a8245a9eab28ec920a3d



More information about the pld-cvs-commit mailing list