1# 2# spec file for package sg3_utils 3# 4# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. 5# 6# All modifications and additions to the file contributed by third parties 7# remain the property of their copyright owners, unless otherwise agreed 8# upon. The license for this file, and modifications and additions to the 9# file, is the same license as for the pristine package itself (unless the 10# license for the pristine package is not an Open Source License, in which 11# case the license is the MIT License). An "Open Source License" is a 12# license that conforms to the Open Source Definition (Version 1.9) 13# published by the Open Source Initiative. 14 15# Please submit bugfixes or comments via http://bugs.opensuse.org/ 16# 17# 18# No patches, this is the maintainer's version for Suse targets. 19# Patch lines would appear after the "Source:" line and look like: 20# Patch1: sg3_utils-1.38r546.patch 21# then under the "%setup -q" line there would be one or more lines: 22# %patch1 -p1 23 24 25Name: sg3_utils 26%define lname libsgutils2-2 27Version: 1.41 28Release: 0 29Summary: A collection of tools that send SCSI commands to devices 30License: GPL-2.0+ and BSD-3-Clause 31Group: Hardware/Other 32Url: https://sg.danny.cz/sg/sg3_utils.html 33 34Source: https://sg.danny.cz/sg/p/%name-%{version}.tar.xz 35BuildRoot: %{_tmppath}/%{name}-%{version}-build 36BuildRequires: xz 37Requires(pre): %insserv_prereq 38Provides: scsi 39Provides: sg_utils 40Obsoletes: scsi <= 1.7_2.38_1.25_0.19_1.02_0.93 41 42%description 43The sg3_utils package contains utilities that send SCSI commands to 44devices. As well as devices on transports traditionally associated with 45SCSI (e.g. Fibre Channel (FCP), Serial Attached SCSI (SAS) and the SCSI 46Parallel Interface(SPI)) many other devices use SCSI command sets. 47ATAPI cd/dvd drives and SATA disks that connect via a translation layer 48or a bridge device are examples of devices that use SCSI command sets. 49 50%package -n %lname 51Summary: Library to hold functions common to the SCSI utilities 52License: BSD-3-Clause 53Group: System/Libraries 54 55%description -n %lname 56The sg3_utils package contains utilities that send SCSI commands to 57devices. As well as devices on transports traditionally associated with 58SCSI (e.g. Fibre Channel (FCP), Serial Attached SCSI (SAS) and the SCSI 59Parallel Interface(SPI)) many other devices use SCSI command sets. 60ATAPI cd/dvd drives and SATA disks that connect via a translation layer 61or a bridge device are examples of devices that use SCSI command sets. 62 63This subpackage contains the library of common sg_utils code, such as 64SCSI error processing. 65 66%package -n libsgutils-devel 67Summary: A collection of tools that send SCSI commands to devices 68License: BSD-3-Clause 69Group: Development/Libraries/C and C++ 70Requires: %lname = %version 71# Added for 13.1 72Obsoletes: %name-devel < %version-%release 73Provides: %name-devel = %version-%release 74 75%description -n libsgutils-devel 76The sg3_utils package contains utilities that send SCSI commands to 77devices. As well as devices on transports traditionally associated with 78SCSI (e.g. Fibre Channel (FCP), Serial Attached SCSI (SAS) and the SCSI 79Parallel Interface(SPI)) many other devices use SCSI command sets. 80ATAPI cd/dvd drives and SATA disks that connect via a translation layer 81or a bridge device are examples of devices that use SCSI command sets. 82 83This subpackage contains libraries and header files for developing 84applications that want to make use of libsgutils. 85 86%prep 87%setup -q 88 89%build 90%configure --disable-static --with-pic 91make %{?_smp_mflags} 92 93%install 94make install DESTDIR="%buildroot" 95install -m 755 scripts/scsi_logging_level $RPM_BUILD_ROOT%{_bindir} 96install -m 755 scripts/rescan-scsi-bus.sh $RPM_BUILD_ROOT%{_bindir} 97%{__rm} -f %{buildroot}%{_libdir}/*.la 98 99%post -p /sbin/ldconfig -n %lname 100 101%postun -p /sbin/ldconfig -n %lname 102 103%files 104%defattr(-,root,root) 105%doc README README.sg_start 106%doc ChangeLog CREDITS NEWS 107%_bindir/sg_* 108%_bindir/scsi_* 109%_bindir/sginfo 110%_bindir/sgp_dd 111%_bindir/sgm_dd 112%_bindir/scsi_logging_level 113%_bindir/rescan-scsi-bus.sh 114%_mandir/man8/*.8* 115 116%files -n %lname 117%defattr(-,root,root) 118%_libdir/libsgutils2.so.2* 119 120%files -n libsgutils-devel 121%defattr(-,root,root) 122%_libdir/libsgutils2.so 123%_includedir/scsi/ 124 125%changelog 126