[packages/libbsd] add static_libs bcond

atler atler at pld-linux.org
Mon Jan 15 13:56:56 CET 2024


commit b327204bda54e2814bb1e9662f4eb6fad49d4c76
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Jan 15 13:04:12 2024 +0100

    add static_libs bcond

 libbsd.spec | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/libbsd.spec b/libbsd.spec
index 4c33138..e3aa1b3 100644
--- a/libbsd.spec
+++ b/libbsd.spec
@@ -1,5 +1,9 @@
 # TODO
 # - take French bitstring.3 from fcron?
+#
+# Conditional build:
+%bcond_without	static_libs	# static library
+
 Summary:	Utility functions from BSD systems
 Summary(pl.UTF-8):	Funkcje narzędziowe z systemów BSD
 Name:		libbsd
@@ -11,6 +15,7 @@ Source0:	https://libbsd.freedesktop.org/releases/%{name}-%{version}.tar.xz
 # Source0-md5:	244d8a25164a85e7799f6f1cfcb620f1
 URL:		https://libbsd.freedesktop.org/
 BuildRequires:	libmd-devel >= 1.0
+BuildRequires:	rpmbuild(macros) >= 1.527
 BuildRequires:	sed >= 4.0
 BuildRequires:	tar >= 1:1.22
 BuildRequires:	xz
@@ -62,7 +67,8 @@ Statyczna biblioteka BSD.
 %build
 CPPFLAGS="%{rpmcppflags} -I/usr/include/libmd"
 %configure \
-	--disable-silent-rules
+	--disable-silent-rules \
+	%{__enable_disable static_libs static}
 %{__make}
 
 %install
@@ -207,6 +213,8 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man3/wcslcpy.3bsd*
 %{_mandir}/man7/libbsd.7*
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libbsd.a
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libbsd.git/commitdiff/b327204bda54e2814bb1e9662f4eb6fad49d4c76



More information about the pld-cvs-commit mailing list