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