File sgpio.spec of Package sgpio

#
# spec file for package sgpio (Version 1.2)
#
# 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/
#



Name:           sgpio
Url:            http://sources.redhat.com/lvm2/wiki/DMRAID_Eventing
Version:        1.2
Release:        2
License:        GPL v2 or later
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Group:          System/Base
Summary:        SGPIO captive backplane tool
Source0:        %{name}-%{version}.tar.bz2
Patch0:         %{name}-cflags.diff
BuildRequires:  dos2unix

%description
Serial General Purpose Input Output (SGPIO) is a communication method
used between a main board and a variety of internal and external hard
disk drive bay enclosures. This utility can be used to control LEDs in
an enclosure. For more information about SGPIO, please consult the
SFF-8485 Specification.



Authors:
--------
    Eric R. Hall <Eric.R.Hall@intel.com>

%prep
%setup -q -n %{name}
%patch0 -p1

%build
make CFLAGS="$RPM_OPT_FLAGS"
gzip sgpio.1
# strip the binary
strip sgpio
# fix documentation files
dos2unix README LICENSE_GPL
chmod a-x README LICENSE_GPL

%install
mkdir -p $RPM_BUILD_ROOT/%{_bindir} 
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1
install -m 0755 sgpio $RPM_BUILD_ROOT/%{_bindir}
install -m 0644 sgpio.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1

%clean
rm -rf "$RPM_BUILD_ROOT"

%files
%defattr(-,root,root)
%doc README LICENSE_GPL
%{_bindir}/sgpio
%{_mandir}/man1/sgpio.1.gz

%changelog
* Mon Oct 06 2008 bwalle@suse.de
- initial package (FATE#304217)
openSUSE Build Service is sponsored by