%global realname rebar %global upstream basho %global debug_package %{nil} %global git_tag 1c98f6c %global patchnumber 0 Name: erlang-%{realname} Version: 2.0.0 Release: 1%{?dist} Summary: Erlang Build Tools Group: Development/Tools License: MIT URL: https://github.com/basho/rebar # wget --no-check-certificate --content-disposition https://github.com/basho/rebar/zipball/635d1a9 Source0: %{upstream}-%{realname}-%{version}-%{patchnumber}-g%{git_tag}.tar.gz Source1: rebar.escript Patch1: rebar-0001-No-need-to-create-bundle.patch Patch2: rebar-0002-Remove-bundled-mustache.patch Patch3: rebar-0003-Remove-bundled-getopt.patch Patch4: rebar-0004-Allow-discarding-building-ports.patch # R12B - EPEL5-specific Patch5: rebar-0005-No-erlang-min-2-and-erlang-max-2-in-R12B.patch # R12B - EPEL5-specific Patch6: rebar-0006-No-such-function-lists-keyfind-3-in-R12B5-use-lists-.patch # R12B - EPEL5-specific Patch7: rebar-0007-No-such-type-dict-in-R12B.patch # R12B - EPEL5-specific Patch8: rebar-0008-No-such-directive-opaque-in-R12B.patch # R12B - EPEL5-specific Patch9: rebar-0009-No-such-type-boolean-in-R12B.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: erlang-erts BuildRequires: erlang-getopt BuildRequires: erlang-erl_interface %if 0%{?el6}%{?fedora} # No reltool at all in R12B BuildRequires: erlang-reltool %endif # wip #Requires: erlang-abnfc Requires: erlang-asn1 Requires: erlang-compiler Requires: erlang-crypto # FIXME does it still needed? Requires: erlang-dialyzer Requires: erlang-edoc %if 0%{?el6}%{?fedora} # No erlydtl in EPEL5 so far Requires: erlang-erlydtl %endif Requires: erlang-erts # Requires for port compiling - no direct references in Rebar's src/*.erl files Requires: erlang-erl_interface Requires: erlang-eunit Requires: erlang-getopt Requires: erlang-kernel Requires: erlang-lfe Requires: erlang-mustache Requires: erlang-neotoma Requires: erlang-protobuffs %if 0%{?el6}%{?fedora} # No reltool at all in R12B Requires: erlang-reltool %endif Requires: erlang-sasl Requires: erlang-snmp Requires: erlang-stdlib Requires: erlang-syntax_tools Requires: erlang-tools Provides: %{realname} = %{version}-%{release} %description Erlang Build Tools. %prep %setup -q -n %{upstream}-%{realname}-%{git_tag} %patch1 -p1 -b .no_bundle %patch2 -p1 -b .remove_bundled_mustache %patch3 -p1 -b .remove_bundled_getopt %patch4 -p1 -b .allow_discarding_ports %if 0%{?el5} %patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 %endif # FIXME enable back when erlang-abnfc will be available rm -f src/rebar_abnfc_compiler.erl sed -i -e "/rebar_abnfc_compiler/d" ebin/rebar.app %if 0%{?el5} # Remove erlydtl support rm -f src/rebar_erlydtl_compiler.erl sed -i -e "/rebar_erlydtl_compiler/d" ebin/rebar.app # Remove reltool support - no reltool at all in the R12B rm -f src/rebar_reltool.erl sed -i -e "/rebar_reltool/d" ebin/rebar.app # Remove templater support - not required just for building anyway rm -f src/rebar_templater.erl sed -i -e "/rebar_templater/d" ebin/rebar.app %endif %build ./bootstrap %install rm -rf $RPM_BUILD_ROOT install -D -p -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/rebar mkdir -p $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{realname}-%{version}/ebin mkdir -p $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{realname}-%{version}/include install -m 644 ebin/%{realname}.app $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{realname}-%{version}/ebin install -m 644 ebin/*.beam $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{realname}-%{version}/ebin install -m 644 include/*.hrl $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{realname}-%{version}/include cp -a priv $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{realname}-%{version}/ %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc THANKS rebar.config.sample %{_bindir}/rebar %{_libdir}/erlang/lib/%{realname}-%{version} %changelog * 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