%global realname jiffy
Name: erlang-%{realname}
Version: 1.1.1
Release: %autorelease
Summary: Erlang JSON parser
License: MIT and BSD
URL: https://github.com/davisp/%{realname}
Source0: https://github.com/davisp/%{realname}/archive/%{version}/%{realname}-%{version}.tar.gz
# Use double conversion from the system instead of the bundled one
Patch1: erlang-jiffy-0001-Use-system-double-conversion.patch
BuildRequires: erlang-rebar
BuildRequires: gcc-c++
BuildRequires: double-conversion-devel
Provides: %{realname} = %{version}
Obsoletes: %{realname} < %{version}
%description
A JSON parser for Erlang implemented as a NIF.
%prep
%autosetup -p 1 -n %{realname}-%{version}
# Use double conversion from the system instead of the bundled one
rm -r c_src/double-conversion
%build
%{erlang_compile}
%install
%{erlang_install}
%check
%{erlang_test}
%files
%{erlang_appdir}/
%doc README.md
%license LICENSE
%changelog
%autochangelog