LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File proc.spec of Package proc (Project home:Ledest:erlang:20)

%define bname proc
Name: %bname
Version: 1.0.0
Release: 2
Summary: Erlang helper module for test purposes
License: MIT
Group: Development/Tools/Other
URL: https://github.com/miriampena/%bname
Source: %bname-%version.tar.xz
#Patch: %bname-%version-git.patch
BuildArch: noarch
Provides: erlang-%bname = %version-%release

BuildRequires: rpm-macros-erlang rpm-build-erlang
BuildRequires: rebar erl_interface
BuildRequires: epmd erlang-common_test-devel

%description
Erlang helper module for test purposes.
Allows the creation of processes that will wait on a receive loop for commands.


%prep
%setup -q -n %bname-%version
#patch -p1


%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,
                          [{erl_opts, [slim,inline|proplists:delete(debug_info, proplists:get_value(erl_opts, L, []))]}|proplists:delete(erl_opts, proplists:delete(deps, 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/%bname
ln -sf %_otplibdir/%bname-%version/doc %buildroot%_docdir/%bname/html
install -p -m 0644 README* %buildroot%_docdir/%bname/


%check
rebar -C %bname.rebar.config ct


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


%changelog
* Sun Jan 31 2016 Led <ledest@gmail.com> 1.0.0-2
- add epmd to BuildRequires

* Mon Dec 14 2015 Led <ledest@gmail.com> 1.0.0-1
- initial build