[packages/raft] Add apidocs and tests
arekm
arekm at pld-linux.org
Sat Sep 12 23:51:42 CEST 2026
commit d7d392bb94f224c1f6eb226c235e6efdce080c52
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sat Sep 12 23:51:31 2026 +0200
Add apidocs and tests
raft.spec | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
---
diff --git a/raft.spec b/raft.spec
index 30fa849..44a47a3 100644
--- a/raft.spec
+++ b/raft.spec
@@ -1,3 +1,8 @@
+#
+# Conditional build:
+%bcond_without apidocs # Sphinx based API documentation
+%bcond_without tests # unit tests
+#
Summary: Raft consensus protocol library
Summary(pl.UTF-8): Biblioteka protokołu consensusu Raft
Name: raft
@@ -16,6 +21,10 @@ BuildRequires: libuv-devel >= 1.18.0
BuildRequires: lz4-devel >= 1:1.7.1
BuildRequires: pkgconfig
BuildRequires: rpmbuild(macros) >= 1.752
+%if %{with apidocs}
+BuildRequires: python3-furo
+BuildRequires: sphinx-pdg-3
+%endif
Requires: libuv >= 1.18.0
Requires: lz4-libs >= 1:1.7.1
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -84,10 +93,20 @@ Dokumentacja API biblioteki Raft.
%{__autoconf}
%{__automake}
%configure \
- --disable-silent-rules
+ --disable-silent-rules \
+ --enable-uv \
+ --with-lz4
%{__make}
+%if %{with tests}
+%{__make} check
+%endif
+
+%if %{with apidocs}
+sphinx-build-3 -b html docs docs/build
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
@@ -119,3 +138,9 @@ rm -rf $RPM_BUILD_ROOT
%files static
%defattr(644,root,root,755)
%{_libdir}/libraft.a
+
+%if %{with apidocs}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/build/{_static,*.html,*.js}
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/raft.git/commitdiff/d7d392bb94f224c1f6eb226c235e6efdce080c52
More information about the pld-cvs-commit
mailing list