File smp_utils.spec of Package smp_utils

#
# spec file for package smp_utils (Version 0.94)
#
# Copyright (c) 2009 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


Name:           smp_utils
License:        BSD 3-clause (or similar) ; GPL v2 or later
Group:          Hardware/Other
AutoReqProv:    on
Provides:       scsi:/usr/bin/smp_conf_route_info
Provides:       scsi:/usr/bin/smp_discover
Provides:       scsi:/usr/bin/smp_discover_list
Provides:       scsi:/usr/bin/smp_phy_control
Provides:       scsi:/usr/bin/smp_phy_test
Provides:       scsi:/usr/bin/smp_read_gpio
Provides:       scsi:/usr/bin/smp_rep_general
Provides:       scsi:/usr/bin/smp_rep_manufacturer
Provides:       scsi:/usr/bin/smp_rep_phy_err_log
Provides:       scsi:/usr/bin/smp_rep_phy_sata
Provides:       scsi:/usr/bin/smp_rep_route_info
Provides:       scsi:/usr/bin/smp_write_gpio
Provides:       scsi:/usr/bin/smp_conf_general
Provides:       scsi:/usr/bin/smp_rep_exp_route_tbl
Version:        0.94
Release:        1
Summary:        Utilities for the SAS Management Protocol (SMP)
Source:         http://sg.danny.cz/sg/p/%{name}-%{version}.tar.bz2
Patch1:         smp_utils-Makefile.diff
Patch2:         %{name}-compile-fixes
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The smp_utils package contains utilities for the Serial Attached SCSI
(SAS) Management Protocol (SMP).  Most utilities correspond to a single
SMP function, sending out a request, checking for errors and if all is
well processing the response. The response is either decoded, printed
out in ASCII hexadecimal or sent as binary to stdout.



Authors:
--------
    Doug Gilbert <dgilbert@interlog.com>

%prep
%setup
%patch1 -p1
%patch2 -p1

%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/'`
make CC=gcc PREFIX=%{_prefix} RPM_OPT_FLAGS="$RPM_OPT_FLAGS"

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

%files
%defattr(-,root,root)
# smp_utils
%doc README ChangeLog
%doc doc/*.html
%{_bindir}/smp_conf_route_info
%{_bindir}/smp_discover
%{_bindir}/smp_discover_list
%{_bindir}/smp_phy_control
%{_bindir}/smp_phy_test
%{_bindir}/smp_read_gpio
%{_bindir}/smp_rep_general
%{_bindir}/smp_rep_manufacturer
%{_bindir}/smp_rep_phy_err_log
%{_bindir}/smp_rep_phy_sata
%{_bindir}/smp_rep_route_info
%{_bindir}/smp_write_gpio
%{_bindir}/smp_conf_general
%{_bindir}/smp_rep_exp_route_tbl
%{_mandir}/man8/smp_conf_route_info.8.gz
%{_mandir}/man8/smp_discover.8.gz
%{_mandir}/man8/smp_discover_list.8.gz
%{_mandir}/man8/smp_phy_control.8.gz
%{_mandir}/man8/smp_phy_test.8.gz
%{_mandir}/man8/smp_read_gpio.8.gz
%{_mandir}/man8/smp_rep_general.8.gz
%{_mandir}/man8/smp_rep_manufacturer.8.gz
%{_mandir}/man8/smp_rep_phy_err_log.8.gz
%{_mandir}/man8/smp_rep_phy_sata.8.gz
%{_mandir}/man8/smp_rep_route_info.8.gz
%{_mandir}/man8/smp_utils.8.gz
%{_mandir}/man8/smp_write_gpio.8.gz
%{_mandir}/man8/smp_conf_general.8.gz
%{_mandir}/man8/smp_rep_exp_route_tbl.8.gz

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

%changelog
openSUSE Build Service is sponsored by