]> git.pld-linux.org Git - packages/ninja.git/blob - ninja.spec
drop vim package; ninja bundled with vim-rt
[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 %{?with_doc:BuildRequires:      asciidoc}
19 BuildRequires:  libstdc++-devel
20 %{!?with_bootstrap:BuildRequires:       ninja}
21 BuildRequires:  rpmbuild(macros) >= 1.673
22 Obsoletes:      ninja-build < 1.0.0-2
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 Ninja is a small build system with a focus on speed. It differs from
27 other build systems in two major respects: it is designed to have its
28 input files generated by a higher-level build system, and it is
29 designed to run builds as fast as possible.
30
31 %package -n bash-completion-%{name}
32 Summary:        bash-completion for %{name}
33 Group:          Applications/Shells
34 Requires:       %{name}
35 Requires:       bash-completion >= 2.0
36 %if "%{_rpmversion}" >= "5"
37 BuildArch:      noarch
38 %endif
39
40 %description -n bash-completion-%{name}
41 bash-completion for %{name}.
42
43 %package doc
44 Summary:        Manual for %{name}
45 Summary(fr.UTF-8):      Documentation pour %{name}
46 Summary(it.UTF-8):      Documentazione di %{name}
47 Summary(pl.UTF-8):      PodrÄ™cznik dla %{name}
48 Group:          Documentation
49 # noarch subpackages only when building with rpm5
50 %if "%{_rpmversion}" >= "5"
51 BuildArch:      noarch
52 %endif
53
54 %description doc
55 Documentation for %{name}.
56
57 %description doc -l fr.UTF-8
58 Documentation pour %{name}.
59
60 %description doc -l it.UTF-8
61 Documentazione di %{name}.
62
63 %description doc -l pl.UTF-8
64 Dokumentacja do %{name}.
65
66 %prep
67 %setup -q
68
69 %build
70 export CXX="%{__cxx}"
71 export CFLAGS="%{rpmcflags}"
72
73 %if %{with bootstrap}
74 ./bootstrap.py --verbose -- --debug
75 export PATH=$(pwd):$PATH
76 %else
77 ./configure.py
78 ninja -v
79 %endif
80
81 # build manual
82 %{?with_doc:ninja -v manual}
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86 install -d $RPM_BUILD_ROOT%{_bindir}
87 # TODO: Install ninja_syntax.py?
88 install -p %{name} $RPM_BUILD_ROOT%{_bindir}
89
90 install -d $RPM_BUILD_ROOT%{bash_compdir}
91 cp -p misc/bash-completion $RPM_BUILD_ROOT%{bash_compdir}/%{name}
92
93 %if 0
94 install -p -d $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp
95 install -p misc/ninja-mode.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ninja-mode.el
96
97 install -p -d $RPM_BUILD_ROOT%{_datadir}/zsh/site-functions
98 install -p misc/zsh-completion $RPM_BUILD_ROOT%{_datadir}/zsh/site-functions/_ninja
99 %endif
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %files
105 %defattr(644,root,root,755)
106 %doc COPYING README
107 %attr(755,root,root) %{_bindir}/ninja
108
109 %files -n bash-completion-%{name}
110 %defattr(644,root,root,755)
111 %{bash_compdir}/%{name}
112
113 %if %{with doc}
114 %files doc
115 %defattr(644,root,root,755)
116 %doc doc/manual.html
117 %endif
118
119 %if 0
120 # emacs
121 %{_datadir}/emacs/site-lisp/ninja-mode.el
122
123 # zsh does not have a -filesystem package
124 %{_datadir}/zsh/
125 %endif
This page took 0.087319 seconds and 3 git commands to generate.