[packages/wpebackend-fdo] - build apidocs

qboosh qboosh at pld-linux.org
Mon Aug 16 21:44:37 CEST 2021


commit 0041e46699909f43e57ed23decace422155e9412
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Aug 16 21:48:53 2021 +0200

    - build apidocs

 wpebackend-fdo.spec | 28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)
---
diff --git a/wpebackend-fdo.spec b/wpebackend-fdo.spec
index 01cf77d..7172d49 100644
--- a/wpebackend-fdo.spec
+++ b/wpebackend-fdo.spec
@@ -1,4 +1,7 @@
-# TODO: apidocs (BR: hotdoc, like libwpe.spec)
+#
+# Conditional build:
+%bcond_without	apidocs	# API documentation
+
 Summary:	A WPE backend designed for Linux desktop systems
 Summary(pl.UTF-8):	Backend WPE zaprojektowany dla biurkowych systemów linuksowych
 Name:		wpebackend-fdo
@@ -11,12 +14,14 @@ Source0:	https://wpewebkit.org/releases/%{name}-%{version}.tar.xz
 URL:		https://wpewebkit.org/
 BuildRequires:	EGL-devel
 BuildRequires:	glib2-devel >= 2.0
+%{?with_apidocs:BuildRequires:	hotdoc}
 BuildRequires:	libepoxy-devel
 BuildRequires:	libstdc++-devel >= 6:4.7
 BuildRequires:	libwpe-devel >= 1.10.0
 BuildRequires:	meson >= 0.49
 BuildRequires:	ninja >= 1.5
 BuildRequires:	pkgconfig
+BuildRequires:	rpm-build >= 4.6
 BuildRequires:	rpmbuild(macros) >= 1.736
 BuildRequires:	wayland-devel >= 1.10
 BuildRequires:	wayland-egl-devel >= 1.10
@@ -42,11 +47,24 @@ Header files for WPEBackend-fdo library.
 %description devel -l pl.UTF-8
 Pliki nagłówkowe biblioteki WPEBackend-fdo.
 
+%package apidocs
+Summary:	API documentation for WPEBackend-fdo library
+Summary(pl.UTF-8):	Dokumentacja API biblioteki WPEBackend-fdo
+Group:		Documentation
+BuildArch:	noarch
+
+%description apidocs
+API documentation for WPEBackend-fdo library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki WPEBackend-fdo.
+
 %prep
 %setup -q
 
 %build
-%meson build
+%meson build \
+	%{?with_apidocs:-Dbuild_docs=true}
 
 %ninja_build -C build
 
@@ -72,3 +90,9 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/libWPEBackend-fdo-1.0.so
 %{_includedir}/wpe-fdo-1.0
 %{_pkgconfigdir}/wpebackend-fdo-1.0.pc
+
+%if %{with apidocs}
+%files apidocs
+%defattr(644,root,root,755)
+%{_docdir}/WPEBackend-fdo
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/wpebackend-fdo.git/commitdiff/0041e46699909f43e57ed23decace422155e9412



More information about the pld-cvs-commit mailing list