[packages/i2c-tools] add static_libs bcond
atler
atler at pld-linux.org
Sun Oct 13 13:47:51 CEST 2024
commit e283e11bdb0e1fa84dab1b007de8653079107f9c
Author: Jan Palus <atler at pld-linux.org>
Date: Sun Oct 13 12:50:55 2024 +0200
add static_libs bcond
i2c-tools.spec | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/i2c-tools.spec b/i2c-tools.spec
index 2eb3431..a4fbfce 100644
--- a/i2c-tools.spec
+++ b/i2c-tools.spec
@@ -1,8 +1,9 @@
#
# Conditional build:
-%bcond_without python # (any) Python smbus module
-%bcond_without python2 # CPython 2.x smbus module
-%bcond_without python3 # CPython 3.x smbus module
+%bcond_without python # (any) Python smbus module
+%bcond_without python2 # CPython 2.x smbus module
+%bcond_without python3 # CPython 3.x smbus module
+%bcond_without static_libs # static library
#
Summary: I2C tools for Linux
Summary(en.UTF-8): I²C tools for Linux
@@ -109,7 +110,8 @@ poprzez i2c-dev.
%{__make} -j1 \
CC="%{__cc}" \
CFLAGS="%{rpmcflags}" \
- EXTRA="eeprog"
+ EXTRA="eeprog" \
+ BUILD_STATIC_LIB=%{?with_static_libs:1}%{!?with_static_libs:0}
%if %{with python}
cd py-smbus
@@ -128,7 +130,8 @@ rm -rf $RPM_BUILD_ROOT
DESTDIR=$RPM_BUILD_ROOT \
EXTRA="eeprog" \
PREFIX=%{_prefix} \
- libdir=%{_libdir}
+ libdir=%{_libdir} \
+ BUILD_STATIC_LIB=%{?with_static_libs:1}%{!?with_static_libs:0}
%if %{with python}
cd py-smbus
@@ -182,9 +185,11 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/i2c/smbus.h
%{_mandir}/man3/libi2c.3*
+%if %{with static_libs}
%files -n libi2c-static
%defattr(644,root,root,755)
%{_libdir}/libi2c.a
+%endif
%if %{with python2}
%files -n python-smbus
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/i2c-tools.git/commitdiff/61a72159e913ce624790632c00fc5c50444369e0
More information about the pld-cvs-commit
mailing list