File iprutils.spec of Package iprutils

#
# spec file for package iprutils (Version 2.2.13)
#
# Copyright (c) 2010 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:           iprutils
BuildRequires:  ncurses-devel pciutils-devel
BuildRequires:  glib2-devel pkg-config
BuildRequires:  sysfsutils-devel
Summary:        Utilities for the IBM Power Linux RAID Adapters
Version:        2.2.13
Release:        13
License:        Common Public License v1.0
Url:            http://sourceforge.net/projects/iprdd/
Group:          Hardware/Other
PreReq:         %insserv_prereq %fillup_prereq
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %ix86 x86_64 ia64 ppc ppc64 %arm
Source0:        iprutils-%{version}-src.tar.bz2
Patch0:         iprconfig.usr-sbin.patch
Patch1:         iprutils.install-man.patch
Patch2:         iprutils.runlevel.patch
Patch3:         iprutils-noswab.patch
Patch4:         iprutils-close.diff

%description
Provides a suite of utilities to manage and configure SCSI devices
supported by the ipr SCSI storage device driver.



Authors:
--------
    Wayne Boyer <wayneb@linux.vnet.ibm.com>

%prep
%setup -q -n iprutils
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3
%patch4 -p1

%build
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -I/usr/include/ncurses \$(IPR_DEFINES)"

%install
make INSTALL_MOD_PATH=$RPM_BUILD_ROOT install
install -d $RPM_BUILD_ROOT/etc/init.d
install init.d/iprdump $RPM_BUILD_ROOT/etc/init.d/iprdump
install init.d/iprinit $RPM_BUILD_ROOT/etc/init.d/iprinit
install init.d/iprupdate $RPM_BUILD_ROOT/etc/init.d/iprupdate
%if %sles_version == 9
mv $RPM_BUILD_ROOT/usr/sbin/iprconfig $RPM_BUILD_ROOT/sbin/iprconfig
%endif

%clean
rm -rf $RPM_BUILD_ROOT
%ifarch ppc ppc64

%post
%{fillup_and_insserv -y iprdump iprinit iprupdate}
%endif

%preun
%stop_on_removal

%postun
%{insserv_cleanup}

%files
%defattr(-,root,root,-)
%doc README LICENSE
%attr(755,root,root) /sbin/*
%if %suse_version > 910
%attr(755,root,root) /usr/sbin/*
%endif
%{_mandir}/man*/*
%attr(755,root,root) /etc/init.d/*

%changelog