Add %with_debug variable to spec file

The debug build is not supported on all architectures.
This commit is contained in:
Stephen Gallagher 2015-12-04 11:31:37 -05:00
parent 0b2b9b17d5
commit 34eeb41274

View file

@ -1,6 +1,14 @@
%global with_debug 1
# ARM builds currently break on the Debug builds, so we'll just
# build the standard runtime until that gets sorted out.
%ifarch %{arm} aarch64 %{power64}
%global with_debug 0
%endif
Name: nodejs Name: nodejs
Version: 4.2.3 Version: 4.2.3
Release: 1%{?dist} Release: 2%{?dist}
Summary: JavaScript runtime Summary: JavaScript runtime
License: MIT and ASL 2.0 and ISC and BSD License: MIT and ASL 2.0 and ISC and BSD
Group: Development/Languages Group: Development/Languages
@ -131,12 +139,10 @@ export CXXFLAGS='%{optflags} -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
--without-npm \ --without-npm \
--without-dtrace --without-dtrace
%ifnarch %{arm} %if %{?with_debug} == 1
# Setting BUILDTYPE=Debug builds both release and debug binaries # Setting BUILDTYPE=Debug builds both release and debug binaries
make BUILDTYPE=Debug %{?_smp_mflags} make BUILDTYPE=Debug %{?_smp_mflags}
%else %else
# ARM builds currently break on the Debug builds, so we'll just
# build the standard runtime until that gets sorted out.
make BUILDTYPE=Release %{?_smp_mflags} make BUILDTYPE=Release %{?_smp_mflags}
%endif %endif
@ -151,7 +157,7 @@ rm -rf %{buildroot}/%{_prefix}/lib/dtrace
# Set the binary permissions properly # Set the binary permissions properly
chmod 0755 %{buildroot}/%{_bindir}/node chmod 0755 %{buildroot}/%{_bindir}/node
%ifnarch %{arm} %if %{?with_debug} == 1
# Install the debug binary and set its permissions # Install the debug binary and set its permissions
install -Dpm0755 out/Debug/node %{buildroot}/%{_bindir}/node_g install -Dpm0755 out/Debug/node %{buildroot}/%{_bindir}/node_g
%endif %endif
@ -197,7 +203,7 @@ mv %{buildroot}/%{_datadir}/doc/node/gdbinit %{buildroot}/%{_pkgdocdir}/gdbinit
%doc ROADMAP.md WORKING_GROUPS.md %doc ROADMAP.md WORKING_GROUPS.md
%files devel %files devel
%ifnarch %{arm} %if %{?with_debug} == 1
%{_bindir}/node_g %{_bindir}/node_g
%endif %endif
%{_includedir}/node %{_includedir}/node
@ -209,6 +215,10 @@ mv %{buildroot}/%{_datadir}/doc/node/gdbinit %{buildroot}/%{_pkgdocdir}/gdbinit
%{_pkgdocdir}/html %{_pkgdocdir}/html
%changelog %changelog
* Fri Dec 04 2015 Stephen Gallagher <sgallagh@redhat.com> 4.2.3-2
- Add %%with_debug variable to spec file
The debug build is not supported on all architectures.
* Fri Dec 04 2015 Stephen Gallagher <sgallagh@redhat.com> 4.2.3-1 * Fri Dec 04 2015 Stephen Gallagher <sgallagh@redhat.com> 4.2.3-1
- New upstream security release 4.2.3 - New upstream security release 4.2.3
- https://github.com/nodejs/node/blob/v4.2.3/CHANGELOG.md - https://github.com/nodejs/node/blob/v4.2.3/CHANGELOG.md