File iprutils.spec of Package iprutils
#
# spec file for package iprutils
#
# 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: iprutils
# NOTE: package's changelog is hidden in % changelog section
# in file iprutils/spec/iprutils.spec
Version: 2.3.10
Release: 0
Summary: Utilities for the IBM Power Linux RAID Adapters
License: CPL-1.0
Group: Hardware/Other
Url: http://sourceforge.net/projects/iprdd/
Source0: https://downloads.sourceforge.net/project/iprdd/iprutils%20for%202.6%20kernels/%{version}/%{name}-%{version}-src.tgz
Patch0: iprconfig.usr-sbin.patch
Patch1: iprutils.install-man.patch
Patch2: iprutils.runlevel.patch
Patch4: iprutils-close.diff
BuildRequires: ncurses-devel
BuildRequires: pciutils-devel
BuildRequires: pkg-config
BuildRequires: sysfsutils-devel
BuildRequires: pkgconfig(glib-2.0)
Requires(pre): %fillup_prereq
Requires(pre): %insserv_prereq
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64 ia64 ppc ppc64 %arm
%description
Provides a suite of utilities to manage and configure SCSI devices
supported by the ipr SCSI storage device driver.
%prep
%setup -q -n iprutils
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch4 -p1
%build
make %{?_smp_mflags} CFLAGS="%{optflags} -I/usr/include/ncurses \$(IPR_DEFINES)" CC="gcc"
%install
make INSTALL_MOD_PATH=%{buildroot} install
install -d %{buildroot}%{_sysconfdir}/init.d
install init.d/iprdump %{buildroot}%{_initddir}/iprdump
install init.d/iprinit %{buildroot}%{_initddir}/iprinit
install init.d/iprupdate %{buildroot}%{_initddir}/iprupdate
%if 0%{?sles_version} == 9
mv %{buildroot}%{_sbindir}/iprconfig %{buildroot}/sbin/iprconfig
%endif
%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 0%{?suse_version} > 910
%attr(755,root,root) %{_sbindir}/*
%endif
%{_mandir}/man*/*
%attr(755,root,root) %{_sysconfdir}/init.d/*
%changelog