SHA256
1
0
forked from pool/coq

- Adjust number of jobs manually.

OBS-URL: https://build.opensuse.org/package/show/science/coq?expand=0&rev=4
This commit is contained in:
Aaron Puchert 2019-09-25 21:30:35 +00:00 committed by Git OBS Bridge
parent a6698df172
commit ded928ac6b

View File

@ -86,10 +86,12 @@ export CFLAGS='%{optflags}'
-natdynlink yes \
-browser "xdg-open %s"
# Prevent OOM by limiting the number of threads.
%define _smp_ncpus_max %(awk '/MemAvailable/ { print int($2 / 750000) }' /proc/meminfo)
jobs=%{_smp_build_ncpus}
max_jobs=$(awk '/MemAvailable/ { print int($2 / 1750000) }' /proc/meminfo)
test $max_jobs -lt $jobs && jobs="$max_jobs" && \
echo "Warning: Reducing number of jobs to $max_jobs because of memory limits"
make %{?_smp_mflags} world
make -j $jobs world
%install
make COQINSTALLPREFIX=%{buildroot} install