commit 5c388f50e500767f92fbb9962830e278ec26657c
Author: Sam Kottler <shk(a)redhat.com>
Date: Sat Mar 8 21:56:31 2014 +0600
Add more bootstrap conditionals for bundled libs
erlang-rebar.spec | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
---
diff --git a/erlang-rebar.spec b/erlang-rebar.spec
index 59958ae..bfb8bb7 100644
--- a/erlang-rebar.spec
+++ b/erlang-rebar.spec
@@ -14,7 +14,7 @@
Name: erlang-%{realname}
Version: 2.1.0
-Release: 0.1%{?dist}
+Release: 0.2%{?dist}
Summary: Erlang Build Tools
Group: Development/Tools
License: MIT
@@ -22,14 +22,15 @@ URL:
https://github.com/rebar/rebar
# wget --content-disposition
https://github.com/basho/rebar/tarball/ebb474b
Source0: %{upstream}-%{realname}-%{version}-pre-%{patchnumber}-g%{git_tag}.tar.gz
Source1: rebar.escript
+
+# The bundled getopt is necessary to do the initial bootstrap since
+# erlang-getopt requires erlang-rebar to build and vice versa.
+%if 0%{?need_bootstrap} < 1
# Fedora/EPEL-specific
Patch1: rebar-0001-Don-t-load-templates-from-the-bundle.patch
# Fedora/EPEL-specific
Patch2: rebar-0002-Remove-bundled-mustache.patch
-# The bundled getopt is necessary to do the initial bootstrap since
-# erlang-getopt requires erlang-rebar to build and vice versa.
-%if 0%{?need_bootstrap} < 1
# Fedora/EPEL-specific
Patch3: rebar-0003-Remove-bundled-getopt.patch
%endif
@@ -63,7 +64,9 @@ Requires: erlang-crypto%{?_isa}
# FIXME does it still needed?
Requires: erlang-dialyzer%{?_isa}
Requires: erlang-edoc%{?_isa}
+%if 1%{?need_bootstrap} < 1
Requires: erlang-erlydtl%{?_isa}
+%endif
Requires: erlang-erts%{?_isa}
# Requires for port compiling - no direct references in Rebar's src/*.erl files
Requires: erlang-erl_interface%{?_isa}
@@ -71,13 +74,21 @@ Requires: erlang-erl_interface%{?_isa}
# eunit_test:function_wrapper/2. This function was removed in R16, and rebar
# contains a workaround for that. So no need to worry about that.
Requires: erlang-eunit%{?_isa}
+%if 1%{?need_bootstrap} < 1
Requires: erlang-getopt%{?_isa}
+%endif
Requires: erlang-kernel%{?_isa}
+%if 1%{?need_bootstrap} < 1
Requires: erlang-lfe%{?_isa}
+%endif
+%if 1%{?need_bootstrap} < 1
Requires: erlang-mustache%{?_isa}
Requires: erlang-neotoma%{?_isa}
+%endif
Requires: erlang-parsetools%{?_isa}
+%if 1%{?need_bootstrap} < 1
Requires: erlang-protobuffs%{?_isa}
+%endif
Requires: erlang-reltool%{?_isa}
Requires: erlang-sasl%{?_isa}
Requires: erlang-snmp%{?_isa}
@@ -93,9 +104,9 @@ Erlang Build Tools.
%prep
%setup -q -n %{upstream}-%{realname}-%{git_tag}
+%if 0%{?need_bootstrap} < 1
%patch1 -p1 -b .dont_load_templates
%patch2 -p1 -b .remove_bundled_mustache
-%if 0%{?need_bootstrap} < 1
%patch3 -p1 -b .remove_bundled_getopt
%endif
%patch4 -p1 -b .dont_try_building_so