[packages/leptonlib] add static_libs bcond

atler atler at pld-linux.org
Thu Feb 29 11:03:23 CET 2024


commit 3766ebd024a1e2b6ffd30a71e21e66efeb75998c
Author: Jan Palus <atler at pld-linux.org>
Date:   Thu Feb 29 09:53:01 2024 +0100

    add static_libs bcond

 leptonlib.spec | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/leptonlib.spec b/leptonlib.spec
index 7fbd4ce..aca6e06 100644
--- a/leptonlib.spec
+++ b/leptonlib.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without	static_libs	# static library
+
 Summary:	Leptonica - image processing and analysis library
 Summary(pl.UTF-8):	Leptonica - biblioteka do przetwarzania i analizy obrazu
 Name:		leptonlib
@@ -19,6 +23,7 @@ BuildRequires:	libtool >= 2:2
 BuildRequires:	libwebp-devel >= 0.5.0
 BuildRequires:	openjpeg2-devel >= 2.1.0
 BuildRequires:	pkgconfig
+BuildRequires:	rpmbuild(macros) >= 1.527
 BuildRequires:	zlib-devel
 Requires:	giflib >= 5.1.3
 Requires:	libwebp >= 0.5.0
@@ -75,7 +80,8 @@ Statyczna biblioteka lepton.
 # and they have too generic names
 %configure \
 	--disable-programs \
-	--disable-silent-rules
+	--disable-silent-rules \
+	%{__enable_disable static_libs static}
 
 %{__make}
 
@@ -106,6 +112,8 @@ rm -rf $RPM_BUILD_ROOT
 %{_pkgconfigdir}/lept.pc
 %{_libdir}/cmake/LeptonicaConfig*.cmake
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libleptonica.a
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/leptonlib.git/commitdiff/3766ebd024a1e2b6ffd30a71e21e66efeb75998c



More information about the pld-cvs-commit mailing list