%global realname rebar %global upstream rebar %global debug_package %{nil} # Set this to true when starting a rebuild of the whole erlang stack. There's # a cyclical dependency between erlang-rebar and erlang-getopt so this package # (rebar) needs to get built first in bootstrap mode. %global need_bootstrap_set 0 %{!?need_bootstrap: %global need_bootstrap %{need_bootstrap_set}} Name: erlang-%{realname} Version: 2.6.1 Release: 6%{?dist} Summary: Erlang Build Tools Group: Development/Tools License: MIT URL: https://github.com/%{upstream}/%{realname} Source0: https://github.com/%{upstream}/%{realname}/archive/%{version}/%{realname}-%{version}.tar.gz Source1: rebar.escript # 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. # Fedora/EPEL-specific Patch3: rebar-0003-Remove-bundled-getopt.patch # Will be proposed for inclusion Patch4: rebar-0004-Allow-discarding-building-ports.patch # Fedora/EPEL-specific Patch5: rebar-0005-Check-system-wide-libdir-in-case-of-source-based-dep.patch # Fedora/EPEL-specific - we're using at least R16B03 Patch6: rebar-0006-Remove-any-traces-of-long-time-obsolete-escript-fold.patch Patch7: rebar-0007-remove-abnfc.patch Patch8: rebar-0008-Disable-eflame-support-for-now.patch Patch9: rebar-0009-Remove-support-for-gpb-compiler.patch # Fedora/EPEL-specific - we're using at least R16B03 Patch10: rebar-0010-Remove-pre-R15B02-workaround.patch # Fedora/EPEL-specific - keep until we dump R16B03-1 and 17.x.y entirely Patch11: rebar-0011-No-such-function-erlang-timestamp-0.patch %if 0%{?need_bootstrap} < 1 BuildRequires: erlang-rebar %else BuildRequires: erlang-asn1 BuildRequires: erlang-common_test BuildRequires: erlang-compiler BuildRequires: erlang-crypto BuildRequires: erlang-dialyzer BuildRequires: erlang-diameter BuildRequires: erlang-edoc BuildRequires: erlang-erl_interface BuildRequires: erlang-erlydtl BuildRequires: erlang-erts BuildRequires: erlang-eunit BuildRequires: erlang-getopt BuildRequires: erlang-kernel BuildRequires: erlang-lfe BuildRequires: erlang-mustache BuildRequires: erlang-neotoma BuildRequires: erlang-parsetools BuildRequires: erlang-protobuffs BuildRequires: erlang-reltool BuildRequires: erlang-sasl BuildRequires: erlang-snmp BuildRequires: erlang-stdlib BuildRequires: erlang-syntax_tools BuildRequires: erlang-tools %endif BuildRequires: erlang-rpm-macros # FIXME wip #Requires: erlang-abnfc%{?_isa} #Requires: erlang-eflame%{?_isa} #Requires: erlang-gpb%{?_isa} # This one cannot be picked up automatically # See https://bugzilla.redhat.com/960079 Requires: erlang-common_test%{?_isa} # Requires for port compiling - no direct references in Rebar's src/*.erl files Requires: erlang-erl_interface%{?_isa} # This one cannot be picked up automatically # See https://bugzilla.redhat.com/960079 Requires: erlang-parsetools%{?_isa} Requires: erlang-rpm-macros Provides: %{realname} = %{version}-%{release} %description Erlang Build Tools. %prep %setup -q -n %{realname}-%{version} %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 .allow_discarding_ports %patch5 -p1 -b .use_locally_installed %patch6 -p1 -b .remove_escript_foldl_3 %patch7 -p1 -b .remove_abnfc %patch8 -p1 -b .remove_eflame %patch9 -p1 -b .remove_gpb %patch10 -p1 -b .remove_pre_R15B02 %patch11 -p1 -b .typo_fix %build %if 0%{?need_bootstrap} < 1 %{rebar_compile} %else ./bootstrap ./rebar compile -v %endif %install install -D -p -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/rebar mkdir -p %{buildroot}%{_erllibdir}/%{realname}-%{version}/{ebin,include} install -m 644 ebin/%{realname}.app %{buildroot}%{_erllibdir}/%{realname}-%{version}/ebin install -m 644 ebin/*.beam %{buildroot}%{_erllibdir}/%{realname}-%{version}/ebin install -m 644 include/*.hrl %{buildroot}%{_erllibdir}/%{realname}-%{version}/include cp -a priv %{buildroot}%{_erllibdir}/%{realname}-%{version}/ %check # FIXME #rebar eunit -v %files %doc README.md THANKS rebar.config.sample %license LICENSE %{_bindir}/rebar %{_erllibdir}/%{realname}-%{version} %changelog * Wed Mar 2 2016 Peter Lemenkov - 2.6.1-6 - Disable gbp properly * Wed Mar 2 2016 Peter Lemenkov - 2.6.1-5 - Fix dependency issues mentioned by automatic dependency checker * Tue Mar 1 2016 Peter Lemenkov - 2.6.1-4 - Add (Build)Requires which weren't picked up automatically * Tue Mar 1 2016 Peter Lemenkov - 2.6.1-3 - Use autogenerated dependency list * Wed Feb 03 2016 Fedora Release Engineering - 2.6.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Dec 31 2015 Filip Andres - 2.6.1-1 - Update to 2.6.1 * Fri Jul 03 2015 Filip Andres - 2.6.0-1 - Update to 2.6.0 * Wed Jun 17 2015 Fedora Release Engineering - 2.1.0-0.10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Aug 16 2014 Fedora Release Engineering - 2.1.0-0.9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 2.1.0-0.8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sat Mar 8 2014 Sam Kottler - 2.1.0-0.7 - Add bootstrap variable and necessary conditionals for building without external getopt * Sun Sep 01 2013 Peter Lemenkov - 2.1.0-0.5 - Added missing runtime requirements * Sat Aug 03 2013 Fedora Release Engineering - 2.1.0-0.5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Tue Mar 12 2013 Peter Lemenkov - 2.1.0-0.4 - backported fix for ErlyDTL templates compilation * 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 * Sat Mar 02 2013 Peter Lemenkov - 2.1.0-0.1 - Ver. 2.1.0-pre - Remove R12B-related patches (EL5-related) * Wed Feb 13 2013 Fedora Release Engineering - 2.0.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Tue Dec 18 2012 Peter Lemenkov - 2.0.0-3 - Fix templates * Wed Jul 18 2012 Fedora Release Engineering - 2.0.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Tue Jun 05 2012 Peter Lemenkov - 2.0.0-1 - Ver. 2.0.0 * Tue May 22 2012 Peter Lemenkov - 2-9.20120514git635d1a9 - Fix building in EL6 and Fedora * Mon May 21 2012 Peter Lemenkov - 2-8.20120514git635d1a9 - Explicitly list erlang-erl_interface as a dependency - Fixed EPEL5 dependencies * Sun May 20 2012 Peter Lemenkov - 2-7.20120514git635d1a9 - Enable building on EL5 (remove erlydtl-related stuff on el5) - Remove abnfc-related stff until we package it * Wed May 16 2012 Peter Lemenkov - 2-6.20120514git635d1a9 - Updated to the latest git snapshot * Fri Jan 13 2012 Fedora Release Engineering - 2-5.20101120git90058c7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Tue Feb 08 2011 Fedora Release Engineering - 2-4.20101120git90058c7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Mon Nov 22 2010 Peter Lemenkov - 2-3.20101120git90058c7 - Added missing buildrequires * Sat Nov 20 2010 Peter Lemenkov - 2-2.20101120git90058c7 - Removed bundled mustache and getopt - Fixed license tag - Removed wrong license text from package - Simplified %%files section - Fixed links (project was moved to GitHub) - Changed versioning scheme (post-release) * Sun Sep 5 2010 Peter Lemenkov - 2-1 - Initial build