%global srcname proper
# Erlang packages do not provide debug subpackages.
%global debug_package %{nil}
Name: erlang-%{srcname}
Version: 1.1
Release: 2%{?dist}
Summary: A QuickCheck-inspired property-based testing tool for Erlang
License: GPLv3+
URL: https://github.com/manopapad/%{srcname}
Source0: https://github.com/manopapad/%{srcname}/archive/v%{version}.tar.gz
BuildRequires: erlang
BuildRequires: erlang-eunit
BuildRequires: erlang-rebar
BuildRequires: erlang-rpm-macros
Requires: erlang-erts
%description
PropEr (PROPerty-based testing tool for ERlang) is a QuickCheck-inspired
open-source property-based testing tool for Erlang.
%prep
%setup -q -n %{srcname}-%{version}
%build
%rebar_compile
./make_doc
%check
# Erlang eunit tests fail on i686, as reported in this bug:
# https://bugzilla.redhat.com/show_bug.cgi?id=1240487
%ifnarch i686
%__rebar eunit
%endif
%install
install -d $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{srcname}-%{version}/ebin
install -d $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{srcname}-%{version}/include
install -pm644 ebin/* $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{srcname}-%{version}/ebin
install -pm644 include/proper* $RPM_BUILD_ROOT%{_libdir}/erlang/lib/%{srcname}-%{version}/include
%files
%license COPYING
%doc doc
%doc examples
%doc README.md
%{_libdir}/erlang/lib/%{srcname}-%{version}
%changelog
* Thu Jan 07 2016 Randy Barlow <rbarlow@redhat.com> - 1.1-2
- Correct the license from GPLv3 to GPLv3+.
* Tue Jan 05 2016 Randy Barlow <rbarlow@redhat.com> - 1.1-1
- Initial release.