diff --git a/macros.ninja b/macros.ninja new file mode 100644 index 0000000..9ca7b4c --- /dev/null +++ b/macros.ninja @@ -0,0 +1,12 @@ +%__ninja %{_bindir}/ninja +%__ninja_common_opts -v %{?_smp_mflags} + +%ninja_build \ + %{__ninja} %{__ninja_common_opts} + +%ninja_install \ + DESTDIR=%{buildroot} %{__ninja} install %{__ninja_common_opts} + +%ninja_test \ + %{__ninja} test %{__ninja_common_opts} + diff --git a/ninja.changes b/ninja.changes index 88503f6..581d14f 100644 --- a/ninja.changes +++ b/ninja.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Dec 6 14:07:36 UTC 2016 - badshah400@gmail.com + +- Add macros.ninja as an external source file and install it to + the %{_rpmconfigdir}/macros.d/; this installs macros for RPM + that are in turn used by the RPM macros for meson. + ------------------------------------------------------------------- Sun Nov 13 11:08:00 UTC 2016 - mpluskal@suse.com diff --git a/ninja.spec b/ninja.spec index 066c7a3..153b6cb 100644 --- a/ninja.spec +++ b/ninja.spec @@ -24,6 +24,7 @@ License: Apache-2.0 Group: Development/Tools/Building Url: https://ninja-build.org/ Source0: https://github.com/ninja-build/ninja/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source1: macros.ninja Patch1: ninja-disable-maxprocs-test.patch BuildRequires: gcc-c++ %if 0%{?suse_version} <= 1110 @@ -57,6 +58,7 @@ install -D -p -m 0755 ninja %{buildroot}%{_bindir}/ninja install -D -p -m 0644 misc/zsh-completion %{buildroot}%{_datadir}/zsh/site-functions/_ninja install -D -p -m 0644 misc/ninja.vim %{buildroot}%{_datadir}/vim/site/syntax/ninja.vim install -D -p -m 0644 misc/bash-completion %{buildroot}%{_sysconfdir}/bash_completion.d/ninja +install -D -p -m 0644 %{S:1} %{buildroot}%{_rpmconfigdir}/macros.d/macros.ninja %check ./ninja ninja_test @@ -69,5 +71,6 @@ install -D -p -m 0644 misc/bash-completion %{buildroot}%{_sysconfdir}/bash_compl %{_datadir}/zsh %{_datadir}/vim %{_sysconfdir}/bash_completion.d +%{_rpmconfigdir}/macros.d/macros.ninja %changelog