diff --git a/erlang-rebar.spec b/erlang-rebar.spec index 36fafa6..b63dc60 100644 --- a/erlang-rebar.spec +++ b/erlang-rebar.spec @@ -7,7 +7,7 @@ Name: erlang-%{realname} Version: 2.1.0 -Release: 0.2%{?dist} +Release: 0.3%{?dist} Summary: Erlang Build Tools Group: Development/Tools License: MIT @@ -16,7 +16,7 @@ URL: https://github.com/rebar/rebar Source0: %{upstream}-%{realname}-%{version}-pre-%{patchnumber}-g%{git_tag}.tar.gz Source1: rebar.escript # Fedora/EPEL-specific -Patch1: rebar-0001-No-need-to-create-bundle-and-don-t-try-to-load-anyth.patch +Patch1: rebar-0001-Don-t-load-templates-from-the-bundle.patch # Fedora/EPEL-specific Patch2: rebar-0002-Remove-bundled-mustache.patch # Fedora/EPEL-specific @@ -33,10 +33,7 @@ Patch7: rebar-0007-Remove-any-traces-of-long-time-obsolete-escript-fold.patch Patch8: rebar-0008-Remove-abnfc-compiler-support-n-a-in-Fedora-EPEL.patch # Fedora/EPEL-specific - cosmetic Patch9: rebar-0009-Adjust-app-version.patch -BuildRequires: erlang-erts -BuildRequires: erlang-getopt -BuildRequires: erlang-erl_interface -BuildRequires: erlang-reltool +BuildRequires: erlang-rebar # FIXME wip #Requires: erlang-abnfc%{?_isa} Requires: erlang-asn1%{?_isa} @@ -73,7 +70,7 @@ Erlang Build Tools. %prep %setup -q -n %{upstream}-%{realname}-%{git_tag} -%patch1 -p1 -b .no_bundle +%patch1 -p1 -b .dont_load_templates %patch2 -p1 -b .remove_bundled_mustache %patch3 -p1 -b .remove_bundled_getopt %patch4 -p1 -b .dont_try_building_so @@ -85,7 +82,7 @@ Erlang Build Tools. %build -./bootstrap +rebar compile -v %install @@ -98,6 +95,10 @@ install -m 644 include/*.hrl %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{ver cp -a priv %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/ +%check +#rebar eunit -v + + %files %doc LICENSE NOTES.org README.md THANKS rebar.config.sample %{_bindir}/rebar @@ -105,6 +106,9 @@ cp -a priv %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/ %changelog +* Wed Mar 06 2013 Peter Lemenkov - 2.1.0-0.3 +- Don't bootstrap anymore - use rebar for building rebar + * Sun Mar 03 2013 Peter Lemenkov - 2.1.0-0.2 - Backported fix for suppress building *.so libraries everytime diff --git a/rebar-0001-No-need-to-create-bundle-and-don-t-try-to-load-anyth.patch b/rebar-0001-Don-t-load-templates-from-the-bundle.patch similarity index 65% rename from rebar-0001-No-need-to-create-bundle-and-don-t-try-to-load-anyth.patch rename to rebar-0001-Don-t-load-templates-from-the-bundle.patch index 726416e..06b2811 100644 --- a/rebar-0001-No-need-to-create-bundle-and-don-t-try-to-load-anyth.patch +++ b/rebar-0001-Don-t-load-templates-from-the-bundle.patch @@ -1,46 +1,13 @@ -From 878bc0156c540ce55f97c3a97afafe8537560f7a Mon Sep 17 00:00:00 2001 +From b658042106136a5b471f0d248ec988c6eed77006 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov -Date: Tue, 28 Sep 2010 23:04:36 +0400 -Subject: [PATCH 1/9] No need to create bundle and don't try to load anything - from escript +Date: Mon, 4 Mar 2013 19:03:03 +0400 +Subject: [PATCH 1/9] Don't load templates from the bundle Signed-off-by: Peter Lemenkov - -Conflicts: - bootstrap - src/rebar_templater.erl --- - bootstrap | 16 +--------------- src/rebar_templater.erl | 31 +++++-------------------------- - 2 files changed, 6 insertions(+), 41 deletions(-) + 1 file changed, 5 insertions(+), 26 deletions(-) -diff --git a/bootstrap b/bootstrap -index 70d8da1..e777d19 100755 ---- a/bootstrap -+++ b/bootstrap -@@ -55,21 +55,7 @@ main(Args) -> - true = code:add_path("ebin"), - - %% Run rebar compile to do proper .app validation etc. -- %% and rebar escriptize to create the rebar script -- rebar:main(["compile", "escriptize"] ++ Args), -- -- %% Finally, update executable perms for our script on *nix, -- %% or write out script files on win32. -- case os:type() of -- {unix,_} -> -- [] = os:cmd("chmod u+x rebar"), -- ok; -- {win32,_} -> -- write_windows_scripts(), -- ok; -- _ -> -- ok -- end, -+ rebar:main(["compile"] ++ Args), - - %% Add a helpful message - io:format("Congratulations! You now have a self-contained script called" diff --git a/src/rebar_templater.erl b/src/rebar_templater.erl index 0e1eef1..7cc36f7 100644 --- a/src/rebar_templater.erl diff --git a/rebar-0002-Remove-bundled-mustache.patch b/rebar-0002-Remove-bundled-mustache.patch index af13b1b..462f088 100644 --- a/rebar-0002-Remove-bundled-mustache.patch +++ b/rebar-0002-Remove-bundled-mustache.patch @@ -1,4 +1,4 @@ -From d384b7a4a72e9b566b89b517b3e7953c9f41c529 Mon Sep 17 00:00:00 2001 +From fce5d859e5a24dcbff1796293a4835078b758080 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Sat, 20 Nov 2010 16:36:45 +0300 Subject: [PATCH 2/9] Remove bundled mustache diff --git a/rebar-0003-Remove-bundled-getopt.patch b/rebar-0003-Remove-bundled-getopt.patch index 20c9a26..8393253 100644 --- a/rebar-0003-Remove-bundled-getopt.patch +++ b/rebar-0003-Remove-bundled-getopt.patch @@ -1,4 +1,4 @@ -From a58888207ee87f8db746cb91896c9d804f5af5fe Mon Sep 17 00:00:00 2001 +From e200556bfca9db7e496a50b62fa09a5f46f22b25 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Sat, 20 Nov 2010 16:40:15 +0300 Subject: [PATCH 3/9] Remove bundled getopt diff --git a/rebar-0004-Be-sure-to-filter-empty-sources-h-t-to-Tuncer-and-Jo.patch b/rebar-0004-Be-sure-to-filter-empty-sources-h-t-to-Tuncer-and-Jo.patch index 7537694..d8a2b4f 100644 --- a/rebar-0004-Be-sure-to-filter-empty-sources-h-t-to-Tuncer-and-Jo.patch +++ b/rebar-0004-Be-sure-to-filter-empty-sources-h-t-to-Tuncer-and-Jo.patch @@ -1,4 +1,4 @@ -From 400dbe944291d6426ea474de552259539999e6a6 Mon Sep 17 00:00:00 2001 +From 53508faa9cba923751653901ba21d6025da46e5b Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Mon, 12 Nov 2012 20:18:00 -0700 Subject: [PATCH 4/9] Be sure to filter empty sources (h/t to Tuncer and Joe diff --git a/rebar-0005-Allow-discarding-building-ports.patch b/rebar-0005-Allow-discarding-building-ports.patch index 3fbc4e6..325fa31 100644 --- a/rebar-0005-Allow-discarding-building-ports.patch +++ b/rebar-0005-Allow-discarding-building-ports.patch @@ -1,4 +1,4 @@ -From b1a2cb5cbfc92a775e7dc60d16cdaf45de77789f Mon Sep 17 00:00:00 2001 +From a101ee059baff585da6d1086097e8ceb20bda5d1 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Tue, 5 Jun 2012 15:10:12 +0400 Subject: [PATCH 5/9] Allow discarding building ports diff --git a/rebar-0006-Check-system-wide-libdir-in-case-of-source-based-dep.patch b/rebar-0006-Check-system-wide-libdir-in-case-of-source-based-dep.patch index a023105..1a815dc 100644 --- a/rebar-0006-Check-system-wide-libdir-in-case-of-source-based-dep.patch +++ b/rebar-0006-Check-system-wide-libdir-in-case-of-source-based-dep.patch @@ -1,4 +1,4 @@ -From ea62c275ca7a99548083724018d51b21b64ccc39 Mon Sep 17 00:00:00 2001 +From 13fd63738960c567d32df3061a2a4e5452dac0e1 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Sat, 2 Mar 2013 10:39:15 +0400 Subject: [PATCH 6/9] Check system-wide libdir in case of source-based diff --git a/rebar-0007-Remove-any-traces-of-long-time-obsolete-escript-fold.patch b/rebar-0007-Remove-any-traces-of-long-time-obsolete-escript-fold.patch index b79173a..088fac5 100644 --- a/rebar-0007-Remove-any-traces-of-long-time-obsolete-escript-fold.patch +++ b/rebar-0007-Remove-any-traces-of-long-time-obsolete-escript-fold.patch @@ -1,4 +1,4 @@ -From 6621ba8d4452940985e2144c8f13e08217532a13 Mon Sep 17 00:00:00 2001 +From 1900df4838d7623009b09fffaa6f23daa5da46c8 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Sat, 2 Mar 2013 13:35:36 +0400 Subject: [PATCH 7/9] Remove any traces of long-time obsolete escript:foldl/3 diff --git a/rebar-0008-Remove-abnfc-compiler-support-n-a-in-Fedora-EPEL.patch b/rebar-0008-Remove-abnfc-compiler-support-n-a-in-Fedora-EPEL.patch index 273766c..a4ab969 100644 --- a/rebar-0008-Remove-abnfc-compiler-support-n-a-in-Fedora-EPEL.patch +++ b/rebar-0008-Remove-abnfc-compiler-support-n-a-in-Fedora-EPEL.patch @@ -1,4 +1,4 @@ -From b85b469f41f0a65170318770f69c041c19cbff64 Mon Sep 17 00:00:00 2001 +From ec4f8e74c6058e6ba61e9687cccf30ed9378dca2 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Sat, 2 Mar 2013 13:52:04 +0400 Subject: [PATCH 8/9] Remove abnfc compiler support (n/a in Fedora/EPEL) diff --git a/rebar-0009-Adjust-app-version.patch b/rebar-0009-Adjust-app-version.patch index 851869f..f99fb1e 100644 --- a/rebar-0009-Adjust-app-version.patch +++ b/rebar-0009-Adjust-app-version.patch @@ -1,4 +1,4 @@ -From d85d4e8717161fa31d1f4c49cf1dd17998f54278 Mon Sep 17 00:00:00 2001 +From 15f315f3b3ec0d4e11186b9eabb9789b4c38b1b0 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Sat, 2 Mar 2013 13:52:35 +0400 Subject: [PATCH 9/9] Adjust app version