File postgrex.spec of Package postgrex

%def_without doc

%define bname postgrex
Name: %bname
Version: 0.13.5
Release: 3
Summary: PostgreSQL driver for Elixir
License: Apache-2.0
Group: Development/Tools/Other
URL: https://github.com/ericmj/%bname
Source: %bname-%version.tar.xz
Patch: %bname-%version-git.patch
BuildArch: noarch
Provides: elixir-%bname = %version-%release
Requires: elixir >= 1.3
Requires: elixir-decimal >= 1.0

BuildRequires: rpm-macros-erlang rpm-build-erlang
BuildRequires: elixir-mix elixir-hex
BuildRequires: elixir-decimal >= 1.0
BuildRequires: elixir-connection >= 1.0
BuildRequires: elixir-db_connection >= 1.1
%if_with doc
BuildRequires: ex_doc >= 0.12
BuildRequires: earmark >= 0.1
%endif

%description
PostgreSQL driver for Elixir.


%prep
%setup -q -n %bname-%version
%patch -p1


%build
export LANG=en_US.UTF-8
ERL_COMPILER_OPTIONS='[inline,verbose]' mix compile --force --no-deps-check
%{?_with_doc:mix docs}


%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%_docdir/%name
install -m 0644 README* CHANGELOG* %buildroot%_docdir/%name/
%if_with doc
install -d -m 0755 %buildroot%_otplibdir/%bname-%version/doc/dist
install -p -m 0644 doc/dist/* %buildroot%_otplibdir/%bname-%version/doc/dist/
install -p -m 0644 doc/*.html %buildroot%_otplibdir/%bname-%version/doc/
ln -sf %_otplibdir/%bname-%version/doc %buildroot%_docdir/%name/html
%endif


%if 0
%check
LANG=en_US.UTF-8 ERL_COMPILER_OPTIONS='[inline,verbose]' mix test
%endif


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


%changelog
* Sun May 05 2019 Led <ledest@gmail.com> 0.13.5-3
- git 7e24892

* Sun May 05 2019 Led <ledest@gmail.com> 0.13.5-2
- update BuildRequires

* Sun Mar 11 2018 Led <ledest@gmail.com> 0.13.5-1
- 0.13.5
- without doc

* Sat Sep 30 2017 Led <ledest@gmail.com> 0.13.2-4
- git 6a75226

* Mon Jul 17 2017 Led <ledest@gmail.com> 0.13.2-3
- git 24fecdf

* Thu Mar 30 2017 Led <ledest@gmail.com> 0.13.2-2
- git 87178f1

* Sun Mar 12 2017 Led <ledest@gmail.com> 0.13.2-1
- 0.13.2
- git 425f203

* Thu Feb 23 2017 Led <ledest@gmail.com> 0.13.1-1
- 0.13.1

* Wed Feb 08 2017 Led <ledest@gmail.com> 0.13.0-1
- 0.13.0
- git a8a1d5b

* Sun Oct 09 2016 Led <ledest@gmail.com> 0.12.1-1
- 0.12.1
- git 56a5e0c

* Thu Sep 08 2016 Led <ledest@gmail.com> 0.12.0-1
- 0.12.0

* Sat Jun 18 2016 Led <ledest@gmail.com> 0.11.2-1
- 0.11.2

* Sun Feb 28 2016 Led <ledest@gmail.com> 0.11.1-1
- 0.11.1
- git a598aab

* Mon Feb 15 2016 Led <ledest@gmail.com> 0.11.0-1
- 0.11.0

* Sun Dec 13 2015 Led <ledest@gmail.com> 0.10.0-1
- 0.10.0
- add patches:
  + 0001-Add-Connection-and-Decimal-to-applications-in-mix.ex.patch
- update BuildRequires

* Sat Sep 12 2015 Led <ledest@gmail.com> 0.9.1-1
- 0.9.1

* Sat Jul 04 2015 Led <ledest@gmail.com> 0.8.4-1
- 0.8.4

* Tue Jun 02 2015 Led <ledest@gmail.com> 0.8.2-1
- 0.8.2

* Thu Apr 16 2015 Led <ledest@gmail.com> 0.8.1-1
- 0.8.1
- remove patches:
  + 0001-Fix-time-and-timestamp-off-by-one-bounds.patch

* Mon Mar 09 2015 Led <ledest@gmail.com> 0.8.0-1
- initial build
openSUSE Build Service is sponsored by