[packages/sane-backends] add static_libs bcond
atler
atler at pld-linux.org
Fri Nov 17 21:48:48 CET 2023
commit 7119f8efaac0cc35e16415aa2aca6677485c894a
Author: Jan Palus <atler at pld-linux.org>
Date: Fri Nov 17 21:15:01 2023 +0100
add static_libs bcond
sane-backends.spec | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/sane-backends.spec b/sane-backends.spec
index 818d65c..ef6978f 100644
--- a/sane-backends.spec
+++ b/sane-backends.spec
@@ -5,6 +5,7 @@
%bcond_without avahi # Avahi support for saned and net backend
%bcond_with libusb0 # libusb 0.1.x API instead of libusb 1.0
%bcond_without resmgr # without resmgr
+%bcond_without static_libs # static library
#
# requires (ioperm, inb and outb) or portaccess function
@@ -58,7 +59,7 @@ BuildRequires: pkgconfig
BuildRequires: python3
BuildRequires: python3-modules
%{?with_resmgr:BuildRequires: resmgr-devel}
-BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: rpmbuild(macros) >= 1.527
BuildRequires: sed >= 4.0
BuildRequires: systemd-devel
BuildRequires: texlive-dvips
@@ -310,7 +311,7 @@ Sterownik SANE do urządzeń obsługiwanych przez system Video4Linux.
--disable-locking \
--enable-pnm-backend \
--enable-pthread \
- --enable-static \
+ %{__enable_disable static_libs static} \
--with-avahi%{!?with_avahi:=no} \
%{?with_gphoto:--with-gphoto2}
@@ -343,7 +344,7 @@ cp -p tools/mustek600iin-off $RPM_BUILD_ROOT%{_bindir}
%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/sane-backends/{ChangeLogs,canon,gt68xx,leo,matsushita,mustek,mustek_usb,mustek_usb2,niash,plustek,sceptre,teco,u12,umax}
# only shared modules - shut up check-files
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/sane/libsane-*.{so,la,a}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/sane/libsane-*.{so,la%{?with_static_libs:,a}}
%find_lang %{name} --all-name
@@ -637,9 +638,11 @@ fi
%{_aclocaldir}/sane-backends.m4
%{_pkgconfigdir}/sane-backends.pc
+%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libsane.a
+%endif
%files saned
%defattr(644,root,root,755)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/sane-backends.git/commitdiff/b3a628edb0d0c5f44f665aed412c0377780777fd
More information about the pld-cvs-commit
mailing list