# # spec file for package sg3_utils (Version 1.25) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Url: http://sg.torque.net/sg/sg3_utils.html Name: sg3_utils %define sgver 1.25 License: BSD 3-Clause; GPL v2 only; GPL v2 or later Group: Hardware/Other Provides: sg_utils Conflicts: scsi AutoReqProv: on Version: 1.25 Release: 2 Summary: A collection of tools that send SCSI commands to devices Source: http://sg.torque.net/sg/p/sg3_utils-%{sgver}.tar.bz2 Source2: http://www.garloff.de/kurt/linux/rescan-scsi-bus.sh Patch1: %{name}.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description The sg3_utils package contains utilities that send SCSI commands to devices. As well as devices on transports traditionally associated with SCSI (e.g. Fibre Channel (FCP), Serial Attached SCSI (SAS) and the SCSI Parallel Interface(SPI)) many other devices use SCSI command sets. ATAPI cd/dvd drives and SATA disks that connect via a translation layer or a bridge device are examples of devices that use SCSI command sets. Authors: -------- Doug Gilbert Kurt Garloff %package devel License: BSD 3-Clause; GPL v2 or later Summary: A collection of tools that send SCSI commands to devices Group: Hardware/Other AutoReqProv: on Requires: %name = %version %description devel The sg3_utils package contains utilities that send SCSI commands to devices. As well as devices on transports traditionally associated with SCSI (e.g. Fibre Channel (FCP), Serial Attached SCSI (SAS) and the SCSI Parallel Interface(SPI)) many other devices use SCSI command sets. ATAPI cd/dvd drives and SATA disks that connect via a translation layer or a bridge device are examples of devices that use SCSI command sets. Authors: -------- Doug Gilbert Kurt Garloff %prep %setup %patch1 %build autoreconf -f export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's/\-O2/-Os/'` CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" \ PREFIX=%{_prefix} LIBDIR=%{_libdir} CC=gcc \ ./configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ --libdir=%{_libdir} make %install make install DESTDIR=$RPM_BUILD_ROOT INSTDIR=$RPM_BUILD_ROOT%{_bindir} \ MANDIR=$RPM_BUILD_ROOT%{_mandir} LIBDIR=$RPM_BUILD_ROOT%{_libdir} \ PREFIX=%{_prefix} install -m 755 scripts/scsi_logging_level $RPM_BUILD_ROOT%{_bindir} install -m 755 %{S:2} $RPM_BUILD_ROOT%{_bindir} %post %{run_ldconfig} %postun %{run_ldconfig} %files %defattr(-,root,root) %doc README README.sg_start %doc ChangeLog INSTALL CREDITS NEWS %attr(755,root,root) %{_bindir}/sg_dd %attr(755,root,root) %{_bindir}/sg_inq %attr(755,root,root) %{_bindir}/sg_scan %attr(755,root,root) %{_bindir}/sg_rbuf %attr(755,root,root) %{_bindir}/sginfo %attr(755,root,root) %{_bindir}/sg_readcap %attr(755,root,root) %{_bindir}/sgp_dd %attr(755,root,root) %{_bindir}/sg_map %attr(755,root,root) %{_bindir}/sg_turs %attr(755,root,root) %{_bindir}/sg_test_rwbuf #%attr(755,root,root) %{_bindir}/scsi_devfs_scan %attr(755,root,root) %{_bindir}/sgm_dd %attr(755,root,root) %{_bindir}/sg_read %attr(755,root,root) %{_bindir}/sg_logs %attr(755,root,root) %{_bindir}/sg_modes %attr(755,root,root) %{_bindir}/sg_opcodes %attr(755,root,root) %{_bindir}/sg_persist %attr(755,root,root) %{_bindir}/sg_senddiag %attr(755,root,root) %{_bindir}/sg_reset %attr(755,root,root) %{_bindir}/sg_emc_trespass %attr(755,root,root) %{_bindir}/sg_read_long %attr(755,root,root) %{_bindir}/sg_requests %attr(755,root,root) %{_bindir}/sg_ses %attr(755,root,root) %{_bindir}/sg_verify %attr(755,root,root) %{_bindir}/sg_write_long %attr(755,root,root) %{_bindir}/sg_luns %attr(755,root,root) %{_bindir}/sg_prevent %attr(755,root,root) %{_bindir}/sg_get_config %attr(755,root,root) %{_bindir}/sg_sync %attr(755,root,root) %{_bindir}/sg_wr_mode %attr(755,root,root) %{_bindir}/sg_reassign %attr(755,root,root) %{_bindir}/sg_rtpg %attr(755,root,root) %{_bindir}/sg_format %attr(755,root,root) %{_bindir}/sg_rmsn %attr(755,root,root) %{_bindir}/sg_start %attr(755,root,root) %{_bindir}/sg_ident %attr(755,root,root) %{_bindir}/sg_map26 %attr(755,root,root) %{_bindir}/sg_rdac %attr(755,root,root) %{_bindir}/sg_vpd %attr(755,root,root) %{_bindir}/sg_raw %attr(755,root,root) %{_bindir}/sg_write_buffer %attr(755,root,root) %{_bindir}/sg_sat_identify %attr(755,root,root) %{_bindir}/sg_read_buffer %attr(755,root,root) %{_bindir}/sg_safte %attr(755,root,root) %{_bindir}/sg_sat_set_features %attr(755,root,root) %{_bindir}/sg_stpg %attr(755,root,root) %{_bindir}/scsi_logging_level %attr(755,root,root) %{_bindir}/rescan-scsi-bus.sh %doc %{_mandir}/man8/sg_dd.8.gz %doc %{_mandir}/man8/sgp_dd.8.gz %doc %{_mandir}/man8/sgm_dd.8.gz %doc %{_mandir}/man8/sg_map.8.gz %doc %{_mandir}/man8/sg_rbuf.8.gz %doc %{_mandir}/man8/sg_read.8.gz %doc %{_mandir}/man8/sg_scan.8.gz %doc %{_mandir}/man8/sginfo.8.gz %doc %{_mandir}/man8/sg_readcap.8.gz %doc %{_mandir}/man8/sg_turs.8.gz %doc %{_mandir}/man8/sg_inq.8.gz %doc %{_mandir}/man8/sg_test_rwbuf.8.gz #%doc %{_mandir}/man8/scsi_devfs_scan.8.gz %doc %{_mandir}/man8/sg_start.8.gz %doc %{_mandir}/man8/sg_reset.8.gz %doc %{_mandir}/man8/sg_modes.8.gz %doc %{_mandir}/man8/sg_logs.8.gz %doc %{_mandir}/man8/sg_opcodes.8.gz %doc %{_mandir}/man8/sg_persist.8.gz %doc %{_mandir}/man8/sg_senddiag.8.gz %doc %{_mandir}/man8/sg_emc_trespass.8.gz %doc %{_mandir}/man8/sg_read_long.8.gz %doc %{_mandir}/man8/sg_requests.8.gz %doc %{_mandir}/man8/sg_ses.8.gz %doc %{_mandir}/man8/sg_verify.8.gz %doc %{_mandir}/man8/sg_write_long.8.gz %doc %{_mandir}/man8/sg_luns.8.gz %doc %{_mandir}/man8/sg_prevent.8.gz %doc %{_mandir}/man8/sg_get_config.8.gz %doc %{_mandir}/man8/sg_sync.8.gz %doc %{_mandir}/man8/sg_wr_mode.8.gz %doc %{_mandir}/man8/sg_reassign.8.gz %doc %{_mandir}/man8/sg_rtpg.8.gz %doc %{_mandir}/man8/sg_format.8.gz %doc %{_mandir}/man8/sg_rmsn.8.gz %doc %{_mandir}/man8/sg_ident.8.gz %doc %{_mandir}/man8/sg_map26.8.gz %doc %{_mandir}/man8/sg_rdac.8.gz %doc %{_mandir}/man8/sg_vpd.8.gz %doc %{_mandir}/man8/sg_raw.8.gz %doc %{_mandir}/man8/sg_write_buffer.8.gz %doc %{_mandir}/man8/sg_sat_identify.8.gz %doc %{_mandir}/man8/sg_read_buffer.8.gz %doc %{_mandir}/man8/sg_safte.8.gz %doc %{_mandir}/man8/sg_sat_set_features.8.gz %doc %{_mandir}/man8/sg_stpg.8.gz %doc %{_mandir}/man8/sg3_utils.8.gz %attr(755,root,root) %{_libdir}/libsgutils.so.* %files devel %defattr(644,root,root) %attr(755,root,root) %{_libdir}/libsgutils.so %attr(755,root,root) %{_libdir}/libsgutils.la %attr(755,root,root) %dir %{_prefix}/include/scsi %{_libdir}/libsgutils.a %{_prefix}/include/scsi/sg_cmds.h %{_prefix}/include/scsi/sg_cmds_basic.h %{_prefix}/include/scsi/sg_cmds_extra.h %{_prefix}/include/scsi/sg_lib.h %{_prefix}/include/scsi/sg_pt.h %{_prefix}/include/scsi/sg_io_linux.h %{_prefix}/include/scsi/sg_linux_inc.h %clean test ! -z "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" && rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_DIR/sg3_utils-%{sgver} %changelog * Thu Apr 24 2008 hare@suse.de - Split off from original scsi package.