+#
+# Conditional build:
+%bcond_without static_libs # static library
+
Summary: Utilities and test programs for the Linux sg version 3 device driver
Summary(pl.UTF-8): Programy narzędziowe i testowe dla linuksowego sterownika sg w wersji 3
Name: sg3_utils
-Version: 1.47
+Version: 1.48
Release: 1
License: GPL v2 (utilities), BSD (library)
Group: Applications/System
Source0: http://sg.danny.cz/sg/p/%{name}-%{version}.tar.xz
-# Source0-md5: c9e95d3b0e106514aefaae17f58a30f9
+# Source0-md5: 0024393d2d2942cc081ce613d98db68a
+Patch0: %{name}-rescan-scsi-bus.sh.patch
URL: http://sg.danny.cz/sg/sg3_utils.html
+BuildRequires: rpmbuild(macros) >= 1.527
BuildRequires: tar >= 1:1.22
BuildRequires: xz
# see scripts/rescan-scsi-bus.sh /Id:
Provides: rescan-scsi-bus = 1.57
Provides: sg_utils
Obsoletes: rescan-scsi-bus < 1.57
-Obsoletes: scsiutils
-Obsoletes: sg_utils
+Obsoletes: scsiutils < 1.8
+Obsoletes: sg_utils < 1.03
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%undefine __cxx
cp -p scripts/README README.scripts
%build
-%configure
+%configure \
+ %{__enable_disable static_libs static}
%{__make}
%install
%{_mandir}/man8/rescan-scsi-bus.sh.8*
%{_mandir}/man8/scsi_*.8*
%{_mandir}/man8/sg3_utils.8*
+%{_mandir}/man8/sg3_utils_json.8*
%{_mandir}/man8/sg_*.8*
%{_mandir}/man8/sginfo.8*
%{_mandir}/man8/sgm_dd.8*
%attr(755,root,root) %{_libdir}/libsgutils2.so
%{_includedir}/scsi/sg_*.h
+%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libsgutils2.a
+%endif
%files udev
%defattr(644,root,root,755)
+/lib/udev/rules.d/00-scsi-sg3_config.rules
/lib/udev/rules.d/40-usb-blacklist.rules
/lib/udev/rules.d/54-before-scsi-sg3_id.rules
/lib/udev/rules.d/55-scsi-sg3_id.rules