1 %define kversion @RELEASE@
2 %define linuxdir @LINUX@
5 Summary: Sandia Portals Message Passing - utilities
10 Group: Utilities/System
11 BuildRoot: /var/tmp/portals-%{version}-root
12 Source: http://sandiaportals.org/portals-%{version}.tar.gz
15 Sandia Portals message passing package. Contains kernel modules, libraries and utilities.
17 %package -n portals-modules
18 Summary: Kernel modules and NAL's for portals
19 Group: Development/Kernel
21 %description -n portals-modules
22 Object-Based Disk storage drivers for Linux %{kversion}.
24 %package -n portals-source
25 Summary: Portals kernel source for rebuilding with other kernels
26 Group: Development/Kernel
28 %description -n portals-source
29 Portals kernel source for rebuilding with other kernels
32 %setup -n portals-%{version}
35 rm -rf $RPM_BUILD_ROOT
37 # Create the pristine source directory.
38 srcdir=$RPM_BUILD_ROOT/usr/src/portals-%{version}
40 find . -name CVS -prune -o -print | cpio -ap $srcdir
42 # Set an explicit path to our Linux tree, if we can.
45 test -d $linuxdir && conf_flag=--with-linux=$linuxdir
46 ./configure $conf_flag
50 make install prefix=$RPM_BUILD_ROOT
56 test -d $linuxdir && conf_flag=--with-linux=$linuxdir
58 ./configure --enable-rtscts-myrinet $conf_flag
60 cp linux/rtscts/rtscts.o $RPM_BUILD_ROOT/lib/modules/%{kversion}/kernel/net/portals/rtscts_myrinet.o
61 cp user/myrinet_utils/mcpload $RPM_BUILD_ROOT/usr/sbin/mcpload
66 %attr(-, root, root) %doc COPYING
67 %attr(-, root, root) /usr/sbin/acceptor
68 %attr(-, root, root) /usr/sbin/ptlctl
69 %attr(-, root, root) /usr/sbin/debugctl
71 %attr(-, root, root) /usr/sbin/mcpload
73 %attr(-, root, root) /lib/libmyrnal.a
74 %attr(-, root, root) /lib/libptlapi.a
75 %attr(-, root, root) /lib/libptlctl.a
76 %attr(-, root, root) /lib/libprocbridge.a
77 %attr(-, root, root) /lib/libptllib.a
78 %attr(-, root, root) /lib/libtcpnal.a
79 %attr(-, root, root) /lib/libtcpnalutil.a
80 %attr(-, root, root) /usr/include/portals/*.h
81 %attr(-, root, root) /usr/include/portals/base/*.h
82 %attr(-, root, root) /usr/include/linux/*.h
84 %files -n portals-modules
85 %attr(-, root, root) %doc COPYING
86 %attr(-, root, root) /lib/modules/%{kversion}/kernel/net/portals/portals.o
87 %attr(-, root, root) /lib/modules/%{kversion}/kernel/net/portals/kptlrouter.o
88 %attr(-, root, root) /lib/modules/%{kversion}/kernel/net/portals/kptrxtx.o
90 %attr(-, root, root) /lib/modules/%{kversion}/kernel/net/portals/p3mod.o
91 %attr(-, root, root) /lib/modules/%{kversion}/kernel/net/portals/rtscts.o
93 %attr(-, root, root) /lib/modules/%{kversion}/kernel/net/portals/*nal.o
95 %files -n portals-source
96 %attr(-, root, root) /usr/src/portals-%{version}
99 if [ ! -e /dev/portals ]; then
100 mknod /dev/portals c 10 240
104 grep -q portals /etc/modules.conf || \
105 echo 'alias char-major-10-240 portals' >> /etc/modules.conf
107 grep -q '/dev/portals' /etc/modules.conf || \
108 echo 'alias /dev/portals portals' >> /etc/modules.conf
114 #rm -rf $RPM_BUILD_ROOT