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