Blame SPECS/ninja-build.spec

921f61
# Set to bcond_without or use --with bootstrap,
921f61
# when bootstrapping a new architecture.
921f61
%bcond_with bootstrap
921f61
0782da
Name:           ninja-build
921f61
Version:        1.12.1
921f61
Release:        3%{?dist}
921f61
Summary:        Small build system with a focus on speed
921f61
License:        Apache-2.0
921f61
URL:            https://ninja-build.org/
921f61
Source0:        https://github.com/ninja-build/ninja/archive/v%{version}/ninja-%{version}.tar.gz
0782da
Source1:        ninja.vim
0782da
Source2:        macros.ninja
0782da
BuildRequires:  gcc-c++
0782da
BuildRequires:  python3-devel
921f61
%if %{without bootstrap}
0782da
BuildRequires:  asciidoc
0782da
BuildRequires:  gtest-devel
921f61
BuildRequires:  cmake
921f61
%endif
921f61
%if !0%{?rhel}
0782da
BuildRequires:  re2c >= 0.11.3
921f61
%endif
921f61
%if %{without bootstrap}
0782da
Requires:       emacs-filesystem
0782da
Requires:       vim-filesystem
921f61
%endif
0782da
0782da
%description
0782da
Ninja is a small build system with a focus on speed. It differs from other
0782da
build systems in two major respects: it is designed to have its input files
0782da
generated by a higher-level build system, and it is designed to run builds as
0782da
fast as possible.
0782da
921f61
%package -n python3-ninja
921f61
Summary:        Python metadata for packages depending on ninja
921f61
Requires:       %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
921f61
BuildArch:      noarch
921f61
921f61
%description -n python3-ninja
921f61
Package provides metadata only for Python packages depending on ninja.
921f61
This is to make automatic dependency resolution work. The package is NOT
921f61
using anything from the PyPI package called ninja.
921f61
0782da
%prep
0782da
%autosetup -n ninja-%{version} -p1
0782da
0782da
%build
921f61
%set_build_flags
921f61
%python3 configure.py --bootstrap --verbose
0782da
./ninja -v all
921f61
%if %{without bootstrap}
0782da
./ninja -v manual
921f61
# For testing with the ninja we just built, we need to add current
921f61
# directory to PATH, otherwise CMake fails to find the ninja binary.
921f61
PATH=$(pwd):"$PATH" %cmake \
921f61
  -G Ninja \
921f61
  -B cmake-build \
921f61
  -DCMAKE_BUILD_TYPE=Release
921f61
./ninja -C cmake-build ninja_test
921f61
%endif
921f61
921f61
# Provide Python metadata
921f61
%global ninja_distinfo ninja-%{version}.dist-info
921f61
mkdir %{ninja_distinfo}
921f61
cat > %{ninja_distinfo}/METADATA << EOF
921f61
Metadata-Version: 2.1
921f61
Name: ninja
921f61
Version: %{version}
921f61
Summary: %{summary}
921f61
Description-Content-Type: text/plain
921f61
921f61
Metadata only package for automatic dependency resolution in the RPM
921f61
ecosystem. This package is separate from the PyPI package called ninja.
921f61
EOF
921f61
echo rpm > %{ninja_distinfo}/INSTALLER
0782da
0782da
%install
0782da
install -Dpm0755 ninja -t %{buildroot}%{_bindir}/
921f61
%if %{without bootstrap}
0782da
install -Dpm0644 misc/bash-completion %{buildroot}%{_datadir}/bash-completion/completions/ninja
0782da
install -Dpm0644 misc/ninja-mode.el %{buildroot}%{_datadir}/emacs/site-lisp/ninja-mode.el
0782da
install -Dpm0644 misc/ninja.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax/ninja.vim
0782da
install -Dpm0644 %{S:1} %{buildroot}%{_datadir}/vim/vimfiles/ftdetect/ninja.vim
0782da
install -Dpm0644 misc/zsh-completion %{buildroot}%{_datadir}/zsh/site-functions/_ninja
921f61
install -Dpm0644 misc/ninja_syntax.py %{buildroot}%{python3_sitelib}/ninja_syntax.py
921f61
%endif
921f61
install -Dpm0644 %{S:2} %{buildroot}%{_rpmmacrodir}/macros.ninja
921f61
921f61
# Macro should not change when we are redefining bindir
921f61
sed -i -e "/^%%__ninja /s| .*$| %{_bindir}/ninja|" %{buildroot}%{_rpmmacrodir}/macros.ninja
0782da
0782da
ln -s ninja %{buildroot}%{_bindir}/ninja-build
0782da
921f61
# Install Python metadata
921f61
cp -a %{ninja_distinfo} %{buildroot}%{python3_sitelib}
921f61
921f61
%if %{without bootstrap}
0782da
%check
921f61
./cmake-build/ninja_test
921f61
%endif
0782da
0782da
%files
0782da
%license COPYING
921f61
%doc README.md
921f61
%if %{without bootstrap}
921f61
%doc doc/manual.html
921f61
%endif
0782da
%{_bindir}/ninja
0782da
%{_bindir}/ninja-build
921f61
%if %{without bootstrap}
0782da
%{_datadir}/bash-completion/completions/ninja
0782da
%{_datadir}/emacs/site-lisp/ninja-mode.el
0782da
%{_datadir}/vim/vimfiles/syntax/ninja.vim
0782da
%{_datadir}/vim/vimfiles/ftdetect/ninja.vim
0782da
# zsh does not have a -filesystem package
921f61
%dir %{_datadir}/zsh
921f61
%dir %{_datadir}/zsh/site-functions
921f61
%{_datadir}/zsh/site-functions/_ninja
921f61
%pycached %{python3_sitelib}/ninja_syntax.py
921f61
%endif
921f61
%{_rpmmacrodir}/macros.ninja
921f61
921f61
%files -n python3-ninja
921f61
%{python3_sitelib}/%{ninja_distinfo}
921f61
0782da
0782da
%changelog
921f61
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.12.1-3
921f61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
921f61
921f61
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 1.12.1-2
921f61
- Rebuilt for Python 3.13
921f61
921f61
* Mon May 27 2024 Byoungchan Lee <byoungchan.lee@gmx.com> - 1.12.1-1
921f61
- Update to 1.12.1
921f61
921f61
* Wed May 15 2024 Sandro <devel@penguinpee.nl>
921f61
- Add python3-ninja sub package providing metadata for Python packages
921f61
  depending on ninja to facilitate automatic dependency resolution.
921f61
921f61
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.1-7
921f61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
921f61
921f61
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.1-6
921f61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
921f61
921f61
* Mon Oct 23 2023 Ben Boeckel <fedora@me.benboeckel.net> - 1.11.1-5
921f61
- Handle Python 3.13 removal of `pipes`, resolves rhbz#2245655
921f61
921f61
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.1-4
921f61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
921f61
921f61
* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 1.11.1-3
921f61
- Rebuilt for Python 3.12
921f61
921f61
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.1-2
921f61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
921f61
921f61
* Tue Sep 06 2022 Carl George <carl@george.computer> - 1.11.1-1
921f61
- Latest upstream, resolves rhbz#2086337
921f61
921f61
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.2-9
921f61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
921f61
921f61
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.10.2-8
921f61
- Rebuilt for Python 3.11
921f61
921f61
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.2-7
921f61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
921f61
921f61
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.2-6
921f61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
921f61
921f61
* Thu Jun 03 2021 Python Maint <python-maint@redhat.com> - 1.10.2-5
921f61
- Rebuilt for Python 3.10
921f61
921f61
* Tue May 04 2021 Richard Hughes <rhughes@redhat.com> - 1.10.2-4
921f61
- Do not BR re2c on RHEL. It is NTH, and one less package dep to maintain.
921f61
921f61
* Fri Mar 05 2021 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.10.2-3
921f61
- Cleanup from unneeded conditions
921f61
921f61
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.2-2
921f61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
921f61
921f61
* Thu Jan 21 2021 Kalev Lember <klember@redhat.com> - 1.10.2-1
921f61
- Update to 1.10.2
921f61
921f61
* Wed Aug 19 2020 Björn Esser <besser82@fedoraproject.org> - 1.10.1-2
921f61
- Add ninja_syntax.py
921f61
921f61
* Wed Aug 19 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.10.1-1
921f61
- Update to 1.10.1
921f61
921f61
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.0-2
921f61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
921f61
921f61
* Wed Feb 05 2020 Björn Esser <besser82@fedoraproject.org> - 1.10.0-1
921f61
- Update to 1.10.0
921f61
921f61
* Wed Feb 05 2020 Björn Esser <besser82@fedoraproject.org> - 1.9.0-5
921f61
- Add conditional for bootstrapping new architectures
921f61
- Use %%set_build_flags macro to export buildflags, if available
921f61
921f61
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-4
921f61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
921f61
921f61
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-3
921f61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
921f61
921f61
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-2
921f61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
921f61
921f61
* Thu Jan 31 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.9.0-1
921f61
- Update to 1.9.0
921f61
921f61
* Thu Aug 16 2018 Owen Taylor <otaylor@redhat.com> - 1.8.2-5
921f61
- Fix binddir usage in macros.ninja
921f61
921f61
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.2-4
921f61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
921f61
921f61
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.8.2-3
921f61
- Rebuilt for Python 3.7
921f61
921f61
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.2-2
921f61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
921f61
0782da
* Tue Sep 12 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.8.2-1
0782da
- Update to 1.8.2
0782da
0782da
* Thu Sep 07 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.8.1-1
0782da
- Update to 1.8.1
0782da
0782da
* Sat Sep 02 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.8.0-1
0782da
- Update to 1.8.0
0782da
0782da
* Tue Aug 01 2017 Kalev Lember <klember@redhat.com> - 1.7.2-6
0782da
- Backport an upstream patch to handle ostree setting 0 mtime
0782da
0782da
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.2-5
0782da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
0782da
0782da
* Fri Apr 21 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.7.2-4
0782da
- Rename main executable to ninja (#1166135)
0782da
  (compatibility symlink is added)
0782da
0782da
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.2-3
0782da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
0782da
0782da
* Sat Dec 03 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 1.7.2-2
0782da
- Add EPEL hacks
0782da
0782da
* Mon Nov 28 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 1.7.2-1
0782da
- Update to 1.7.2
0782da
0782da
* Mon Oct 10 2016 Igor Gnatenko <ignatenko@redhat.com> - 1.7.1-3
0782da
- Fix install ninja.vim
0782da
0782da
* Sat Oct 08 2016 Igor Gnatenko <ignatenko@redhat.com> - 1.7.1-2
0782da
- Add RPM macro
0782da
0782da
* Sat Jul 23 2016 Ben Boeckel <mathstuf@gmail.com> - 1.7.1-1
0782da
- update to 1.7.1
0782da
- fix bash completion for the binary rename (#1352330)
0782da
- disable test which fails to koji rlimit settings
0782da
0782da
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-3
0782da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
0782da
0782da
* Mon Nov 16 2015 Ben Boeckel <mathstuf@gmail.com> - 1.6.0-2
0782da
- Add patch to rename mentions of the binary name
0782da
0782da
* Sun Jul 19 2015 Ben Boeckel <mathstuf@gmail.com> - 1.6.0-1
0782da
- Update to 1.6.0
0782da
0782da
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.3-4
0782da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
0782da
0782da
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 1.5.3-3
0782da
- Rebuilt for GCC 5 C++11 ABI change
0782da
0782da
* Sun Feb 08 2015 Ben Boeckel <mathstuf@gmail.com> - 1.5.3-2
0782da
- Update bash-completions location
0782da
0782da
* Wed Dec 10 2014 Ben Boeckel <mathstuf@gmail.com> - 1.5.3-1
0782da
- Update to 1.5.3
0782da
0782da
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.1-2
0782da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
0782da
0782da
* Tue Aug 05 2014 Christopher Meng <rpm@cicku.me> - 1.5.1-1
0782da
- Update to 1.5.1
0782da
0782da
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.0-2
0782da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
0782da
0782da
* Wed Nov 20 2013 Ben Boeckel <mathstuf@gmail.com> - 1.4.0-1
0782da
- Update to 1.4.0
0782da
0782da
* Sun Nov  3 2013 Ville Skyttä <ville.skytta@iki.fi> - 1.3.4-4
0782da
- Use special %%doc to install all docs (#994005).
0782da
0782da
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.4-3
0782da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
0782da
0782da
* Fri Jun 21 2013 Dan Horák <dan[at]danny.cz> - 1.3.4-2
0782da
- workaround possible too low limits for number of processes and open files,
0782da
  fixes build on ppc/ppc64 and s390(x)
0782da
0782da
* Sun Jun 09 2013 Ben Boeckel <mathstuf@gmail.com> - 1.3.4-1
0782da
- Update to 1.3.4
0782da
- Run test suite
0782da
0782da
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-2
0782da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
0782da
0782da
* Sun Nov 04 2012 Ben Boeckel <mathstuf@gmail.com> - 1.0.0-1
0782da
- Update to 1.0.0
0782da
0782da
* Thu Jul 19 2012 Ben Boeckel <mathstuf@gmail.com> - 0-0.6.20120719git5dc55a3
0782da
- Update to new snapshot
0782da
0782da
* Mon Jul 09 2012 Ben Boeckel <mathstuf@gmail.com> - 0-0.5.20120709gitb90d038
0782da
- Preserve timestamps on install
0782da
- Install as ninja-build to avoid conflicts with the ninja IRC package
0782da
- Update snapshot
0782da
0782da
* Tue Jun 19 2012 Ben Boeckel <mathstuf@gmail.com> - 0-0.4.20120605git54553d3
0782da
- Add an ftdetect file for ninja
0782da
- Fix zsh-stuff directory ownership
0782da
0782da
* Thu Jun 07 2012 Ben Boeckel <mathstuf@gmail.com> - 0-0.3.20120605git54553d3
0782da
- Add a Group tag
0782da
0782da
* Tue Jun 05 2012 Ben Boeckel <mathstuf@gmail.com> - 0-0.2.20120605git54553d3
0782da
- Update to new snapshot
0782da
0782da
* Fri Mar 30 2012 Ben Boeckel <mathstuf@gmail.com> - 0-0.1.20120330gitabd33d5
0782da
- Initial package