You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
2.6 KiB

Summary: Utilities for the IBM Power Linux RAID adapters
Name: iprutils
Version: 2.4.19.1
Release: 1%{?dist}
License: CPL
Group: System Environment/Base
URL: http://sourceforge.net/projects/iprdd/
Source0: https://sourceforge.net/projects/iprdd/files/iprutils%20for%202.6%20kernels/2.4.19/%{name}-%{version}.tar.xz
# missing man page
Source1: iprdbg.8.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: /sbin/pidof
# for iprsos
Requires: lsscsi
BuildRequires: ncurses-devel
BuildRequires: libcap-devel
BuildRequires: kernel-devel
BuildRequires: systemd
BuildRequires: python-devel
BuildRequires: zlib-devel
Obsoletes: ipr-utils
%description
Provides a suite of utilities to manage and configure SCSI devices
supported by the ipr SCSI storage device driver.
%prep
%setup -q -n %{name}-%{version}
autoreconf -vif
%build
export CFLAGS="%{optflags} -fPIE -Wl,-z,relro,-z,now"
export LDFLAGS="-pie"
%configure --with-systemd --without-initscripts --disable-static --disable-sosreport
%{__make}
%install
%make_install
# udev
#mkdir -p $RPM_BUILD_ROOT/%{_udevrulesdir}
#%{__install} -m 0644 udev/rules.d/90-iprutils.rules $RPM_BUILD_ROOT/%{_udevrulesdir}/90-iprutils.rules
# install all service units
mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
%{__install} -m 0644 systemd/iprinit.service $RPM_BUILD_ROOT/%{_unitdir}/iprinit.service
%{__install} -m 0644 systemd/iprdump.service $RPM_BUILD_ROOT/%{_unitdir}/iprdump.service
%{__install} -m 0644 systemd/iprupdate.service $RPM_BUILD_ROOT/%{_unitdir}/iprupdate.service
%{__install} -m 0644 systemd/iprutils.target $RPM_BUILD_ROOT/%{_unitdir}/iprutils.target
# missing man page
%{__install} -m 0644 %SOURCE1 %{buildroot}%{_mandir}/man8/
%{__mv} %{buildroot}%{_sysconfdir}/bash_completion.d/iprconfig-bash-completion.sh %{buildroot}%{_sysconfdir}/bash_completion.d/iprutils
%{__chmod} 0644 %{buildroot}/etc/bash_completion.d/iprutils
# never been shipped in Fedora/RHEL
%{__rm} -rf %{buildroot}/etc/ha.d/resource.d/iprha
%{__rm} -rf %{buildroot}/etc/ha.d/resource.d/iprha.in
# fix permissions
%{__chmod} 0700 %{buildroot}/%{_sbindir}/iprdbg
%post
%systemd_post iprinit.service
%systemd_post iprdump.service
%systemd_post iprupdate.service
%systemd_post iprutils.target
%preun
%systemd_preun iprinit.service
%systemd_preun iprdump.service
%systemd_preun iprupdate.service
%systemd_preun iprutils.target
%files
%doc README LICENSE
%{_sbindir}/*
%{_mandir}/man8/*
%{_unitdir}/iprinit.service
%{_unitdir}/iprdump.service
%{_unitdir}/iprupdate.service
%{_unitdir}/iprutils.target
%{_udevrulesdir}/90-iprutils.rules
%{_sysconfdir}/bash_completion.d
%changelog