File sdparm.spec of Package sdparm

#
# spec file for package sdparm
#
# Copyright (c) 2012 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/
#


Name:           sdparm
Version:        1.07
Release:        0
Summary:        List or change SCSI disk parameters
License:        BSD-3-Clause
Group:          Hardware/Other
Url:            http://www.torque.net/sg/sdparm.html
Source:         http://sg.danny.cz/sg/p/%{name}-%{version}.tgz
Requires(pre):  %fillup_prereq
Requires(pre):  %insserv_prereq
Provides:       scsi:/sbin/sdparm
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%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.

%prep
%setup -q

%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 %{?_smp_mflags}

%install
#make install DESTDIR=%{buildroot} PREFIX=%{_prefix} MANDIR=%{buildroot}%{_mandir} bindir=/sbin
%makeinstall PREFIX=%{_prefix} MANDIR=%{buildroot}%{_mandir} bindir=/sbin

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

%changelog