Name: ninja-build Version: 1.12.1 Release: 1 Summary: A small build system with a focus on speed License: Apache-2.0 URL: https://ninja-build.org/ Source0: https://github.com/ninja-build/ninja/archive/v%{version}/ninja-%{version}.tar.gz Source1: ninja.vim Source2: macros.ninja BuildRequires: gcc-c++ python3-devel asciidoc gtest-devel cmake Requires: emacs-filesystem vim-filesystem %description Ninja is a small build system with a focus on speed. It differs from other build systems in two major respects: it is designed to have its input files generated by a higher-level build system, and it is designed to run builds as fast as possible. %package -n python3-ninja Summary: Python metadata for packages depending on ninja Requires: %{name} = %{version}-%{release} BuildArch: noarch %description -n python3-ninja Package provides metadata only for Python packages depending on ninja. This is to make automatic dependency resolution work. The package is NOT using anything from the PyPI package called ninja. %prep %autosetup -n ninja-%{version} -p1 %build %set_build_flags %{__python3} configure.py --bootstrap --verbose ./ninja -v all ./ninja -v manual # For testing with the ninja we just built, we need to add current # directory to PATH, otherwise CMake fails to find the ninja binary. PATH=$(pwd):"$PATH" %cmake \ -G Ninja \ -B cmake-build \ -DCMAKE_BUILD_TYPE=Release ./ninja -C cmake-build ninja_test # Provide Python metadata %global ninja_distinfo ninja-%{version}.dist-info mkdir %{ninja_distinfo} cat > %{ninja_distinfo}/METADATA << EOF Metadata-Version: 2.1 Name: ninja Version: %{version} Summary: %{summary} Description-Content-Type: text/plain Metadata only package for automatic dependency resolution in the RPM ecosystem. This package is separate from the PyPI package called ninja. EOF echo rpm > %{ninja_distinfo}/INSTALLER %install install -Dpm0755 ninja -t %{buildroot}%{_bindir}/ install -Dpm0644 misc/bash-completion %{buildroot}%{_datadir}/bash-completion/completions/ninja install -Dpm0644 misc/ninja-mode.el %{buildroot}%{_datadir}/emacs/site-lisp/ninja-mode.el install -Dpm0644 misc/ninja.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax/ninja.vim install -Dpm0644 %{S:1} %{buildroot}%{_datadir}/vim/vimfiles/ftdetect/ninja.vim install -Dpm0644 misc/zsh-completion %{buildroot}%{_datadir}/zsh/site-functions/_ninja install -Dpm0644 misc/ninja_syntax.py %{buildroot}%{python3_sitelib}/ninja_syntax.py install -Dpm0644 %{S:2} %{buildroot}%{rpmmacrodir}/macros.ninja sed -i -e "/^%%__ninja /s| .*$| %{_bindir}/ninja|" %{buildroot}%{rpmmacrodir}/macros.ninja ln -sf ninja %{buildroot}%{_bindir}/ninja-build # Install Python metadata cp -a %{ninja_distinfo} %{buildroot}%{python3_sitelib} %check ./cmake-build/ninja_test %files %license COPYING %doc README.md doc/manual.html %{_bindir}/ninja %{_bindir}/ninja-build %{_datadir}/bash-completion/completions/ninja %{_datadir}/emacs/site-lisp/ninja-mode.el %{_datadir}/vim/vimfiles/syntax/ninja.vim %{_datadir}/vim/vimfiles/ftdetect/ninja.vim %dir %{_datadir}/zsh %dir %{_datadir}/zsh/site-functions %{_datadir}/zsh/site-functions/_ninja %{python3_sitelib}/ninja_syntax.py %{python3_sitelib}/__pycache__/ninja_syntax*.pyc %{rpmmacrodir}/macros.ninja %files -n python3-ninja %{python3_sitelib}/%{ninja_distinfo} %changelog * Thu Jul 11 2024 Funda Wang - 1.12.1-1 - upgrade version to 1.12.1 - Add python3-ninja sub package providing metadata for Python packages depending on ninja to facilitate automatic dependency resolution. * Wed Nov 23 2022 hua - 1.11.1-1 - upgrade version to 1.11.1 * Wed Jun 15 2022 duyiwei - 1.10.2-1 - upgrade version to 1.10.2 * Tue Oct 27 2020 Ge Wang - 1.8.2-9 - remove useless buildrequires of python2-devel * Fri Jan 17 2020 zhouyihang - 1.8.2-8 - remove useless file and update invalid source address * Sun Jan 12 2020 chengquan - 1.8.2-7 - remove useless buildrequires of software * Mon Nov 04 2019 huzhiyu - 1.8.2-6 - Package init