%define version HEAD
%define kversion @LINUXRELEASE@
%define linuxdir @LINUX@
+%define enable_doc @ENABLE_DOC@
Summary: Lustre Lite File System
Name: lustre-lite
%prep
%setup -qn lustre-%{version}
#%setup -c -n lustre-%{version}-lib
+%if %{enable_doc}
+ %define disable_doc ''
+%else
+ %define disable_doc --disable-doc
+%endif
%build
rm -rf $RPM_BUILD_ROOT
# Set an explicit path to our Linux tree, if we can.
cd $RPM_BUILD_DIR/lustre-%{version}
-./configure --with-linux='%{linuxdir}'
+./configure --with-linux='%{linuxdir}' %{disable_doc}
make
%install
linuxdir=%{linuxdir}
test -d $linuxdir && conf_flag=--with-linux=$linuxdir
make clean
- ./configure --enable-rtscts-myrinet $conf_flag
+ ./configure --enable-rtscts-myrinet $conf_flag %{disable_doc}
make
cp linux/rtscts/rtscts.o $RPM_BUILD_ROOT/lib/modules/%{kversion}/kernel/net/lustre/rtscts_myrinet.o
cp user/myrinet_utils/mcpload $RPM_BUILD_ROOT/usr/sbin/mcpload
%attr(-, root, root) /usr/sbin/lmc
%attr(-, root, root) /usr/sbin/lctl
%attr(-, root, root) /usr/sbin/lconf
+%attr(-, root, root) /usr/sbin/lrun
+%attr(-, root, root) /usr/sbin/llmount
%attr(-, root, root) /usr/sbin/lwizard
%attr(-, root, root) /usr/sbin/wiretest
%attr(-, root, root) /usr/sbin/lactive
%attr(-, root, root) /usr/bin/mcreate
%attr(-, root, root) /usr/bin/munlink
%attr(-, root, root) /usr/bin/mkdirmany
+%attr(-, root, root) /usr/bin/iopentest1
+%attr(-, root, root) /usr/bin/iopentest2
%attr(-, root, root) /usr/sbin/llstat.pl
%attr(-, root, root) /usr/sbin/llobdstat.pl
%attr(-, root, root) /usr/sbin/load_ldap.sh
%files -n lustre-doc
%attr(-, root, root) %doc COPYING FDL
+%if %{enable_doc}
%attr(-, root, root) %doc doc/lustre.pdf doc/lustre-HOWTO.txt
+%endif
#%attr(-, root, root) %doc tests/client-echo.cfg tests/client-mount.cfg
#%attr(-, root, root) %doc tests/client-mount2.cfg
#%attr(-, root, root) %doc tests/elan-client.cfg tests/elan-server.cfg
#%dir /var/lib/ldap/lustre
%attr(700, ldap, ldap) /var/lib/ldap/lustre
-%post
+%post -n lustre-modules
if [ ! -e /dev/obd ]; then
mknod /dev/obd c 10 241
fi
fi
depmod -ae || exit 0
-#grep -q obdclass /etc/modules.conf || \
-# echo 'alias char-major-10-241 obdclass' >> /etc/modules.conf
-
-#grep -q '/dev/obd' /etc/modules.conf || \
-# echo 'alias /dev/obd obdclass' >> /etc/modules.conf
-
-#grep -q '/dev/lustre' /etc/modules.conf || \
-# echo 'alias /dev/lustre obdclass' >> /etc/modules.conf
-
-#grep -q portals /etc/modules.conf || \
-# echo 'alias char-major-10-240 portals' >> /etc/modules.conf
-
-#grep -q '/dev/portals' /etc/modules.conf || \
-# echo 'alias /dev/portals portals' >> /etc/modules.conf
-
-%postun
+%postun -n lustre-modules
depmod -ae || exit 0
-%post -n lustre-ldap
-if ! grep -q slapd-lustre /etc/openldap/slapd.conf; then
- echo "include /etc/openldap/slapd-lustre.conf" >> /etc/openldap/slapd.conf
-fi
-
-%postun -n lustre-ldap
-slapd=/etc/openldap/slapd.conf
-if grep -q slapd-lustre $slapd; then
- tmp=/tmp/lustre-ldap.$$
- sed "/slapd-lustre/d" $slapd >> $tmp
- cp $tmp $slapd
- rm $tmp
-fi
-
%clean
#rm -rf $RPM_BUILD_ROOT