1 %{!?kernel_obj: %define kernel_obj /lib/modules/$(uname -r)/build}
2 # legal values are REDHAT and SUSE. default to REDHAT
3 %{!?dist: %define dist REDHAT}
5 %define version 09.03.0C02.0013
10 Summary: Multipathing tools
13 Source: http://codeman.central.sun.com/LSI/USR-SDLC/RDAC-Linux/rdac-LINUX-%{version}-source.tar.gz
14 #?? BuildRequires: kernel-source kernel-syms
15 BuildRoot: %{_tmppath}/rdac-%{version}-root
18 This package provides the mppUtil (multipathing command line utilities).
21 Summary: Multipathing driver for disk subsystems.
25 This package provides the multipathing kernel modules.
30 %setup -n linuxrdac-%{version}
32 cd linuxrdac-%{version}
34 find_linux_release() {
37 local LINUXRELEASEHEADER=$SRCDIR/include/linux/version.h
38 if [ -s $SRCDIR/include/linux/utsrelease.h ]; then
39 LINUXRELEASEHEADER=$SRCDIR/include/linux/utsrelease.h
42 sed -ne 's/#define UTS_RELEASE "\(.*\)"$/\1/p' $LINUXRELEASEHEADER
46 # need to fix up silly Makefile madness
55 /^%{dist}_KERNEL_CHECK :=/c
56 %{dist}_KERNEL_CHECK := 1
59 OS_VER := $(find_linux_release %{kernel_obj})
61 g/install -o root -g root -m [0-9]\{4,4\}/s//install/
66 #ed genfileattributes << "EOF"
68 sed -i -e 's/\/bin\/\(basename\)/\1/g' -e 's/\/bin\/\(awk\)/\1/g' genfileattributes
70 #sed -i -e 's/install -o root -g root/install/g Makefile
74 export KERNEL_OBJ=%{kernel_obj}
78 rm -rf $RPM_BUILD_ROOT
79 export KERNEL_OBJ=%{kernel_obj}
81 make DEST_DIR=$RPM_BUILD_ROOT copyfiles copyrpmfiles
82 install -m 0755 -D mpp_rcscript.$DIST $RPM_BUILD_ROOT/etc/init.d/mpp
83 gzip $RPM_BUILD_ROOT/usr/share/man/man9/RDAC.9
84 gzip $RPM_BUILD_ROOT/usr/share/man/man1/mppBusRescan.1
85 ln -s mppBusRescan $RPM_BUILD_ROOT/usr/sbin/hot_add
86 ln -s mppBusRescan.1.gz $RPM_BUILD_ROOT/usr/share/man/man1/hot_add.1.gz
87 gzip $RPM_BUILD_ROOT/usr/share/man/man1/mppUpdate.1
88 gzip $RPM_BUILD_ROOT/usr/share/man/man1/mppUtil.1
89 install -m 0444 -D mpp.conf $RPM_BUILD_ROOT/etc/mpp.conf
91 install -m 0755 -d $RPM_BUILD_ROOT/var/mpp
92 install -m 0644 -D devicemapping $RPM_BUILD_ROOT/var/mpp/devicemapping
94 rm -rf $RPM_BUILD_ROOT/opt/mpp/.mppLnx_rpm_helpers
100 %defattr (-,root,root)
102 /usr/share/man/man1/hot_add.1.gz
103 %attr (755,root,root) /etc/init.d/mpp
104 %attr (444,root,root) %config(noreplace) /etc/mpp.conf
105 %attr (755,root,root) %dir /var/mpp
106 %attr (644,root,root) %config(noreplace) /var/mpp/devicemapping
107 %attr (755,root,root) %dir /opt/mpp
108 %defattr (0500,root,root)
112 /opt/mpp/mppiscsi_umountall
113 /usr/sbin/mppBusRescan
114 /opt/mpp/mppMkInitrdHelper
117 %defattr (0644,root,root)
118 /usr/share/man/man1/mppBusRescan.1.gz
119 /usr/share/man/man1/mppUpdate.1.gz
120 /usr/share/man/man1/mppUtil.1.gz
121 /usr/share/man/man9/RDAC.9.gz
124 %defattr (0644,root,root)
129 * Fri Oct 23 2009 - brian@sun.com 09.03.0C02.0013-1