aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/rpm
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2018-04-10 16:11:46 +0200
committerAnders Broman <a.broman58@gmail.com>2018-04-11 00:11:22 +0000
commit0b7c6f03b0f1c2737a16b68c9f689e373bd83b80 (patch)
tree43beac11dd7552ae6a6e343648e5f44fbd5ed6e2 /packaging/rpm
parent64f75a4ede58afd3941782f30a73243b9d204071 (diff)
RPM: support multiple ninja executables.
Support ninja and ninja-build (Centos7) so far. Change-Id: I846a0645f24f6cfdc83bd725827d1681a5a1f174 Reviewed-on: https://code.wireshark.org/review/26856 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'packaging/rpm')
-rw-r--r--packaging/rpm/wireshark.spec.in10
1 files changed, 7 insertions, 3 deletions
diff --git a/packaging/rpm/wireshark.spec.in b/packaging/rpm/wireshark.spec.in
index eec0f9b80a..455a94ab1a 100644
--- a/packaging/rpm/wireshark.spec.in
+++ b/packaging/rpm/wireshark.spec.in
@@ -261,7 +261,11 @@ Requires: libmaxminddb
.
%if %{with ninja}
-ninja
+NINJA=$(which ninja || which ninja-build)
+%endif
+
+%if %{with ninja}
+$NINJA
%else
# Suggestion: put this in your ~/.rpmmacros (without the hash sign, of course):
# %_smp_mflags -j %(grep -c processor /proc/cpuinfo)
@@ -271,8 +275,8 @@ make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
%if %{with ninja}
-DESTDIR=$RPM_BUILD_ROOT ninja install
-DESTDIR=$RPM_BUILD_ROOT ninja install_guides
+DESTDIR=$RPM_BUILD_ROOT $NINJA install
+DESTDIR=$RPM_BUILD_ROOT $NINJA install_guides
%else
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=$RPM_BUILD_ROOT install_guides