#
# main package.
#
-%define _rel 0.4
+%define _rel 0.7
Summary: EMC PowerPath
Name: EMCpower
Version: 4.5.1
# NoSource0-md5: ed93c4daa2169b992c888ef5c27a6334
Source1: %{name}.LINUX-%{version}-022.sles.x86_64.rpm
# NoSource1-md5: b9e452479cff19640dee5431ff96f56c
+Patch0: %{name}-init.patch
%if %{with kernel}
%{?with_dist_kernel:BuildRequires: kernel-module-build >= 3:2.6.14}
BuildRequires: rpmbuild(macros) >= 1.286
%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define _sysconfdir /etc/emcpower
+
%description
Multi-path software providing fail-over and load-sharing for SCSI
disks.
rpm2cpio %{SOURCE1} | cpio -dimu
%endif
mv etc/opt/emcpower/EMCpower.LINUX-%{version}/* .
+%patch0 -p1
+
ln -s emcplib.Makefile bin/driver/Makefile
%build
rm -rf $RPM_BUILD_ROOT
%if %{with userspace}
-install -d $RPM_BUILD_ROOT{%{_libdir},%{_sbindir},%{_mandir}/man1,/etc/modprobe.d,%{_datadir}/locale,/etc/rc.d/init.d}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_libdir},%{_sbindir},%{_mandir}/man1,/etc/modprobe.d,%{_datadir}/locale,/etc/rc.d/init.d}
cp -a man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
install modprobe.conf.pp $RPM_BUILD_ROOT/etc/modprobe.d/%{name}.conf
install PowerPath.rhel $RPM_BUILD_ROOT/etc/rc.d/init.d/powerpath
install bin/lib/* $RPM_BUILD_ROOT%{_libdir}
install bin/cmds/* $RPM_BUILD_ROOT%{_sbindir}
+cp -a bin/.drivers_ext $RPM_BUILD_ROOT%{_sysconfdir}/drivers_ext
%find_lang EMCpower
%find_lang PowerPath
%if %{with userspace}
%files -f EMCpower.lang
%defattr(644,root,root,755)
+%dir %{_sysconfdir}
+%{_sysconfdir}/drivers_ext
/etc/modprobe.d/EMCpower.conf
%attr(754,root,root) /etc/rc.d/init.d/powerpath
%attr(755,root,root) %{_sbindir}/emcpadm