[packages/libieee1284] add static_libs bcond

atler atler at pld-linux.org
Fri Nov 17 21:43:07 CET 2023


commit 16a296647f80107b54cd5df60d54b581e1cef7a0
Author: Jan Palus <atler at pld-linux.org>
Date:   Fri Nov 17 21:31:49 2023 +0100

    add static_libs bcond

 libieee1284.spec | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/libieee1284.spec b/libieee1284.spec
index afd90bd..cf03c48 100644
--- a/libieee1284.spec
+++ b/libieee1284.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without	static_libs	# static library
+
 Summary:	A library for interfacing IEEE 1284-compatible devices
 Summary(pl.UTF-8):	Biblioteka do komunikacji z urządzeniami kompatybilnymi z IEEE 1284
 Name:		libieee1284
@@ -15,6 +19,7 @@ BuildRequires:	docbook-utils
 BuildRequires:	libtool
 BuildRequires:	python
 BuildRequires:	python-devel
+BuildRequires:	rpmbuild(macros) >= 1.527
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -73,7 +78,8 @@ Wiązanie Pythona dla biblioteki libieee1284.
 %{__autoconf}
 %{__autoheader}
 %{__automake}
-%configure
+%configure \
+	%{__enable_disable static_libs static}
 
 %{__make}
 
@@ -83,7 +89,8 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.{la,a}
+%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.la
+%{?with_static_libs:%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.a}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -108,9 +115,11 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man3/parport.3*
 %{_mandir}/man3/parport_list.3*
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libieee1284.a
+%endif
 
 %files -n python-ieee1284
 %defattr(644,root,root,755)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libieee1284.git/commitdiff/f32d1efda1f93f0151231dad40ef0140201cd038



More information about the pld-cvs-commit mailing list