LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File goldrush.spec of Package goldrush (Project home:Ledest:erlang:R16)

%define bname goldrush
Name: %bname
Version: 0.1.7
Release: 1
Summary: An  Erlang app that provides fast event stream processing
License: BSD-3-Clause
Group: Development/Tools/Other
URL: https://github.com/DeadZen/%bname
Source: %bname-%version.tar.xz
BuildArch: noarch
Provides: erlang-%bname = %version-%release

BuildRequires: rpm-macros-erlang rpm-build-erlang
BuildRequires: erlang >= R13
BuildRequires: rebar erl_interface

%description
Goldrush is a small Erlang app that provides fast event stream processing.


%prep
%setup -q -n %bname-%version


%build
erl -noshell -eval '
{ok, L} = file:consult("rebar.config"),
file:write_file("%bname.rebar.config",
                lists:map(fun(E) -> io_lib:format("~p.~n", [E]) end,
                          [lists:keystore(erl_opts, 1, proplists:delete(deps, L),
                                          {erl_opts,
                                           [no_debug_info,slim,inline|lists:delete(debug_info, proplists:get_value(erl_opts, L, []))]})])),
halt().'
for c in compile doc; do
	rebar -C %bname.rebar.config $c -v
done


%install
install -d -m 0755 %buildroot%_otplibdir/%bname-%version/ebin
install -p -m 0644 ebin/* %buildroot%_otplibdir/%bname-%version/ebin/
install -d -m 0755 %buildroot%_otplibdir/%bname-%version/doc
install -p -m 0644 doc/*.{css,html,png} %buildroot%_otplibdir/%bname-%version/doc/
install -d -m 0755 %buildroot%_docdir/%name
ln -sf %_otplibdir/%name-%version/doc %buildroot%_docdir/%name/html
install -p -m 0644 README* %buildroot%_docdir/%name/


%if 0
%check
rebar -C %bname.rebar.config eunit
%endif


%files
%defattr(-,root,root)
%doc %_docdir/%name
%_otplibdir/*


%changelog
* Sat Jul 25 2015 Led <ledest@gmail.com> 0.1.7-1
- initial build