[packages/opus] add static_libs bcond

atler atler at pld-linux.org
Mon Mar 4 17:15:47 CET 2024


commit 51e939c3590b79b850934cff2f209f1a21d9cfcf
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Mar 4 17:15:14 2024 +0100

    add static_libs bcond

 opus.spec | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/opus.spec b/opus.spec
index 577296c..0832da7 100644
--- a/opus.spec
+++ b/opus.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without	static_libs	# static library
+
 Summary:	IETF Opus Interactive Audio Codec
 Summary(pl.UTF-8):	Opus - interaktywny kodek dźwięku wg projektu IETF
 Name:		opus
@@ -13,6 +17,7 @@ BuildRequires:	automake >= 1.6
 BuildRequires:	doxygen
 BuildRequires:	libtool
 BuildRequires:	rpm-build >= 4.6
+BuildRequires:	rpmbuild(macros) >= 1.527
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -73,7 +78,8 @@ Dokumentacja API biblioteki OPUS.
 %{__automake}
 %configure \
 	--enable-custom-modes \
-	--disable-silent-rules
+	--disable-silent-rules \
+	%{__enable_disable static_libs static}
 %{__make}
 
 %install
@@ -106,9 +112,11 @@ rm -rf $RPM_BUILD_ROOT
 %{_aclocaldir}/opus.m4
 %{_mandir}/man3/opus_*.3*
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libopus.a
+%endif
 
 %files apidocs
 %defattr(644,root,root,755)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/opus.git/commitdiff/51e939c3590b79b850934cff2f209f1a21d9cfcf



More information about the pld-cvs-commit mailing list