2 %bcond_with bootstrap # bootstrap build
3 %bcond_with tests # build without tests
5 Summary: Erlang Build Tools
10 Group: Development/Tools
11 Source0: https://github.com/rebar/rebar/tarball/%{version}/rebar-%{version}.tar.bz2
12 # Source0-md5: b9b21756f56902b339559f3833d2c544
13 Source1: rebar.escript
14 URL: https://github.com/rebar/rebar
18 BuildRequires: erlang-rebar
21 Provides: rebar = %{version}-%{release}
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 %{__rm} -r rebar-rebar-*
38 install %{SOURCE1} ./rebar
46 rm -rf $RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT%{_bindir} \
48 $RPM_BUILD_ROOT%{_libdir}/erlang/lib/rebar-%{version}/{ebin,include}
50 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/rebar
51 cp -p ebin/rebar.app $RPM_BUILD_ROOT%{_libdir}/erlang/lib/rebar-%{version}/ebin
52 cp -p ebin/*.beam $RPM_BUILD_ROOT%{_libdir}/erlang/lib/rebar-%{version}/ebin
53 cp -p include/*.hrl $RPM_BUILD_ROOT%{_libdir}/erlang/lib/rebar-%{version}/include
54 cp -a priv $RPM_BUILD_ROOT%{_libdir}/erlang/lib/rebar-%{version}
57 %defattr(644,root,root,755)
58 %doc LICENSE NOTES.org README.md THANKS rebar.config.sample
59 %defattr(644,root,root,755)
60 %attr(755,root,root) %{_bindir}/rebar
61 %{_libdir}/erlang/lib/rebar-%{version}
64 rm -rf $RPM_BUILD_ROOT