17 |
|
|
18 |
%{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} |
%{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} |
19 |
|
|
|
# set maximum number of CPUS. Set to 4 to avoid out of memory errors |
|
|
%global _smp_ncpus_max 4 |
|
|
%global _smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\ |
|
|
&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\ |
|
|
ncpus_max=%{?_smp_ncpus_max}; \\\ |
|
|
if [ -n "$ncpus_max" ] && [ "$ncpus_max" -gt 0 ] && [ "$RPM_BUILD_NCPUS" -gt "$ncpus_max" ]; then RPM_BUILD_NCPUS="$ncpus_max"; fi; \\\ |
|
|
if [ "$RPM_BUILD_NCPUS" -gt 1 ]; then echo "-j$RPM_BUILD_NCPUS"; fi) |
|
|
|
|
20 |
# == Node.js Version == |
# == Node.js Version == |
21 |
# Note: Mageia should only ship LTS versions of Node.js (currently expected |
# Note: Mageia should only ship LTS versions of Node.js (currently expected |
22 |
# to be major versions with even numbers). The odd-numbered versions are new |
# to be major versions with even numbers). The odd-numbered versions are new |
31 |
%global nodejs_version %{nodejs_major}.%{nodejs_minor}.%{nodejs_patch} |
%global nodejs_version %{nodejs_major}.%{nodejs_minor}.%{nodejs_patch} |
32 |
%global nodejs_release %{rel} |
%global nodejs_release %{rel} |
33 |
# ensure compatibility with the mass_rebuild bot |
# ensure compatibility with the mass_rebuild bot |
34 |
%define rel 2 |
%define rel 3 |
35 |
|
|
36 |
# == Bundled Dependency Versions == |
# == Bundled Dependency Versions == |
37 |
# v8 - from deps/v8/include/v8-version.h |
# v8 - from deps/v8/include/v8-version.h |
340 |
%ifarch s390 s390x %{arm} %ix86 |
%ifarch s390 s390x %{arm} %ix86 |
341 |
# Decrease debuginfo verbosity to reduce memory consumption during final |
# Decrease debuginfo verbosity to reduce memory consumption during final |
342 |
# library linking |
# library linking |
343 |
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /') |
%global optflags %(echo %{optflags} | sed 's/-g /-gi /') |
344 |
%endif |
%endif |
345 |
|
|
346 |
|
export CC='%{__cc}' |
347 |
|
export CXX='%{__cxx}' |
348 |
|
|
349 |
# build with debugging symbols and add defines from libuv (#892601) |
# build with debugging symbols and add defines from libuv (#892601) |
350 |
# Node's v8 breaks with GCC 6 because of incorrect usage of methods on |
# Node's v8 breaks with GCC 6 because of incorrect usage of methods on |
351 |
# NULL objects. We need to pass -fno-delete-null-pointer-checks |
# NULL objects. We need to pass -fno-delete-null-pointer-checks |
352 |
export CFLAGS='%{optflags} -g \ |
export CFLAGS='%{optflags} \ |
353 |
-D_LARGEFILE_SOURCE \ |
-D_LARGEFILE_SOURCE \ |
354 |
-D_FILE_OFFSET_BITS=64 \ |
-D_FILE_OFFSET_BITS=64 \ |
355 |
-DZLIB_CONST \ |
-DZLIB_CONST \ |
356 |
-fno-delete-null-pointer-checks' |
-fno-delete-null-pointer-checks' |
357 |
export CXXFLAGS='%{optflags} -g \ |
export CXXFLAGS='%{optflags} \ |
358 |
-D_LARGEFILE_SOURCE \ |
-D_LARGEFILE_SOURCE \ |
359 |
-D_FILE_OFFSET_BITS=64 \ |
-D_FILE_OFFSET_BITS=64 \ |
360 |
-DZLIB_CONST \ |
-DZLIB_CONST \ |
363 |
# Explicit new lines in C(XX)FLAGS can break naive build scripts |
# Explicit new lines in C(XX)FLAGS can break naive build scripts |
364 |
export CFLAGS="$(echo ${CFLAGS} | tr '\n\\' ' ')" |
export CFLAGS="$(echo ${CFLAGS} | tr '\n\\' ' ')" |
365 |
export CXXFLAGS="$(echo ${CXXFLAGS} | tr '\n\\' ' ')" |
export CXXFLAGS="$(echo ${CXXFLAGS} | tr '\n\\' ' ')" |
366 |
|
export LDFLAGS="%{build_ldflags}" |
|
#export LDFLAGS="%{build_ldflags}" |
|
367 |
|
|
368 |
#%if ! 0%%{?bootstrap} |
#%if ! 0%%{?bootstrap} |
369 |
%if %{with bootstrap} |
%if %{with bootstrap} |
392 |
--openssl-use-def-ca-store |
--openssl-use-def-ca-store |
393 |
%endif |
%endif |
394 |
|
|
395 |
%__make BUILDTYPE=Release %{_smp_mflags} |
%__make BUILDTYPE=Release %{?_smp_mflags} |
396 |
|
|
397 |
|
|
398 |
%install |
%install |