%define name sg3_utils %define version 1.13 %define release 1mdk %define major 1 %define libname %mklibname sgutils %{major} Summary: Utils for Linux's SCSI generic driver devices + raw devices Name: %{name} Version: %{version} Release: %{release} License: GPL Group: System/Kernel and hardware URL: http://www.torque.net/sg/u_index.html Source0: http://www.torque.net/sg/p/%{name}-%{version}.tar.bz2 Patch0: sg3_utils-1.11-no_root_install.diff.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Collection of tools for SCSI devices that use the Linux SCSI generic (sg) interface. Includes utilities to copy data based on "dd" syntax and semantics (called sg_dd, sgp_dd and sgm_dd); check INQUIRY data and associated pages (sg_inq); check mode and log pages (sg_modes and sg_logs); spin up and down disks (sg_start); do self tests (sg_senddiag); and various other functions. See the README and CHANGELOG files. Requires the lk 2.4 series or better. [In the lk 2.5 development series many of these utilities can be used on the primary block device name (e.g. /dev/sda).] Warning: Some of these tools access the internals of your system and the incorrect usage of them may render your system inoperable. %package -n %{libname} Summary: Shared library for %{name} Group: System/Libraries %description -n %{libname} This package contains the shared library for %{name}. %package -n %{libname}-devel Summary: Static library and header files for the sgutils library Group: Development/C Obsoletes: %{name}-devel Provides: %{name}-devel Provides: libsgutils-devel Requires: %{libname} = %{version} %description -n %{libname}-devel This package contains the static sgutils library and its header files. %prep %setup -q %patch0 -p0 %build %make \ CFLAGS="%{optflags} -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" \ LIBDIR="%{_libdir}" %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %makeinstall_std \ PREFIX=%{_prefix} \ LIBDIR=%{buildroot}%{_libdir} \ INSTDIR=%{buildroot}%{_sbindir} \ MANDIR=%{buildroot}%{_mandir} \ INCLUDEDIR=%{buildroot}%{_includedir} %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root) %doc CHANGELOG COVERAGE CREDITS README README.sg_start %attr(0755,root,root) %{_sbindir}/* %{_mandir}/man8/* %files -n %{libname} %defattr(-,root,root) %{_libdir}/*.so.* %files -n %{libname}-devel %defattr(-,root,root) %{_includedir}/scsi/*.h %{_libdir}/*.so %{_libdir}/*.a %{_libdir}/*.la %changelog * Mon Mar 21 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 1.13-1mdk - 1.13 * Tue Nov 30 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.11-1mdk - 1.11 - added P0 - misc spec file fixes * Sat Aug 28 2004 Franck Villaume <fvill@freesurf.fr> 1.08-1mdk - 1.08 * Mon Jul 28 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 1.04-1mdk - initial cooker contrib - used parts of the spec file by Doug Gilbert