]> git.pld-linux.org Git - packages/EMCpower.git/blame_incremental - EMCpower.spec
- raw from EMCpower-5.0.1/enable
[packages/EMCpower.git] / EMCpower.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without dist_kernel # allow non-distribution kernel
4%bcond_without kernel # build kernel modules
5%bcond_with up # don't build UP module
6%bcond_without smp # don't build SMP module
7%bcond_without userspace # don't build userspace programs
8%bcond_with verbose # verbose build (V=1)
9
10%if %{without kernel}
11%undefine with_dist_kernel
12%endif
13
14# just don't want to build it :)
15%ifarch %{x8664}
16%undefine with_up
17%endif
18
19%define __kernel_ver 2.6.16.46-0.12
20%define __kernel_rpmvr %{__kernel_ver}
21
22%define releq_kernel_smp kernel-smp = 0:%{__kernel_ver}
23%define releq_kernel_up kernel-up = 0:%{__kernel_ver}
24
25%define brand sles10sp1
26
27%define _rel 0.3
28Summary: EMC PowerPath - multi-path with fail-over and load-sharing over SCSI
29Summary(pl.UTF-8): EMC PowerPath - multi-path z fail-over i dzieleniem obciążenia po SCSI
30Name: EMCpower
31Version: 5.0.1
32Release: %{_rel}
33License: Proprietary (not distributable)
34Group: Base
35URL: https://powerlink.emc.com/
36%ifarch %{ix86}
37Source0: %{name}.LINUX-%{version}-022.%{brand}.i386.rpm
38# NoSource0-md5: 9e687044c65d2ee368b71c339e639522
39NoSource: 0
40%endif
41%ifarch %{x8664}
42Source1: %{name}.LINUX-%{version}-022.%{brand}.x86_64.rpm
43# NoSource1-md5: cbe183e0a7f4beef04873529313a7325
44NoSource: 1
45%endif
46Source2: PowerPath.init
47Requires(post,preun): /sbin/chkconfig
48Obsoletes: EMCpower.LINUX
49BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51%define _sysconfdir /something/bogus
52%define _sbindir /sbin
53
54%description
55Multi-path software providing fail-over and load-sharing for SCSI
56disks.
57
58%description -l pl.UTF-8
59Oprogramowanie do multi-path z opcją fail-over i dzieleniem obciążenia
60między dyski SCSI.
61
62# kernel subpackages.
63
64%package -n kernel-block-emc
65Summary: Linux driver for emc
66Summary(pl.UTF-8): Sterownik dla Linuksa do emc
67Release: %{_rel}@%{_kernel_ver_str}
68Group: Base/Kernel
69Requires(post,postun): /sbin/depmod
70%if %{with dist_kernel}
71%requires_releq_kernel_up
72Requires(postun): %releq_kernel_up
73%endif
74
75%description -n kernel-block-emc
76This is driver for emc for Linux.
77
78This package contains Linux module.
79
80%description -n kernel-block-emc -l pl.UTF-8
81Sterownik dla Linuksa do emc.
82
83Ten pakiet zawiera moduł jądra Linuksa.
84
85%package -n kernel-smp-block-emc
86Summary: Linux SMP driver for emc
87Summary(pl.UTF-8): Sterownik dla Linuksa SMP do emc
88Release: %{_rel}@%{_kernel_ver_str}
89Group: Base/Kernel
90Requires(post,postun): /sbin/depmod
91%if %{with dist_kernel}
92%requires_releq_kernel_smp
93Requires(postun): %releq_kernel_smp
94%endif
95
96%description -n kernel-smp-block-emc
97This is driver for emc for Linux.
98
99This package contains Linux SMP module.
100
101%description -n kernel-smp-block-emc -l pl.UTF-8
102Sterownik dla Linuksa do emc.
103
104Ten pakiet zawiera moduł jądra Linuksa SMP.
105
106%prep
107%setup -qcT
108%ifarch %{ix86}
109rpm2cpio %{SOURCE0} | cpio -dimu
110%endif
111%ifarch %{x8664}
112rpm2cpio %{SOURCE1} | cpio -dimu
113%endif
114mv etc/opt/emcpower/EMCpower.LINUX-%{version}/* .
115echo 'options emcp managedclass=symm,clariion,hitachi,invista,hpxp,ess,hphsx' >> modprobe.conf.pp
116
117%install
118rm -rf $RPM_BUILD_ROOT
119%if %{with userspace}
120install -d $RPM_BUILD_ROOT{/etc/emc/ppme,%{_libdir},%{_sbindir},%{_mandir}/man1,/etc/modprobe.d,%{_datadir}/locale,/etc/rc.d/init.d}
121
122# udev
123install -d $RPM_BUILD_ROOT{/etc/udev/rules.d,/lib/udev}
124install udev-pp.rules $RPM_BUILD_ROOT/etc/udev/rules.d
125install pp_udev.sh $RPM_BUILD_ROOT/lib/udev/pp_udev.sh
126
127cp -a man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
128cp -a i18n/catalog/* $RPM_BUILD_ROOT%{_datadir}/locale
129install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/PowerPath
130install bin/lib/* $RPM_BUILD_ROOT%{_libdir}
131install bin/cmds/* $RPM_BUILD_ROOT%{_sbindir}
132cp -a bin/.drivers_* $RPM_BUILD_ROOT/etc/emc
133
134%find_lang EMCpower
135%find_lang PowerPath
136cat PowerPath.lang >> EMCpower.lang
137
138# hardcoded paths. oh sigh
139install -d $RPM_BUILD_ROOT/etc/opt/emcpower/.tmp
140mv $RPM_BUILD_ROOT{%{_sbindir},/etc/opt/emcpower}/emcpmgr
141mv $RPM_BUILD_ROOT{%{_sbindir},/etc/opt/emcpower}/powercf
142touch $RPM_BUILD_ROOT/etc/opt/emcpower/.__emcp_db_global_lock
143touch $RPM_BUILD_ROOT/etc/opt/emcpower/.__emcp_db_lock
144
145install -d $RPM_BUILD_ROOT/opt/emcpower
146install -d $RPM_BUILD_ROOT/etc/emcpower
147touch $RPM_BUILD_ROOT/etc/emc/mpaa.{excluded,lams}
148%endif
149
150%if %{with kernel}
151%if %{with up}
152install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/block
153install -D modprobe.conf.pp $RPM_BUILD_ROOT/etc/modprobe.d/%{_kernel_ver}/%{name}.conf
154
155%ifarch %{x8664}
156install bin/driver/%{brand}default_x8664/*.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}-smp/kernel/drivers/block
157%endif
158%endif
159
160%if %{with smp} && %{with dist_kernel}
161install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}-smp/kernel/drivers/block
162install -D modprobe.conf.pp $RPM_BUILD_ROOT/etc/modprobe.d/%{_kernel_ver}-smp/%{name}.conf
163%ifarch %{x8664}
164install bin/driver/%{brand}smp_x8664/*.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}-smp/kernel/drivers/block
165%endif
166%endif
167
168%clean
169rm -rf $RPM_BUILD_ROOT
170
171%post
172/sbin/chkconfig --add PowerPath
173
174%preun
175if [ "$1" = "0" ]; then
176 /sbin/chkconfig --del PowerPath
177fi
178
179%post -n kernel-block-emc
180%depmod %{_kernel_ver}
181
182%postun -n kernel-block-emc
183%depmod %{_kernel_ver}
184
185%post -n kernel-smp-block-emc
186%depmod %{_kernel_ver}-smp
187
188%postun -n kernel-smp-block-emc
189%depmod %{_kernel_ver}-smp
190
191%if %{with kernel}
192%if %{with up}
193%files -n kernel-block-emc
194%defattr(644,root,root,755)
195/etc/modprobe.d/%{_kernel_ver}/%{name}.conf
196/lib/modules/%{_kernel_ver}/kernel/drivers/block/*.ko*
197%endif
198
199%if %{with smp} && %{with dist_kernel}
200%files -n kernel-smp-block-emc
201%defattr(644,root,root,755)
202/etc/modprobe.d/%{_kernel_ver}-smp/%{name}.conf
203/lib/modules/%{_kernel_ver}-smp/kernel/drivers/block/*.ko*
204%endif
205%endif
206
207%if %{with userspace}
208%files -f EMCpower.lang
209%defattr(644,root,root,755)
210/etc/udev/rules.d/*.rules
211%attr(755,root,root) /lib/udev/pp_udev.sh
212
213%dir /etc/emc
214%dir /etc/emc/ppme
215/etc/emc/.drivers_*
216%ghost /etc/emc/mpaa.excluded
217%ghost /etc/emc/mpaa.lams
218%attr(754,root,root) /etc/rc.d/init.d/PowerPath
219%attr(755,root,root) %{_sbindir}/emcpadm
220%attr(755,root,root) %{_sbindir}/emcpdiscover
221%attr(755,root,root) %{_sbindir}/emcppurge
222%attr(755,root,root) %{_sbindir}/emcpreg
223%attr(755,root,root) %{_sbindir}/powermt
224%attr(755,root,root) %{_sbindir}/powerprotect
225%attr(755,root,root) %{_sbindir}/powermig
226%attr(755,root,root) %{_sbindir}/pp_inq
227%attr(755,root,root) %{_libdir}/libemcp.so
228%attr(755,root,root) %{_libdir}/libemcp_core.so
229%attr(755,root,root) %{_libdir}/libemcp_lam.so
230%attr(755,root,root) %{_libdir}/libemcp_lic_rtl.so
231%attr(755,root,root) %{_libdir}/libemcp_mp_rtl.so
232%attr(755,root,root) %{_libdir}/libemcpmp.so
233%attr(755,root,root) %{_libdir}/libpn.so
234%{_mandir}/man1/emcpadm.1*
235%{_mandir}/man1/emcpreg.1*
236%{_mandir}/man1/emcpupgrade.1*
237%{_mandir}/man1/powerformat.1*
238%{_mandir}/man1/powermig.1*
239%{_mandir}/man1/powermt.1*
240%{_mandir}/man1/powerprotect.1*
241
242# hardcoded paths. oh sigh
243%dir /etc/opt/emcpower
244%attr(755,root,root) /etc/opt/emcpower/emcpmgr
245%attr(755,root,root) /etc/opt/emcpower/powercf
246%ghost /etc/opt/emcpower/.__emcp_db_global_lock
247%ghost /etc/opt/emcpower/.__emcp_db_lock
248%dir /opt/emcpower
249%dir /etc/emcpower
250%endif
This page took 0.036315 seconds and 4 git commands to generate.