[packages/ninja] add bootstrap bcond

glen glen at pld-linux.org
Wed Jan 22 00:03:33 CET 2014


commit d090bae27fdd0e6936c8c1c8db5e25c4c2bc94db
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed Jan 22 00:59:54 2014 +0200

    add bootstrap bcond

 ninja.spec | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
---
diff --git a/ninja.spec b/ninja.spec
index beb2119..2e46328 100644
--- a/ninja.spec
+++ b/ninja.spec
@@ -2,6 +2,10 @@
 # - vim subpackage
 # - zsh completions subpackage
 # - emacs subpackage
+#
+# Conditional build:
+%bcond_with	bootstrap		# do bootstrap build
+
 Summary:	A small build system with a focus on speed
 Name:		ninja
 Version:	1.0.0
@@ -15,6 +19,7 @@ Source1:	%{name}.vim
 BuildRequires:	asciidoc
 BuildRequires:	libstdc++-devel
 BuildRequires:	rpmbuild(macros) >= 1.673
+%{!?with_bootstrap:BuildRequires:	ninja}
 Obsoletes:	ninja-build < 1.0.0-2
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -42,8 +47,17 @@ bash-completion for %{name}.
 %build
 export CXX="%{__cxx}"
 export CFLAGS="%{rpmcflags}"
+
+%if %{with bootstrap}
 ./bootstrap.py --verbose -- --debug
-./ninja -v manual
+export PATH=$(pwd):$PATH
+%else
+./configure.py
+ninja -v
+%endif
+
+# build manual
+ninja -v manual
 
 %install
 rm -rf $RPM_BUILD_ROOT
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list