%global srcname p1_pgsql
# Erlang packages do not provide debug subpackages.
%global debug_package %{nil}
Name: erlang-%{srcname}
Version: 1.0.0
Release: 1%{?dist}
Provides: erlang-pgsql = %{version}-%{release}
Obsoletes: erlang-pgsql <= 0-15
Summary: Pure Erlang PostgreSQL driver
License: ERPL
URL: https://github.com/processone/p1_pgsql/
Source0: https://github.com/processone/p1_pgsql/archive/%{version}.tar.gz
BuildRequires: erlang
BuildRequires: erlang-rebar
BuildRequires: erlang-rpm-macros
Requires: erlang-erts
%description
This is an Erlang PostgreSQL driver, used by ejabberd.
%prep
%autosetup -n p1_pgsql-%{version}
%build
%rebar_compile
%install
install -d $RPM_BUILD_ROOT%{_erllibdir}/%{srcname}-%{version}/ebin
install -pm644 ebin/* $RPM_BUILD_ROOT%{_erllibdir}/%{srcname}-%{version}/ebin
%files
%license EPLICENSE
%{_erllibdir}/%{srcname}-%{version}
%changelog
* Wed Feb 17 2016 Randy Barlow <rbarlow@redhat.com> - 1.0.0-1
- Update to 1.0.0.
- Update the URL and Source0 for the new upstream repository.
* Tue Jan 05 2016 Randy Barlow <rbarlow@redhat.com> - 0-15.20150428gite72c03c6
- Obsolete erlang-pgsql, which is the same package but installed to the wrong location for ejabberd.
- Remove the noarch, which was causing this package to get installed to the wrong location.
- Add a dependency on erlang-erts.
* Tue Dec 29 2015 Randy Barlow <rbarlow@redhat.com> - 0-1.20150428gite72c03c6
- Initial release.