[packages/libnl] add static_libs bcond
atler
atler at pld-linux.org
Tue May 19 20:50:18 CEST 2026
commit 881ef8f24fe966acac78284c84bec40d0d303318
Author: Jan Palus <atler at pld-linux.org>
Date: Tue May 19 20:23:15 2026 +0200
add static_libs bcond
libnl.spec | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/libnl.spec b/libnl.spec
index cc305ac..d9fdb9a 100644
--- a/libnl.spec
+++ b/libnl.spec
@@ -4,6 +4,7 @@
%bcond_without python # Python netlink module (any)
%bcond_without python2 # CPython 2.x netlink module
%bcond_without python3 # CPython 3.x netlink module
+%bcond_without static_libs # static libraries
%bcond_without tests # unit tests
%bcond_with net_tests # unit tests using unshare for net ns
@@ -136,7 +137,8 @@ Interfejs Pythona 3 do protokołów netlink.
%{__automake}
%configure \
%{!?with_apidocs:--disable-doc} \
- --disable-silent-rules
+ --disable-silent-rules \
+ %{__enable_disable static_libs static}
%{__make}
@@ -178,7 +180,8 @@ cd python
%endif
# dynamic modules
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/libnl/cli/*/*.{la,a}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libnl/cli/*/*.la
+%{?with_static_libs:%{__rm} $RPM_BUILD_ROOT%{_libdir}/libnl/cli/*/*.,a}
# obsoleted by pkg-config
%{__rm} $RPM_BUILD_ROOT%{_libdir}/libnl*.la
@@ -261,6 +264,7 @@ rm -rf $RPM_BUILD_ROOT
%{_pkgconfigdir}/libnl-route-3.0.pc
%{_pkgconfigdir}/libnl-xfrm-3.0.pc
+%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libnl-3.a
@@ -270,6 +274,7 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libnl-nf-3.a
%{_libdir}/libnl-route-3.a
%{_libdir}/libnl-xfrm-3.a
+%endif
%if %{with apidocs}
%files apidocs
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libnl.git/commitdiff/77f647951c470a12761d6b44f025d779e2a180c5
More information about the pld-cvs-commit
mailing list