1 %define version @VERSION@
2 %define kversion @LINUXRELEASE@
4 Summary: ldiskfs backend file system
9 Group: Development/Kernel
10 Source: lustre-ldiskfs-%{version}.tar.gz
11 URL: http://www.sun.com/software/products/lustre/index.xml
12 BuildRoot: %{_tmppath}/lustre-ldiskfs-%{version}-root
13 Requires: modutils >= 2.4.10
16 Provides the ldiskfs backend file system kernel module, used by
17 servers in the Lustre file system, for Linux %{kversion}.
26 # if RPM_BUILD_NCPUS unset, set it
27 if [ -z "$RPM_BUILD_NCPUS" ] ; then
28 RPM_BUILD_NCPUS=$(egrep -c "^cpu[0-9]+" /proc/stat 2>/dev/null || echo 0 :)
29 if [ $RPM_BUILD_NCPUS -eq 0 ] ; then
32 if [ $RPM_BUILD_NCPUS -gt 8 ] ; then
37 rm -rf $RPM_BUILD_ROOT
39 # Set an explicit path to our Linux tree, if we can.
40 cd $RPM_BUILD_DIR/lustre-ldiskfs-%{version}
41 ./configure @ac_configure_args@ %{?configure_flags:configure_flags} \
42 --sysconfdir=%{_sysconfdir} \
45 make -j $RPM_BUILD_NCPUS -s
48 make install DESTDIR=$RPM_BUILD_ROOT
51 %attr(-, root, root) /lib/modules/%{kversion}/updates/kernel/fs/lustre-ldiskfs
54 if [ -f /boot/System.map-%{kversion} ]; then
55 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
57 depmod -ae %{kversion} || exit 0
61 if [ -f /boot/System.map-%{kversion} ]; then
62 depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
64 depmod -ae %{kversion} || exit 0
68 rm -rf $RPM_BUILD_ROOT