Add RPM macro
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
This commit is contained in:
parent
9e4029fda6
commit
5604780f55
11
macros.ninja
Normal file
11
macros.ninja
Normal file
@ -0,0 +1,11 @@
|
||||
%__ninja %{_bindir}/ninja-build
|
||||
%__ninja_common_opts -v %{?_smp_mflags}
|
||||
|
||||
%ninja_build \
|
||||
%{__ninja} %{__ninja_common_opts}
|
||||
|
||||
%ninja_install \
|
||||
DESTDIR=%{buildroot} %{__ninja} install %{__ninja_common_opts}
|
||||
|
||||
%ninja_test \
|
||||
%{__ninja} test %{__ninja_common_opts}
|
@ -1,11 +1,11 @@
|
||||
Name: ninja-build
|
||||
Version: 1.7.1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: A small build system with a focus on speed
|
||||
License: ASL 2.0
|
||||
URL: http://martine.github.com/ninja/
|
||||
Source0: https://github.com/martine/ninja/archive/v%{version}.tar.gz#/ninja-%{version}.tar.gz
|
||||
Source1: ninja.vim
|
||||
Source1: macros.ninja
|
||||
# Rename mentions of the executable name to be ninja-build.
|
||||
Patch1000: ninja-1.7.1-binary-rename.patch
|
||||
# Disable a test which takes too many resources for koji.
|
||||
@ -24,9 +24,8 @@ generated by a higher-level build system, and it is designed to run builds as
|
||||
fast as possible.
|
||||
|
||||
%prep
|
||||
%setup -qn ninja-%{version}
|
||||
%patch1000 -p1 -b .binary-rename
|
||||
%patch1001 -p1 -b .resource-intensive-test
|
||||
%autosetup -n ninja-%{version} -p1
|
||||
cp -p %{SOURCE1} .
|
||||
|
||||
%build
|
||||
CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" \
|
||||
@ -36,20 +35,20 @@ CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" \
|
||||
|
||||
%install
|
||||
# TODO: Install ninja_syntax.py?
|
||||
mkdir -p %{buildroot}/{%{_bindir},%{_datadir}/bash-completion/completions,%{_datadir}/emacs/site-lisp,%{_datadir}/vim/vimfiles/syntax,%{_datadir}/vim/vimfiles/ftdetect,%{_datadir}/zsh/site-functions}
|
||||
|
||||
install -pm755 ninja %{buildroot}%{_bindir}/ninja-build
|
||||
install -pm644 misc/bash-completion %{buildroot}%{_datadir}/bash-completion/completions/ninja-build
|
||||
install -pm644 misc/ninja-mode.el %{buildroot}%{_datadir}/emacs/site-lisp/ninja-mode.el
|
||||
install -pm644 misc/ninja.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax/ninja.vim
|
||||
install -pm644 %{SOURCE1} %{buildroot}%{_datadir}/vim/vimfiles/ftdetect/ninja.vim
|
||||
install -pm644 misc/zsh-completion %{buildroot}%{_datadir}/zsh/site-functions/_ninja
|
||||
install -Dpm0755 ninja %{buildroot}%{_bindir}/ninja-build
|
||||
install -Dpm0644 misc/bash-completion %{buildroot}%{_datadir}/bash-completion/completions/ninja-build
|
||||
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 %{SOURCE1} %{buildroot}%{_datadir}/vim/vimfiles/ftdetect/ninja.vim
|
||||
install -Dpm0644 misc/zsh-completion %{buildroot}%{_datadir}/zsh/site-functions/_ninja
|
||||
install -Dpm0644 macros.ninja %{buildroot}%{rpmmacrodir}/macros.ninja
|
||||
|
||||
%check
|
||||
./ninja_test
|
||||
|
||||
%files
|
||||
%doc COPYING HACKING.md README doc/manual.html
|
||||
%license COPYING
|
||||
%doc HACKING.md README doc/manual.html
|
||||
%{_bindir}/ninja-build
|
||||
%{_datadir}/bash-completion/completions/ninja-build
|
||||
%{_datadir}/emacs/site-lisp/ninja-mode.el
|
||||
@ -57,8 +56,12 @@ install -pm644 misc/zsh-completion %{buildroot}%{_datadir}/zsh/site-functions/_n
|
||||
%{_datadir}/vim/vimfiles/ftdetect/ninja.vim
|
||||
# zsh does not have a -filesystem package
|
||||
%{_datadir}/zsh/
|
||||
%{rpmmacrodir}/macros.ninja
|
||||
|
||||
%changelog
|
||||
* Sat Oct 08 2016 Igor Gnatenko <ignatenko@redhat.com> - 1.7.1-2
|
||||
- Add RPM macro
|
||||
|
||||
* Sat Jul 23 2016 Ben Boeckel <mathstuf@gmail.com> - 1.7.1-1
|
||||
- update to 1.7.1
|
||||
- fix bash completion for the binary rename (#1352330)
|
||||
|
Loading…
Reference in New Issue
Block a user