[packages/ninja] - provide ninja rpm macros with the ninja package, rel 2
baggins
baggins at pld-linux.org
Mon Feb 3 10:18:10 CET 2025
commit d9fb602fc40d74c14ae695a7bc77d0c5397f4cff
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Mon Feb 3 10:08:24 2025 +0100
- provide ninja rpm macros with the ninja package, rel 2
macros.ninja | 11 +++++++++++
ninja.spec | 7 ++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
---
diff --git a/ninja.spec b/ninja.spec
index 617d8a6..448c4bb 100644
--- a/ninja.spec
+++ b/ninja.spec
@@ -7,12 +7,13 @@ Summary: A small build system with a focus on speed
Summary(pl.UTF-8): Mały system budowania ukierunkowany na szybkość
Name: ninja
Version: 1.12.1
-Release: 1
+Release: 2
License: Apache v2.0
Group: Development/Tools
#Source0Download: https://github.com/ninja-build/ninja/releases
Source0: https://github.com/ninja-build/ninja/archive/v%{version}/%{name}-%{version}.tar.gz
# Source0-md5: 6288992b05e593a391599692e2f7e490
+Source1: macros.ninja
URL: http://ninja-build.org/
%{?with_doc:BuildRequires: asciidoc}
BuildRequires: libstdc++-devel >= 6:4.8.1
@@ -116,6 +117,9 @@ install -d $RPM_BUILD_ROOT%{_bindir}
install -p %{name} $RPM_BUILD_ROOT%{_bindir}
# TODO: Install ninja_syntax.py as python module?
+install -d $RPM_BUILD_ROOT%{_rpmmacrodir}
+%{__sed} -e 's|@BINDIR@|%{_bindir}|' %{SOURCE1} > $RPM_BUILD_ROOT%{_rpmmacrodir}/macros.ninja
+
install -d $RPM_BUILD_ROOT%{bash_compdir}
cp -p misc/bash-completion $RPM_BUILD_ROOT%{bash_compdir}/%{name}
@@ -132,6 +136,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%doc README.md
%attr(755,root,root) %{_bindir}/ninja
+%{_rpmmacrodir}/macros.ninja
%if %{with doc}
%files doc
diff --git a/macros.ninja b/macros.ninja
new file mode 100644
index 0000000..1a69c57
--- /dev/null
+++ b/macros.ninja
@@ -0,0 +1,11 @@
+%__ninja @BINDIR@/ninja
+%__ninja_common_opts -v %{?_smp_mflags}
+
+%ninja_build \
+ LC_ALL=C.UTF-8 %{__ninja} %{__ninja_common_opts}
+
+%ninja_install \
+ LC_ALL=C.UTF-8 DESTDIR=%{buildroot} %{__ninja} install %{__ninja_common_opts}
+
+%ninja_test \
+ LC_ALL=C.UTF-8 %{__ninja} test %{__ninja_common_opts}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ninja.git/commitdiff/d9fb602fc40d74c14ae695a7bc77d0c5397f4cff
More information about the pld-cvs-commit
mailing list