Whamcloud - gitweb
land b_md onto HEAD. the highlights:
[fs/lustre-release.git] / lustre / scripts / lustre.spec.in
1 # lustre.spec
2 %define version HEAD
3 %define kversion @RELEASE@
4 %define linuxdir @LINUX@
5 %define portalsdir @PORTALS@
6 %define portalslibdir @PORTALSLIB@
7 Release: 0208282230chaos
8
9 Summary: Lustre Lite File System
10 Name: lustre-lite
11 Version: %{version}
12 Copyright: GPL
13 Group: Utilities/System
14 Requires: lustre-modules, PyXML
15 BuildRoot: /var/tmp/lustre-%{version}-root
16 Source: ftp://ftp.lustre.com/pub/lustre/lustre-%{version}.tar.gz
17
18 %description
19 The Lustre Lite Cluster File System: kernel drivers for file system,
20 servers and utilities.
21
22 %package -n lustre-modules
23 Summary: Kernel Lustre drivers for Linux %{kversion}
24 Requires: portals-modules
25 Group: Development/Kernel
26
27 %description -n lustre-modules
28 Lustre file System, server and network drivers for Linux %{kversion}.
29
30 %package -n lustre-source
31 Summary: Object-Based Disk storage driver source
32 Group: Development/Kernel
33
34 %description -n lustre-source
35 Lustre Lite Source for further development
36
37 %package -n lustre-doc
38 Summary: Documentation and sample configuration files
39 Group: Documentation
40 # FIXME: BuildArch overrides all the packages in rpm 4.0.4-7x
41 #BuildArch: noarch
42
43 %description -n lustre-doc
44 Documentation and sample configuration files for Lustre
45
46 %prep
47 %setup -qn lustre-%{version}
48
49 %build
50 rm -rf $RPM_BUILD_ROOT
51
52 # Set an explicit path to our Linux tree, if we can.
53 ./configure --with-linux='%{linuxdir}' --with-portals='%{portalsdir}' --with-portalslib='%{portalslibdir}'
54 make
55
56 %install
57 make install prefix=$RPM_BUILD_ROOT
58
59 # Create the pristine source directory.
60 mkdir -p $RPM_BUILD_ROOT/usr/src
61 rm -f lustre-source
62 ln -s $RPM_BUILD_ROOT/usr/src lustre-source
63 make distdir distdir=lustre-source/lustre-%{version}
64
65 %files
66 %attr(-, root, root) /usr/sbin/lmc
67 %attr(-, root, root) /usr/sbin/lctl
68 %attr(-, root, root) /usr/sbin/lconf
69 %attr(-, root, root) /usr/lib/lustre/examples/llmount.sh
70 %attr(-, root, root) /usr/lib/lustre/examples/llmountcleanup.sh
71 %attr(-, root, root) /usr/lib/lustre/examples/llecho.sh
72 %attr(-, root, root) /usr/lib/lustre/examples/local.sh
73 %attr(-, root, root) /usr/lib/lustre/examples/uml.sh
74 %attr(-, root, root) /usr/lib/lustre/examples/lov.sh
75 %attr(-, root, root) /etc/init.d/lustre
76
77 %files -n lustre-doc
78 %attr(-, root, root) %doc COPYING FDL
79 %attr(-, root, root) %doc doc/lustre.pdf doc/lustre-HOWTO.txt
80 %attr(-, root, root) %doc tests/client-echo.cfg tests/client-mount.cfg
81 %attr(-, root, root) %doc tests/client-mount2.cfg
82 %attr(-, root, root) %doc tests/elan-client.cfg tests/elan-server.cfg
83 %attr(-, root, root) %doc tests/ldlm.cfg tests/lustre.cfg
84 %attr(-, root, root) %doc tests/mds.cfg tests/net-client.cfg
85 %attr(-, root, root) %doc tests/net-local.cfg tests/net-server.cfg
86 %attr(-, root, root) %doc tests/obdecho.cfg tests/obdfilter.cfg
87
88 %files -n lustre-modules
89 %attr(-, root, root) %doc COPYING
90 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/extN.o
91 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/ldlm.o
92 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/llite.o
93 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/mdc.o
94 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/mds.o
95 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/fsfilt_extN.o
96 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/obdclass.o
97 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/obdecho.o
98 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/obdfilter.o
99 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/lov.o
100 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/osc.o
101 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/ost.o
102 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/ptlrpc.o
103
104 %files -n lustre-source
105 %attr(-, root, root) /usr/src/lustre-%{version}
106
107 %post
108 if [ ! -e /dev/obd ]; then
109    mknod /dev/obd c 10 241
110 fi
111 depmod -ae || exit 0
112
113 grep -q obdclass /etc/modules.conf || \
114         echo 'alias char-major-10-241 obdclass' >> /etc/modules.conf
115
116 grep -q '/dev/obd' /etc/modules.conf || \
117         echo 'alias /dev/obd obdclass' >> /etc/modules.conf
118
119 grep -q '/dev/lustre' /etc/modules.conf || \
120         echo 'alias /dev/lustre obdclass' >> /etc/modules.conf
121
122 %postun
123 depmod -ae || exit 0
124
125 %clean
126 #rm -rf $RPM_BUILD_ROOT
127
128 # end of file