LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File elixir-bson.spec of Package elixir-bson (Project home:Ledest:erlang:18)

%define bname bson
Name: elixir-%bname
Version: 0.4.4
Release: 1
Summary: BSON documents in Elixir language
License: MIT
Group: Development/Tools/Other
URL: https://github.com/checkiz/%name
Source: %name-%version.tar.xz
BuildArch: noarch
Requires: elixir >= 1.0

BuildRequires: rpm-macros-erlang rpm-build-erlang
BuildRequires: mix ex_doc earmark

%description
BSON implementation for Elixir Language.
BSON is a binary format in which zero or more key/value pairs are stored as a
single entity, called a document. It is a data type with a standard binary
representation defined at http://www.bsonspec.org.
This implements version 1.0 of that spec.


%prep
%setup -q -n %name-%version

sed -i '/elixir:/s/\.0"/"/' mix.exs


%build
for c in compile docs; do
	LANG=en_US.UTF-8 mix $c --force --no-deps-check
done


%install
install -d -m 0755 %buildroot%_otplibdir/%bname-%version/ebin
install -p -m 0644 _build/dev/lib/%bname/ebin/* %buildroot%_otplibdir/%bname-%version/ebin/
install -d -m 0755 %buildroot%_otplibdir/%bname-%version/doc
install -p -m 0644 doc/*.html %buildroot%_otplibdir/%bname-%version/doc/
install -d -m 0755 %buildroot%_docdir/%name
ln -sf %_otplibdir/%bname-%version/doc %buildroot%_docdir/%name/html
install -p -m 0644 *.md %buildroot%_docdir/%name/

%add_erlang_req_beam_skiplist Elixir.Bson.Encoder.Protocol.Function
%add_erlang_req_beam_skiplist Elixir.Bson.Encoder.Protocol.PID Elixir.Bson.Encoder.Protocol.Port
%add_erlang_req_beam_skiplist Elixir.Bson.Encoder.Protocol.Reference Elixir.Bson.Encoder.Protocol.Tuple


%check
mix test --force --no-deps-check


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


%changelog