[packages/fish] add bcond for docs
atler
atler at pld-linux.org
Sat Oct 25 16:04:56 CEST 2025
commit 62df96473e8e3d7fbb53be4caac06cd73b8c1d91
Author: Jan Palus <atler at pld-linux.org>
Date: Sat Oct 25 15:06:10 2025 +0200
add bcond for docs
fish.spec | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/fish.spec b/fish.spec
index e845366..308e838 100644
--- a/fish.spec
+++ b/fish.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without doc # build documentation
+
Summary: fish - A friendly interactive shell
Summary(pl.UTF-8): fish - przyjazna interaktywna powłoka
Name: fish
@@ -18,7 +22,7 @@ BuildRequires: pcre2-32-devel >= 10.21
BuildRequires: rpm-build >= 4.6
BuildRequires: rpmbuild(macros) >= 2.050
BuildRequires: rust
-BuildRequires: sphinx-pdg
+%{?with_doc:BuildRequires: sphinx-pdg}
BuildRequires: tar >= 1:1.22
BuildRequires: terminfo
BuildRequires: xz
@@ -78,7 +82,8 @@ Dokumentacja dla fish.
-DRust_CARGO:PATH="%{__cargo}" \
-DRust_CARGO_TARGET="%{rust_target}" \
-DCARGO_FLAGS:LIST="%(printf '%s' '%__cargo_common_opts --release' | tr '[[:space:]]' ';')" \
- -DFISH_USE_SYSTEM_PCRE2:BOOL=ON
+ -DFISH_USE_SYSTEM_PCRE2:BOOL=ON \
+ -DBUILD_DOCS:BOOL=%{__ON_OFF doc}
%{__make} -C build
@@ -155,6 +160,8 @@ end
%defattr(644,root,root,755)
%{_npkgconfigdir}/fish.pc
+%if %{with doc}
%files doc
%defattr(644,root,root,755)
%doc build/user_doc/html/{*.html,*.js,cmds,_static}
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/fish.git/commitdiff/62df96473e8e3d7fbb53be4caac06cd73b8c1d91
More information about the pld-cvs-commit
mailing list