%bcond_without tcmalloc
%bcond_without libs_compat
+# suse OBS build hosts are memory-limited
+%if 0%{?jobs} > 6
+ %define jobs 6
+%endif
+
%if (0%{?el5} || (0%{?rhel_version} >= 500 && 0%{?rhel_version} <= 600))
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
sed -i -e "s/-lcurses/-lncurses/g" src/java/Makefile
%endif
-make -j$(getconf _NPROCESSORS_ONLN)
+# Set default jobs
+MAKE_JOBS=$(getconf _NPROCESSORS_ONLN)
+# suse OBS build hosts are memory-limited
+%if 0%{defined jobs}
+ MAKE_JOBS=0%{?jobs}
+%endif
+make -j${MAKE_JOBS}
+
%if 0%{with tests}