Whamcloud - gitweb
Branch b_head_libcfs
[fs/lustre-release.git] / lustre.spec.in
index 8f90e01..87f7d33 100644 (file)
@@ -124,6 +124,7 @@ mkdir -p $RPM_BUILD_ROOT/usr/src
 rm -f lustre-source
 ln -s $RPM_BUILD_ROOT/usr/src lustre-source
 make distdir distdir=lustre-source/lustre-%{version}
+chmod -R go-w lustre-source/lustre-%{version}
 
 cat >lustre.files <<EOF
 %attr(-, root, root) /sbin/mount.lustre
@@ -141,6 +142,10 @@ cat >lustre.files <<EOF
 %attr(-, root, root) %{_libdir}/lustre/lc_common
 EOF
 
+if [ -f $RPM_BUILD_ROOT%{_libdir}/libcfsutil.a ] ; then
+  echo '%attr(-, root, root) %{_libdir}/libcfsutil.a' >>lustre.files
+fi
+
 if [ -f $RPM_BUILD_ROOT%{_libdir}/liblustre.so ] ; then
   echo '%attr(-, root, root) %{_libdir}/liblustre.a' >>lustre.files
   echo '%attr(-, root, root) %{_libdir}/liblustre.so' >>lustre.files
@@ -217,7 +222,6 @@ do
        fi
 done
 
-
 %postun modules
 if [ -f /boot/System.map-%{kversion} ]; then
        depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
@@ -225,5 +229,19 @@ else
        depmod -ae %{kversion} || exit 0
 fi
 
+%post tests
+if [ -f /boot/System.map-%{kversion} ]; then
+       depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
+else
+       depmod -ae %{kversion} || exit 0
+fi
+
+%postun tests
+if [ -f /boot/System.map-%{kversion} ]; then
+       depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
+else
+       depmod -ae %{kversion} || exit 0
+fi
+
 %clean
 rm -rf $RPM_BUILD_ROOT