]> git.pld-linux.org Git - packages/ninja.git/blob - ninja.spec
4023c5fd9d57e9d3dc53eda4ffb3c2cad83093d8
[packages/ninja.git] / ninja.spec
1 # TODO
2 # - zsh completions subpackage
3 # - emacs subpackage
4 #
5 # Conditional build:
6 %bcond_with     bootstrap               # do bootstrap build
7 %bcond_without  doc                     # don't build doc
8
9 Summary:        A small build system with a focus on speed
10 Name:           ninja
11 Version:        1.0.0
12 Release:        2
13 License:        Apache v2.0
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/
18 Source1:        %{name}.vim
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)
25
26 %description
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.
31
32 %package -n bash-completion-%{name}
33 Summary:        bash-completion for %{name}
34 Group:          Applications/Shells
35 Requires:       %{name}
36 Requires:       bash-completion >= 2.0
37 %if "%{_rpmversion}" >= "5"
38 BuildArch:      noarch
39 %endif
40
41 %description -n bash-completion-%{name}
42 bash-completion for %{name}.
43
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"
50 BuildArch:      noarch
51 %endif
52
53 %description -n vim-syntax-%{name}
54 %{name} syntax files for vim.
55
56 %description -n vim-syntax-%{name} -l pl.UTF-8
57 Pliki składni %{name} dla Vima.
58
59 %package doc
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}
64 Group:          Documentation
65 # noarch subpackages only when building with rpm5
66 %if "%{_rpmversion}" >= "5"
67 BuildArch:      noarch
68 %endif
69
70 %description doc
71 Documentation for %{name}.
72
73 %description doc -l fr.UTF-8
74 Documentation pour %{name}.
75
76 %description doc -l it.UTF-8
77 Documentazione di %{name}.
78
79 %description doc -l pl.UTF-8
80 Dokumentacja do %{name}.
81
82 %prep
83 %setup -q
84
85 %build
86 export CXX="%{__cxx}"
87 export CFLAGS="%{rpmcflags}"
88
89 %if %{with bootstrap}
90 ./bootstrap.py --verbose -- --debug
91 export PATH=$(pwd):$PATH
92 %else
93 ./configure.py
94 ninja -v
95 %endif
96
97 # build manual
98 %{?with_doc:ninja -v manual}
99
100 %install
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}
105
106 install -d $RPM_BUILD_ROOT%{bash_compdir}
107 cp -p misc/bash-completion $RPM_BUILD_ROOT%{bash_compdir}/%{name}
108
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
112
113 %if 0
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
116
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
119 %endif
120
121 %clean
122 rm -rf $RPM_BUILD_ROOT
123
124 %files
125 %defattr(644,root,root,755)
126 %doc COPYING README
127 %attr(755,root,root) %{_bindir}/ninja
128
129 %files -n bash-completion-%{name}
130 %defattr(644,root,root,755)
131 %{bash_compdir}/%{name}
132
133 %files -n vim-syntax-%{name}
134 %defattr(644,root,root,755)
135 %{_vimdatadir}/ftdetect/%{name}.vim
136 %{_vimdatadir}/syntax/%{name}.vim
137
138 %if %{with doc}
139 %files doc
140 %defattr(644,root,root,755)
141 %doc doc/manual.html
142 %endif
143
144 %if 0
145 # emacs
146 %{_datadir}/emacs/site-lisp/ninja-mode.el
147
148 # zsh does not have a -filesystem package
149 %{_datadir}/zsh/
150 %endif
This page took 0.075553 seconds and 2 git commands to generate.