Whamcloud - gitweb
b=24092 build src.rpm for lustre if requested
[fs/lustre-release.git] / build / lbuild
index fd97a12..f18a5a3 100755 (executable)
@@ -869,6 +869,20 @@ build_lustre() {
         --define "_topdir $TOPDIR" 2>&1 || \
         fatal 1 "Error building rpms for $BUILD_ARCHS."
 
+    if $DO_SRC; then
+        if ! $RPMBUILD -ts "$LUSTRE" \
+                 ${is_patchless:+--define "lustre_name lustre-client"} \
+                 ${lustre_tests:+--define "build_lustre_tests 0"} \
+                 ${FIND_REQUIRES:+--define "__find_requires $FIND_REQUIRES"} \
+                 --define "configure_args $confoptions ${CONFIGURE_FLAGS}" \
+                 --define "kdir $linux" \
+                 ${linuxobj:+--define "kobjdir $linuxobj"} \
+                 --define "_tmppath $TMPDIR" \
+                 --define "_topdir $TOPDIR" 2>&1; then
+            popd
+            return 255
+        fi
+    fi
     popd >/dev/null
 
 }