]> TLD Linux GIT Repositories - packages/sg3_utils.git/blobdiff - sg3_utils.spec
- missing patch
[packages/sg3_utils.git] / sg3_utils.spec
index 61f9a6a3336d070c13579db59cd9a69918a10bef..8f8d1406c845fad8f66d8c59a5d1dab837e3e700 100644 (file)
@@ -1,21 +1,27 @@
+#
+# 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.45
+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: 3a1ba25fe7b43577de4a5c1edb018526
+# 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
@@ -75,7 +81,8 @@ Reguły udev dla sg3_utils
 cp -p scripts/README README.scripts
 
 %build
-%configure
+%configure \
+       %{__enable_disable static_libs static}
 %{__make}
 
 %install
@@ -112,6 +119,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_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*
@@ -122,12 +130,15 @@ rm -rf $RPM_BUILD_ROOT
 %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