File iprutils.spec of Package iprutils.558

# spec file for package iprutils
# Copyright (c) 2015 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

Name:           iprutils
# NOTE: package's changelog is hidden in % changelog section
# in file iprutils/spec/iprutils.spec
Version:        2.4.1
Release:        0
Summary:        Utilities for the IBM Power Linux RAID Adapters
License:        CPL-1.0
Group:          Hardware/Other
Patch0:         iprconfig.usr-sbin.patch
Patch1:         iprutils.install-man.patch
Patch2:         iprutils.runlevel.patch
Patch4:         iprutils-close.diff
Patch5:         iprutils.redundant_paths_in_GTO.patch 
Patch6:         iprutils.generate_ipr_dump_file.patch
Patch7:         iprutils.read_intensive_disks_doesnt_show_up.patch 
Patch8:         iprutils.bug-896587_mig_fix_le.patch
Patch9:         iprutils.bug-908952_show_disks_and_pyhiscal_location.patch  
Patch10:        iprutils.bug-923181_fix_create_raid_level.patch
Source1:        iprdump.service
Source2:        iprinit.service
Source3:        iprupdate.service
BuildRequires:  ncurses-devel
BuildRequires:  pciutils-devel
BuildRequires:  pkg-config
BuildRequires:  systemd-rpm-macros
BuildRequires:  pkgconfig(glib-2.0)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %ix86 x86_64 ia64 ppc ppc64 ppc64le %arm

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

%setup -q -n iprutils
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch4 -p1
%patch5 -p2
%patch6 -p2
%patch7 -p2
%patch8 -p2
%patch9 -p2
%patch10 -p1

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

make INSTALL_MOD_PATH=%{buildroot} install
mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
install -D -m0644 %{S:1} %{buildroot}%{_unitdir}/
install -D -m0644 %{S:2} %{buildroot}%{_unitdir}/
install -D -m0644 %{S:3} %{buildroot}%{_unitdir}/
ln -s /sbin/service %{buildroot}/usr/sbin/rciprdump
ln -s /sbin/service %{buildroot}/usr/sbin/rciprinit
ln -s /sbin/service %{buildroot}/usr/sbin/rciprupdate
echo %{_sbindir}

%service_add_pre iprdump.service
%service_add_pre iprinit.service
%service_add_pre iprupdate.service

%service_add_post iprdump.service
%service_add_post iprinit.service
%service_add_post iprupdate.service

%service_del_preun iprdump.service
%service_del_preun iprinit.service
%service_del_preun iprupdate.service

%service_del_postun iprdump.service
%service_del_postun iprinit.service
%service_del_postun iprupdate.service

%attr(755,root,root) /sbin/*
%attr(755,root,root) %{_sbindir}/*

openSUSE Build Service is sponsored by