[packages/rrdtool] add static_libs bcond

atler atler at pld-linux.org
Mon Nov 20 04:04:02 CET 2023


commit 8f1ee4db3e4ad6e8b32c85970e73478067c43375
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Nov 20 02:15:02 2023 +0100

    add static_libs bcond

 rrdtool.spec | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/rrdtool.spec b/rrdtool.spec
index b444596..f49ff26 100644
--- a/rrdtool.spec
+++ b/rrdtool.spec
@@ -10,6 +10,7 @@
 %bcond_without	ceph		# Ceph (RADOS) storage support
 %bcond_without	rrd_graph	# all rrd_graph functions (depend on cairo+pango)
 %bcond_without	rrdcgi		# building of rrdcgi (depends on rrd_graph)
+%bcond_without	static_libs	# static library
 
 %if %{without rrd_graph}
 %undefine	with_rrdcgi
@@ -336,6 +337,7 @@ install -d perl-docs/html
 %configure \
 	PYTHON=%{__python3} \
 	--disable-silent-rules \
+	%{__enable_disable static_libs static} \
 	%{!?with_ceph:--disable-librados} \
 	%{!?with_rrd_graph:--disable-rrd_graph} \
 	%{!?with_rrdcgi:--disable-rrdcgi} \
@@ -366,7 +368,8 @@ install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}
 
 %if %{with lua}
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/lua/5.*/*.{la,a}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/lua/5.*/*.la
+%{?with_static_libs:%{__rm} $RPM_BUILD_ROOT%{_libdir}/lua/5.*/*.a}
 %endif
 
 %if %{with perl}
@@ -430,9 +433,11 @@ rm -rf $RPM_BUILD_ROOT
 %{_pkgconfigdir}/librrd.pc
 %{_mandir}/man3/librrd.3*
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/librrd.a
+%endif
 
 %files doc
 %defattr(644,root,root,755)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rrdtool.git/commitdiff/8f1ee4db3e4ad6e8b32c85970e73478067c43375



More information about the pld-cvs-commit mailing list