2 # - zsh completions subpackage
6 %bcond_with bootstrap # do bootstrap build
7 %bcond_without doc # don't build doc
9 Summary: A small build system with a focus on speed
14 Group: Development/Tools
15 Source0: https://github.com/martine/ninja/archive/v%{version}.tar.gz
16 # Source0-md5: 51f58e418d215ffc165cb9c5ad6cf0d7
17 URL: http://martine.github.com/ninja/
19 %{?with_doc:BuildRequires: asciidoc}
20 BuildRequires: libstdc++-devel
21 %{!?with_bootstrap:BuildRequires: ninja}
22 BuildRequires: rpmbuild(macros) >= 1.673
23 Obsoletes: ninja-build < 1.0.0-2
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 Ninja is a small build system with a focus on speed. It differs from
28 other build systems in two major respects: it is designed to have its
29 input files generated by a higher-level build system, and it is
30 designed to run builds as fast as possible.
32 %package -n bash-completion-%{name}
33 Summary: bash-completion for %{name}
34 Group: Applications/Shells
36 Requires: bash-completion >= 2.0
37 %if "%{_rpmversion}" >= "5"
41 %description -n bash-completion-%{name}
42 bash-completion for %{name}.
44 %package -n vim-syntax-%{name}
45 Summary: %{name} syntax files for Vim
46 Summary(pl.UTF-8): Pliki składni %{name} dla Vima
47 Group: Applications/Editors
48 Requires: vim-rt >= 4:7.2.170
49 %if "%{_rpmversion}" >= "5"
53 %description -n vim-syntax-%{name}
54 %{name} syntax files for vim.
56 %description -n vim-syntax-%{name} -l pl.UTF-8
57 Pliki składni %{name} dla Vima.
60 Summary: Manual for %{name}
61 Summary(fr.UTF-8): Documentation pour %{name}
62 Summary(it.UTF-8): Documentazione di %{name}
63 Summary(pl.UTF-8): Podręcznik dla %{name}
65 # noarch subpackages only when building with rpm5
66 %if "%{_rpmversion}" >= "5"
71 Documentation for %{name}.
73 %description doc -l fr.UTF-8
74 Documentation pour %{name}.
76 %description doc -l it.UTF-8
77 Documentazione di %{name}.
79 %description doc -l pl.UTF-8
80 Dokumentacja do %{name}.
87 export CFLAGS="%{rpmcflags}"
90 ./bootstrap.py --verbose -- --debug
91 export PATH=$(pwd):$PATH
98 %{?with_doc:ninja -v manual}
101 rm -rf $RPM_BUILD_ROOT
102 install -d $RPM_BUILD_ROOT%{_bindir}
103 # TODO: Install ninja_syntax.py?
104 install -p %{name} $RPM_BUILD_ROOT%{_bindir}
106 install -d $RPM_BUILD_ROOT%{bash_compdir}
107 cp -p misc/bash-completion $RPM_BUILD_ROOT%{bash_compdir}/%{name}
109 install -p -d $RPM_BUILD_ROOT%{_vimdatadir}/{ftdetect,syntax}
110 cp -p misc/ninja.vim $RPM_BUILD_ROOT%{_vimdatadir}/syntax
111 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_vimdatadir}/ftdetect
114 install -p -d $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp
115 install -p misc/ninja-mode.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ninja-mode.el
117 install -p -d $RPM_BUILD_ROOT%{_datadir}/zsh/site-functions
118 install -p misc/zsh-completion $RPM_BUILD_ROOT%{_datadir}/zsh/site-functions/_ninja
122 rm -rf $RPM_BUILD_ROOT
125 %defattr(644,root,root,755)
127 %attr(755,root,root) %{_bindir}/ninja
129 %files -n bash-completion-%{name}
130 %defattr(644,root,root,755)
131 %{bash_compdir}/%{name}
133 %files -n vim-syntax-%{name}
134 %defattr(644,root,root,755)
135 %{_vimdatadir}/ftdetect/%{name}.vim
136 %{_vimdatadir}/syntax/%{name}.vim
140 %defattr(644,root,root,755)
146 %{_datadir}/emacs/site-lisp/ninja-mode.el
148 # zsh does not have a -filesystem package