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