[packages/ninja] renamed to ninja, add bash-completion package

glen glen at pld-linux.org
Tue Jan 21 23:27:46 CET 2014


commit 27529f7f51b6f69629638c0cb7df9793d0305991
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed Jan 22 00:27:31 2014 +0200

    renamed to ninja, add bash-completion package

 ninja-build.spec => ninja.spec | 39 ++++++++++++++++++++++++++-------------
 1 file changed, 26 insertions(+), 13 deletions(-)
---
diff --git a/ninja-build.spec b/ninja.spec
similarity index 74%
rename from ninja-build.spec
rename to ninja.spec
index 774ce81..abc0717 100644
--- a/ninja-build.spec
+++ b/ninja.spec
@@ -1,20 +1,20 @@
 # TODO
 # - vim subpackage
-# - bash-completion subpackage
 # - zsh completions subpackage
 # - emacs subpackage
 Summary:	A small build system with a focus on speed
-Name:		ninja-build
+Name:		ninja
 Version:	1.0.0
-Release:	1
+Release:	2
 License:	Apache v2.0
 Group:		Development/Tools
 Source0:	https://github.com/martine/ninja/archive/v%{version}.tar.gz
 # Source0-md5:	51f58e418d215ffc165cb9c5ad6cf0d7
 URL:		http://martine.github.com/ninja/
-Source1:	ninja.vim
+Source1:	%{name}.vim
 BuildRequires:	asciidoc
 BuildRequires:	libstdc++-devel
+Obsoletes:	ninja-build < 1.0.0-2
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -23,8 +23,20 @@ other build systems in two major respects: it is designed to have its
 input files generated by a higher-level build system, and it is
 designed to run builds as fast as possible.
 
+%package -n bash-completion-%{name}
+Summary:	bash-completion for %{name}
+Group:		Applications/Shells
+Requires:	%{name}
+Requires:	bash-completion >= 2.0
+%if "%{_rpmversion}" >= "5"
+BuildArch:	noarch
+%endif
+
+%description -n bash-completion-%{name}
+bash-completion for %{name}.
+
 %prep
-%setup -q -n ninja-%{version}
+%setup -q
 
 %build
 export CXX="%{__cxx}"
@@ -36,12 +48,12 @@ export CFLAGS="%{rpmcflags}"
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_bindir}
 # TODO: Install ninja_syntax.py?
-install -p ninja $RPM_BUILD_ROOT%{_bindir}/ninja-build
+install -p %{name} $RPM_BUILD_ROOT%{_bindir}
 
-%if 0
-install -p -d $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
-install -p misc/bash-completion $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/ninja-bash-completion
+install -d $RPM_BUILD_ROOT%{bash_compdir}
+cp -p misc/bash-completion $RPM_BUILD_ROOT%{bash_compdir}/%{name}
 
+%if 0
 install -p -d $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp
 install -p misc/ninja-mode.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ninja-mode.el
 
@@ -60,7 +72,11 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc COPYING README doc/manual.html
-%attr(755,root,root) %{_bindir}/ninja-build
+%attr(755,root,root) %{_bindir}/ninja
+
+%files -n bash-completion-%{name}
+%defattr(644,root,root,755)
+%{bash_compdir}/%{name}
 
 %if 0
 # emacs
@@ -69,9 +85,6 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/vim/vimfiles/syntax/ninja.vim
 %{_datadir}/vim/vimfiles/ftdetect/ninja.vim
 
-# bash-completion does not own this
-%{_sysconfdir}/bash_completion.d/
-
 # zsh does not have a -filesystem package
 %{_datadir}/zsh/
 %endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ninja.git/commitdiff/27529f7f51b6f69629638c0cb7df9793d0305991



More information about the pld-cvs-commit mailing list