[packages/libftdi] add static_libs bcond
atler
atler at pld-linux.org
Thu May 9 22:53:55 CEST 2024
commit 8085a6beaf245c1255e3b5f009cc30182f4f37fe
Author: Jan Palus <atler at pld-linux.org>
Date: Thu May 9 22:47:04 2024 +0200
add static_libs bcond
libftdi.spec | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/libftdi.spec b/libftdi.spec
index 637aeab..09f5051 100644
--- a/libftdi.spec
+++ b/libftdi.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without static_libs # static libraries
+
Summary: Library to talk to FTDI's chips including the popular bitbang mode
Summary(pl.UTF-8): Biblioteka do komunikacji z układami FTDI włącznie z trybem bitbang
Name: libftdi
@@ -15,7 +19,7 @@ BuildRequires: libconfuse-devel
BuildRequires: libusb-compat-devel >= 0.1.0
BuildRequires: python-devel >= 2.0
BuildRequires: swig-python
-BuildRequires: rpmbuild(macros) >= 1.219
+BuildRequires: rpmbuild(macros) >= 1.527
BuildConflicts: libftdi-devel < %{version}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -125,6 +129,7 @@ Wiązanie Pythona do libftdi.
%build
cp -f /usr/share/automake/config.sub .
%configure \
+ %{__enable_disable static_libs static} \
--enable-libftdipp \
--enable-python-binding \
--with-boost-libdir=%{_libdir}
@@ -176,9 +181,11 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/ftdi.h
%{_pkgconfigdir}/libftdi.pc
+%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libftdi.a
+%endif
%files c++
%defattr(644,root,root,755)
@@ -192,9 +199,11 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/ftdi.hpp
%{_pkgconfigdir}/libftdipp.pc
+%if %{with static_libs}
%files c++-static
%defattr(644,root,root,755)
%{_libdir}/libftdipp.a
+%endif
%files -n python-libftdi
%defattr(644,root,root,755)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libftdi.git/commitdiff/422d98eff678de27594f25f64791eccff5f450e2
More information about the pld-cvs-commit
mailing list