LogoopenSUSE Build Service > Projects
Sign Up | Log In

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

%define bname erlando
Name: %bname
Version: 0
Release: 5
Summary: A set of syntax extensions for Erlang
License: MPL-1.0
Group: Development/Tools/Other
URL: https://github.com/rabbitmq/%bname
Source: %bname.tar.xz
Patch1: 0001-test-Erlang-OTP-21-stacktrace-syntax-support.patch
BuildArch: noarch
Provides: erlang-%bname = %version-%release

BuildRequires: rpm-macros-erlang rpm-build-erlang
BuildRequires: rebar >= 2.6.1-7
BuildRequires: erlang-pmod_transform

Erlando is a set of syntax extensions for Erlang.
Currently it consists of three syntax extensions, all of which take the form of

%setup -q -n %bname
%patch1 -p1
erl -noshell -eval '
{ok, [{application, %bname, L}]} = file:consult("src/%bname.app.src"),
                io_lib:format("{application, %bname, ~81p}.~n", [lists:keystore(vsn, 1, L, {vsn, "%version"})]),

erl -noshell -eval '
{ok, L} = file:consult("rebar.config"),
                lists:map(fun(E) -> [io_lib:print(E), ".\n"] end,
                          lists:keystore(erl_opts, 1, proplists:delete(deps, L),
                                         {erl_opts, [nowarn_export_all|proplists:get_value(erl_opts, L, [])]})),
ERL_COMPILER_OPTIONS="[inline,verbose]" rebar %{?_smp_mflags} -C %bname.rebar.config compile -v

install -d -m 0755 %buildroot%_otplibdir/%bname-%version/ebin
for i in ebin/*; do
	case $i in
		*/test.beam) ;;
		*) install -p -m 0644 $i %buildroot%_otplibdir/%bname-%version/ebin/ ;;

rebar -C %bname.rebar.config eunit -v

%doc README*

* Sun Feb 24 2019 Led <ledest@gmail.com> 0-5
- add patches:
  + 0001-test-Erlang-OTP-21-stacktrace-syntax-support.patch

* Fri Aug 25 2017 Led <ledest@gmail.com> 0-4
- add nowarn_export_all opt

* Fri Aug 25 2017 Led <ledest@gmail.com> 0-3
- remove slim opt

* Sun Feb 14 2016 Led <ledest@gmail.com> 0-2
- git 1c1ef25

* Thu Dec 17 2015 Led <ledest@gmail.com> 0-1
- initial build