File ex_doc.spec of Package ex_doc

%def_without doc

%define bname ex_doc
Name: %bname
Version: 0.18.3
Release: 1
Summary: A tool to generate documentation for your Elixir projects
License: Apache-2.0
Group: Development/Tools/Other
URL: https://github.com/elixir-lang/%bname
Source: %bname-%version.tar.xz
#Patch: %bname-%version-git.patch
BuildArch: noarch
Provides: elixir-%bname = %version-%release
Requires: elixir >= 1.3

BuildRequires: rpm-macros-erlang rpm-build-erlang
BuildRequires: elixir-eex >= 1.3
BuildRequires: mix >= 1.3.2-7
BuildRequires: earmark >= 1.1

%description
ExDoc is a tool to generate documentation for your Elixir projects. In case you
are looking for documentation for Elixir itself, check out Elixir's website
(http://elixir-lang.org/).


%prep
%setup -q -n %bname-%version
#patch -p1
sed -i '1s|^.*$|#!/usr/bin/elixir|' bin/%bname


%build
export LANG=en_US.UTF-8 MIX_NO_DEPS=1
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,bin},%_bindir}
install -p -m 0644 _build/dev/lib/%bname/ebin/* %buildroot%_otplibdir/%bname-%version/ebin/
install -p -m 0755 bin/* %buildroot%_otplibdir/%bname-%version/bin/
ln -sf %_otplibdir/%bname-%version/bin/%bname %buildroot%_bindir/
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
MIX_NO_DEPS=1 LANG=en_US.UTF-8 ERL_COMPILER_OPTIONS='[inline,verbose]' mix test
%endif


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


%changelog
* Sat Mar 10 2018 Led <ledest@gmail.com> 0.18.3-1
- 0.18.3
- without doc

* Sat Nov 04 2017 Led <ledest@gmail.com> 0.18.1-1
- 0.18.1

* Sat Sep 16 2017 Led <ledest@gmail.com> 0.16.4-1
- 0.16.4

* Sun Jul 16 2017 Led <ledest@gmail.com> 0.16.2-1
- 0.16.2
- git 4c45bc0

* Mon Apr 17 2017 Led <ledest@gmail.com> 0.15.1-1
- 0.15.1

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

* Sun Dec 11 2016 Led <ledest@gmail.com> 0.14.5-2
- add patches:
  + 0001-Properly-link-to-erlang-lib-dirs.patch

* Sun Dec 11 2016 Led <ledest@gmail.com> 0.14.5-1
- 0.14.5

* Sun Oct 30 2016 Led <ledest@gmail.com> 0.14.3-1
- 0.14.3

* Sun Oct 09 2016 Led <ledest@gmail.com> 0.14.2-1
- 0.14.2

* Mon Sep 19 2016 Led <ledest@gmail.com> 0.13.1-1
- 0.13.1

* Sun Aug 21 2016 Led <ledest@gmail.com> 0.13.0-4
- No ignore requires of Elixir.Error

* Sun Aug 21 2016 Led <ledest@gmail.com> 0.13.0-3
- build docs

* Sun Aug 21 2016 Led <ledest@gmail.com> 0.13.0-2
- git 1907d3f

* Sun Aug 21 2016 Led <ledest@gmail.com> 0.13.0-1
- 0.13.0
- remove patches:
  + Verify-callbacks-with-no-docs-included-527.patch
- update BuildRequires
- clean up spec

* Fri Jun 24 2016 Led <ledest@gmail.com> 0.12.0-1
- 0.12.0
- add patches:
  + Verify-callbacks-with-no-docs-included-527.patch

* Mon Feb 15 2016 Led <ledest@gmail.com> 0.11.4-2
- ignore requires of Elixir.Cmark

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

* Sun Jan 31 2016 Led <ledest@gmail.com> 0.11.1-2
- remove deps in mix.exs

* Sun Nov 29 2015 Led <ledest@gmail.com> 0.11.1-1
- 0.11.1

* Tue Sep 29 2015 Led <ledest@gmail.com> 0.10.0-1
- 0.10.0

* Fri Sep 18 2015 Led <ledest@gmail.com> 0.9.0-1
- 0.9.0
- remove patches:
  + ex_doc-0.7.3-git.patch

* Sat Jul 04 2015 Led <ledest@gmail.com> 0.7.3-2
- add patches:
  + ex_doc-0.7.3-git.patch

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

* Sun Mar 29 2015 Led <ledest@gmail.com> 0.7.2-1
- 0.7.2

* Mon Mar 09 2015 Led <ledest@gmail.com> 0.7.1-4
- update patches:
  + ex_doc-0.7.1-git.patch

* Mon Mar 09 2015 Led <ledest@gmail.com> 0.7.1-3
- add executable

* Mon Mar 09 2015 Led <ledest@gmail.com> 0.7.1-2
- Ignore requires of Elixir.Error

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