Whamcloud - gitweb
b=1021,2720
[fs/lustre-release.git] / lustre / scripts / lustre.spec.in
1 # lustre.spec
2 %define version b_size
3 %define kversion @LINUXRELEASE@
4 %define linuxdir @LINUX@
5 %define enable_doc @ENABLE_DOC@
6
7 Summary: Lustre Lite File System
8 Name: lustre-lite
9 Version: %{version}
10 Release: @RELEASE@
11 Copyright: GPL
12 Group: Utilities/System
13 Requires: lustre-modules, PyXML
14 Source: ftp://ftp.lustre.com/pub/lustre/lustre-%{version}.tar.gz
15 BuildRoot: /var/tmp/lustre-%{version}-root
16
17 %description
18 The Lustre Lite Cluster File System: kernel drivers for file system,
19 servers and utilities.
20
21 %package -n lustre-modules
22 Summary: Kernel Lustre drivers for Linux %{kversion}
23 Requires: modutils >= 2.4.10
24 Group: Development/Kernel
25
26 %description -n lustre-modules
27 Lustre file System, server and network drivers for Linux %{kversion}.
28
29 %package -n lustre-source
30 Summary: Object-Based Disk storage driver source
31 Group: Development/Kernel
32
33 %description -n lustre-source
34 Lustre Lite Source for further development
35
36 %package -n lustre-doc
37 Summary: Documentation and sample configuration files
38 Group: Documentation
39 # FIXME: BuildArch overrides all the packages in rpm 4.0.4-7x
40 #BuildArch: noarch
41
42 %description -n lustre-doc
43 Documentation and sample configuration files for Lustre
44
45 %package -n lustre-ldap
46 Summary: Configures openldap server for LDAP Lustre config database
47 Group: Configuration
48 Requires: openldap-servers, openldap-clients, python-ldap, 4Suite
49
50 %description -n lustre-ldap
51 Configures openldap server for LDAP Lustre config database
52
53
54 #%package -n liblustre
55 #Summary: Lustre Lib
56 #Group: Development/Kernel
57
58 #%description -n liblustre
59 #Lustre lib binary package.
60
61 %prep
62 %setup -qn lustre-%{version}
63 #%setup -c -n lustre-%{version}-lib
64 %if %{enable_doc}
65   %define disable_doc ''
66 %else
67   %define disable_doc --disable-doc
68 %endif
69
70 %build
71 rm -rf $RPM_BUILD_ROOT
72
73 # Set an explicit path to our Linux tree, if we can.
74 cd $RPM_BUILD_DIR/lustre-%{version}
75 ./configure --with-linux='%{linuxdir}' %{disable_doc}
76 make
77
78 %install
79 cd $RPM_BUILD_DIR/lustre-%{version}
80 make install prefix=$RPM_BUILD_ROOT
81
82 %ifarch alpha
83 # this hurts me
84   conf_flag=
85   linuxdir=%{linuxdir}
86   test -d $linuxdir && conf_flag=--with-linux=$linuxdir
87   make clean
88   ./configure --enable-rtscts-myrinet $conf_flag %{disable_doc}
89   make
90   cp linux/rtscts/rtscts.o $RPM_BUILD_ROOT/lib/modules/%{kversion}/kernel/net/lustre/rtscts_myrinet.o
91   cp user/myrinet_utils/mcpload $RPM_BUILD_ROOT/usr/sbin/mcpload
92 %endif
93
94 # Create the pristine source directory.
95 cd $RPM_BUILD_DIR/lustre-%{version}
96 mkdir -p $RPM_BUILD_ROOT/usr/src
97 rm -f lustre-source
98 ln -s $RPM_BUILD_ROOT/usr/src lustre-source
99 make distdir distdir=lustre-source/lustre-%{version}
100
101 # ldap database directory
102 mkdir -p $RPM_BUILD_ROOT/var/lib/ldap/lustre
103
104 %files
105 %attr(-, root, root) /sbin/mount.lustre
106 %attr(-, root, root) /usr/sbin/lmc
107 %attr(-, root, root) /usr/sbin/lctl
108 %attr(-, root, root) /usr/sbin/lconf
109 %attr(-, root, root) /usr/sbin/lrun
110 %attr(-, root, root) /usr/sbin/llmount
111 %attr(-, root, root) /usr/sbin/lwizard
112 %attr(-, root, root) /usr/sbin/wiretest
113 %attr(-, root, root) /usr/sbin/lactive
114 %attr(-, root, root) /usr/sbin/llanalyze
115 %attr(-, root, root) /usr/sbin/gmnalnid
116 %attr(-, root, root) /usr/sbin/llstat.pl
117 %attr(-, root, root) /usr/sbin/llobdstat.pl
118 %attr(-, root, root) /usr/sbin/load_ldap.sh
119 %attr(-, root, root) /usr/sbin/acceptor
120 %attr(-, root, root) /usr/sbin/ptlctl
121 %attr(-, root, root) /usr/sbin/debugctl
122 %attr(-, root, root) /usr/sbin/lload
123 %attr(-, root, root) /usr/sbin/obdbarrier
124 %attr(-, root, root) /usr/sbin/obdio
125 %attr(-, root, root) /usr/sbin/routerstat
126 %attr(-, root, root) /usr/sbin/wirecheck
127 %attr(-, root, root) /usr/bin/lfs
128 %attr(-, root, root) /usr/bin/lfind
129 %attr(-, root, root) /usr/bin/lstripe
130 %attr(-, root, root) /usr/bin/mcreate
131 %attr(-, root, root) /usr/bin/munlink
132 %attr(-, root, root) /usr/bin/mkdirmany
133 %attr(-, root, root) /usr/bin/iopentest1
134 %attr(-, root, root) /usr/bin/iopentest2
135 %attr(-, root, root) /usr/lib/lustre/python/*
136 %attr(-, root, root) /usr/lib/lustre/examples/llmount.sh
137 %attr(-, root, root) /usr/lib/lustre/examples/llmountcleanup.sh
138 %attr(-, root, root) /usr/lib/lustre/examples/llecho.sh
139 %attr(-, root, root) /usr/lib/lustre/examples/local.sh
140 %attr(-, root, root) /usr/lib/lustre/examples/uml.sh
141 %attr(-, root, root) /usr/lib/lustre/examples/lov.sh
142 %attr(-, root, root) /usr/lib/lustre/examples/echo.sh
143 %attr(-, root, root) /usr/lib/lustre/examples/llechocleanup.sh
144
145 %attr(-, root, root) /etc/init.d/lustre
146 %attr(-, root, root) /lib/libptlctl.a
147 %attr(-, root, root) /lib/liblustreapi.a
148 %attr(-, root, root) /usr/include/lustre/*.h
149
150 %ifarch alpha
151 %attr(-, root, root) /usr/sbin/mcpload
152 %endif
153
154 %files -n lustre-doc
155 %attr(-, root, root) %doc COPYING FDL
156 %if %{enable_doc}
157 %attr(-, root, root) %doc doc/lustre.pdf doc/lustre-HOWTO.txt
158 %endif
159 #%attr(-, root, root) %doc tests/client-echo.cfg tests/client-mount.cfg
160 #%attr(-, root, root) %doc tests/client-mount2.cfg
161 #%attr(-, root, root) %doc tests/elan-client.cfg tests/elan-server.cfg
162 #%attr(-, root, root) %doc tests/ldlm.cfg tests/lustre.cfg
163 #%attr(-, root, root) %doc tests/mds.cfg tests/net-client.cfg
164 #%attr(-, root, root) %doc tests/net-local.cfg tests/net-server.cfg
165 #%attr(-, root, root) %doc tests/obdecho.cfg tests/obdfilter.cfg
166
167 %files -n lustre-modules
168 %attr(-, root, root) %doc COPYING
169 %attr(-, root, root) /lib/modules/%{kversion}/kernel/fs/lustre/*.o
170 #portals modules
171 %attr(-, root, root) /lib/modules/%{kversion}/kernel/net/lustre/*.o
172
173 %files -n lustre-source
174 %attr(-, root, root) /usr/src/lustre-%{version}
175
176 #%ifarch i386
177 #%files -n liblustre
178 #%attr(-, root, root) /lib/lustre
179 #%attr(-, root, root) /lib/lustre/liblov.a
180 #%attr(-, root, root) /lib/lustre/liblustreclass.a
181 #%attr(-, root, root) /lib/lustre/libptlrpc.a
182 #%attr(-, root, root) /lib/lustre/libobdecho.a
183 #%attr(-, root, root) /lib/lustre/libldlm.a
184 #%attr(-, root, root) /lib/lustre/libosc.a
185 #%attr(-, root, root) /usr/sbin/lctl
186 #%attr(-, root, root) /usr/sbin/lfind
187 #%attr(-, root, root) /usr/sbin/lstripe
188 #%attr(-, root, root) /usr/sbin/obdio
189 #%attr(-, root, root) /usr/sbin/obdbarrier
190 #%attr(-, root, root) /usr/sbin/obdstat
191 #%attr(-, root, root) /usr/sbin/lload
192 #%attr(-, root, root) /usr/sbin/lconf
193 #%attr(-, root, root) /usr/sbin/lmc
194 #%attr(-, root, root) /usr/sbin/llanalyze
195 #%endif
196
197
198 %files -n lustre-ldap
199 %attr(-, root, root) /etc/openldap/slapd-lustre.conf
200 %attr(-, root, root) /etc/openldap/schema/lustre.schema
201 %attr(-, root, root) /usr/lib/lustre/lustre2ldif.xsl
202 %attr(-, root, root) /usr/lib/lustre/top.ldif
203 #%dir /var/lib/ldap/lustre
204 %attr(700, ldap, ldap) /var/lib/ldap/lustre
205
206 %post -n lustre-modules
207 if [ ! -e /dev/obd ]; then
208    mknod /dev/obd c 10 241
209 fi
210 if [ ! -e /dev/portals ]; then
211    mknod /dev/portals c 10 240
212 fi
213 depmod -ae || exit 0
214
215 %postun -n lustre-modules
216 depmod -ae || exit 0
217
218 %clean
219 #rm -rf $RPM_BUILD_ROOT
220
221 # end of file