File sdparm.spec of Package sdparm

#
# spec file for package sdparm (Version 1.03)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

Url:            http://www.torque.net/sg/sdparm.html

Name:           sdparm
%define sdparmver	1.03
License:        BSD 3-Clause
Group:          Hardware/Other
AutoReqProv:    on
Provides:       scsi:/sbin/sdparm
Version:        1.03
Release:        1
Summary:        List or change SCSI disk parameters
Source:         http://sg.torque.net/sg/p/sdparm-%{sdparmver}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         %fillup_prereq %insserv_prereq

%description
SCSI disk parameters are held in mode pages. This utility lists or
changes those parameters. Other SCSI devices (or devices that use the
SCSI command set) such as CD/DVD and tape drives may also find parts of
sdparm useful. Requires the linux kernel 2.4 series or later. In the
2.6 series any device node the understands a SCSI command set may be
used (e.g. /dev/sda). In the 2.4 series SCSI device node may be used.

Warning: It is possible (but unlikely) to change SCSI disk settings
such that the disk stops operating or is slowed down. Use with care.



Authors:
--------
    Douglas Gilbert <dougg@torque.net>

%prep
%setup
autoreconf -f

%build
# None of these is performance-critical, so use -Os rather than -O2:
export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's/\-O2/-Os/'`
CFLAGS="$RPM_OPT_FLAGS -Wall" ./configure --prefix=%{_prefix} --infodir=%{_infodir} --mandir=%{_mandir}
make

%install
make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} MANDIR=$RPM_BUILD_ROOT/%{_mandir} bindir=/sbin

%files
%defattr(-,root,root)
# sdparm
%attr(755,root,root) /sbin/sdparm
%doc %{_mandir}/man8/sdparm.8.gz
%doc README ChangeLog

%clean
test ! -z "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" && rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_DIR/sdparm-%{sdparmver}

%changelog
* Tue Aug 12 2008 garloff@suse.de
- Update to sdparm-1.03:
  * supports more than one device on command linx
  * speed[=val] and profile commands for MMC
  * Extended Inquiry VPD page updated (spc4r15)
  * SAS protocol-specific port mpage (add CAWT, RTOL)
  * minor cleanups
* Fri May 23 2008 hare@suse.de
- Using 'Provides' keyword to clean update dependency.
* Thu Apr 24 2008 hare@suse.de
- Split off from the original scsi package.
openSUSE Build Service is sponsored by