]> git.pld-linux.org Git - packages/EMCpower.git/blame - EMCpower.spec
- update to 5.0.0-157
[packages/EMCpower.git] / EMCpower.spec
CommitLineData
d2c9fe38 1%define _rel 0.1
73048336 2Summary: EMC PowerPath - multi-path with fail-over and load-sharing over SCSI
26d042b4 3Summary(pl.UTF-8): EMC PowerPath - multi-path z fail-over i dzieleniem obciążenia po SCSI
60cd4962 4Name: EMCpower
d2c9fe38 5Version: 5.0.0
60cd4962
ER
6Release: %{_rel}
7License: Proprietary (not distributable)
d2c9fe38
ER
8Group: Base
9Source0: %{name}.LINUX-%{version}-157.sles10.i386.rpm
10# NoSource0-md5: 9e687044c65d2ee368b71c339e639522
11Source1: %{name}.LINUX-%{version}-157.sles10.x86_64.rpm
12# NoSource1-md5: cf980fc4714f0be008de168333cefcb4
73048336
JB
13NoSource: 0
14NoSource: 1
130b9031 15Patch0: %{name}-init.patch
60cd4962
ER
16BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
19cb858a
ER
18%define _sysconfdir /etc/emc
19%define _sbindir /sbin
d4b26b0f
ER
20# binaries and libraries are x86
21%define _libdir /usr/lib
130b9031 22
60cd4962
ER
23%description
24Multi-path software providing fail-over and load-sharing for SCSI
25disks.
26
c10c84e7
JR
27%description -l pl.UTF-8
28Oprogramowanie do multi-path z opcją fail-over i dzieleniem obciążenia
29między dyski SCSI.
73048336 30
60cd4962
ER
31
32%prep
33%setup -qcT
34%ifarch %{ix86}
35rpm2cpio %{SOURCE0} | cpio -dimu
36%endif
37%ifarch %{x8664}
38rpm2cpio %{SOURCE1} | cpio -dimu
39%endif
40mv etc/opt/emcpower/EMCpower.LINUX-%{version}/* .
d2c9fe38 41#%patch0 -p1
60cd4962
ER
42
43%install
44rm -rf $RPM_BUILD_ROOT
130b9031 45install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_libdir},%{_sbindir},%{_mandir}/man1,/etc/modprobe.d,%{_datadir}/locale,/etc/rc.d/init.d}
60cd4962
ER
46
47cp -a man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
48install modprobe.conf.pp $RPM_BUILD_ROOT/etc/modprobe.d/%{name}.conf
49cp -a i18n/catalog/* $RPM_BUILD_ROOT%{_datadir}/locale
50install PowerPath.rhel $RPM_BUILD_ROOT/etc/rc.d/init.d/powerpath
51install bin/lib/* $RPM_BUILD_ROOT%{_libdir}
52install bin/cmds/* $RPM_BUILD_ROOT%{_sbindir}
130b9031 53cp -a bin/.drivers_ext $RPM_BUILD_ROOT%{_sysconfdir}/drivers_ext
60cd4962
ER
54
55%find_lang EMCpower
56%find_lang PowerPath
57cat PowerPath.lang >> EMCpower.lang
d4b26b0f
ER
58
59# hardcoded paths. oh sigh
6d2ba32c 60install -d $RPM_BUILD_ROOT/etc/opt/emcpower/.tmp
d4b26b0f
ER
61ln -s %{_sbindir}/emcpmgr $RPM_BUILD_ROOT/etc/opt/emcpower
62ln -s %{_sbindir}/powercf $RPM_BUILD_ROOT/etc/opt/emcpower
6d2ba32c
ER
63touch $RPM_BUILD_ROOT/etc/opt/emcpower/.__emcp_db_global_lock
64touch $RPM_BUILD_ROOT/etc/opt/emcpower/.__emcp_db_lock
65
d4b26b0f 66install -d $RPM_BUILD_ROOT/opt/emcpower
6d2ba32c
ER
67install -d $RPM_BUILD_ROOT/etc/emcpower
68touch $RPM_BUILD_ROOT%{_sysconfdir}/mpaa.{excluded,lams}
60cd4962
ER
69
70%clean
71rm -rf $RPM_BUILD_ROOT
72
11f9f943
ER
73%verifyscript
74echo "These PowerPath modules are installed"
75/sbin/lsmod | head -n 1
76/sbin/lsmod | grep emc
77echo "DONE"
78
5c57202d
ER
79%pre
80# Check - Only install on a 2.6 kernel
81expr `uname -r` : '2\.6' > /dev/null
82if [ $? -ne 0 ]; then
83 echo "This PowerPath package does not support this kernel."
84 exit 1
85fi
86
87# Check - Make sure no devices are in use.
88if [ "`/sbin/lsmod | grep -w emcp`" != "" ]; then
89 /sbin/powermt save > /dev/null 2>&1
90 /sbin/powermt remove dev=all > /dev/null 2>&1
91 if [ "`powermt display dev=all 2>&1 | grep "not found"`" = "" ]; then
92 echo "Unable to remove devices from the PowerPath configuration."
93 echo "Please make sure no PowerPath devices are in use and retry."
94 /sbin/powermt config > /dev/null 2>&1
95 /sbin/powermt load > /dev/null 2>&1
96 exit 1
97 fi
98 /sbin/powermt config > /dev/null 2>&1
99 /sbin/powermt load > /dev/null 2>&1
100fi
101
60cd4962
ER
102%files -f EMCpower.lang
103%defattr(644,root,root,755)
130b9031
ER
104%dir %{_sysconfdir}
105%{_sysconfdir}/drivers_ext
6d2ba32c
ER
106%ghost %{_sysconfdir}/mpaa.excluded
107%ghost %{_sysconfdir}/mpaa.lams
60cd4962
ER
108/etc/modprobe.d/EMCpower.conf
109%attr(754,root,root) /etc/rc.d/init.d/powerpath
110%attr(755,root,root) %{_sbindir}/emcpadm
111%attr(755,root,root) %{_sbindir}/emcpdiscover
112%attr(755,root,root) %{_sbindir}/emcpmgr
113%attr(755,root,root) %{_sbindir}/emcppurge
114%attr(755,root,root) %{_sbindir}/emcpreg
115%attr(755,root,root) %{_sbindir}/powercf
116%attr(755,root,root) %{_sbindir}/powermt
117%attr(755,root,root) %{_sbindir}/powerprotect
d2c9fe38
ER
118%attr(755,root,root) %{_sbindir}/powermig
119%attr(755,root,root) %{_sbindir}/pp_inq
73048336
JB
120%attr(755,root,root) %{_libdir}/libemcp.so
121%attr(755,root,root) %{_libdir}/libemcp_core.so
122%attr(755,root,root) %{_libdir}/libemcp_lam.so
123%attr(755,root,root) %{_libdir}/libemcp_lic_rtl.so
124%attr(755,root,root) %{_libdir}/libemcp_mp_rtl.so
125%attr(755,root,root) %{_libdir}/libemcpmp.so
126%attr(755,root,root) %{_libdir}/libpn.so
60cd4962
ER
127%{_mandir}/man1/emcpadm.1*
128%{_mandir}/man1/emcpreg.1*
129%{_mandir}/man1/emcpupgrade.1*
d2c9fe38 130%{_mandir}/man1/powerformat.1*
60cd4962
ER
131%{_mandir}/man1/powermig.1*
132%{_mandir}/man1/powermt.1*
133%{_mandir}/man1/powerprotect.1*
dc84bbb8
ER
134
135# hardcoded paths. oh sigh
d2c9fe38 136%dir /etc/opt/emcpower
6d2ba32c
ER
137%ghost /etc/opt/emcpower/.__emcp_db_global_lock
138%ghost /etc/opt/emcpower/.__emcp_db_lock
dc84bbb8 139/opt/emcpower
6d2ba32c 140%dir /etc/emcpower
This page took 0.051383 seconds and 4 git commands to generate.