File ex_doc.spec of Package ex_doc

%def_disable check
%def_without doc

%define bname ex_doc
Name: %bname
Version: 0.36.1
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
#Patch0: %bname-%version-git.patch
Patch1: 0001-Increase-delay-to-500.patch
Patch2: 0002-Initialize-more-content.patch
Patch3: 0003-Update-lock.patch
Patch4: 0004-Update-assets.patch
BuildArch: noarch
Provides: elixir-%bname = %version-%release
Requires: elixir >= 1.11

BuildRequires: rpm-macros-erlang rpm-build-erlang
BuildRequires: elixir >= 1.11
BuildRequires: elixir-eex >= 1.11
BuildRequires: mix >= 1.3.2-7
BuildRequires: elixir-hex
BuildRequires: elixir-earmark_parser >= 1.4.42
BuildRequires: elixir-makeup_erlang >= 0.1
BuildRequires: elixir-makeup_elixir >= 0.14
BuildRequires: elixir-makeup_html >= 0.1.0
BuildRequires: elixir-makeup_c >= 0.1.0
%if_enabled check
# check
BuildRequires: erlang-edoc
BuildRequires: makeup_html >= 0.0.0
BuildRequires: elixir-jason >= 1.2
BuildRequires: elixir-floki >= 0.0
BuildRequires: elixir-easyhtml >= 0.0
%endif

%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 -P0
%define git_apply() git apply -C3 --whitespace=nowarn %{expand:%%PATCH%{1}}
%git_apply 1
%git_apply 2
%patch -p1 -P3
%git_apply 4
sed -i '/^      deps:/a\      prune_code_paths: false,' mix.exs
sed -i '1s|^.*$|#!/usr/bin/elixir|' bin/%bname


%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,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_enabled check
%check
export LANG=en_US.UTF-8 
MIX_ENV=test mix clean
ERL_COMPILER_OPTIONS='[inline,verbose]' mix test --no-deps-check
%endif


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


%changelog
* Tue Dec 24 2024 Led <ledest@gmail.com> 0.36.1-2
- add patches:
  + 0001-Increase-delay-to-500.patch
  + 0002-Initialize-more-content.patch
  + 0003-Update-lock.patch
  + 0004-Update-assets.patch

* Tue Dec 24 2024 Led <ledest@gmail.com> 0.36.1-1
- 0.36.1

* Wed Jun 19 2024 Led <ledest@gmail.com> 0.34.0-1
- 0.34.0

* Wed Jun 19 2024 Led <ledest@gmail.com> 0.33.0-1
- 0.33.0

* Sat May 11 2024 Led <ledest@gmail.com> 0.32.2-4
- update BuildRequires

* Sat May 11 2024 Led <ledest@gmail.com> 0.32.2-3
- update BuildRequires

* Sat May 11 2024 Led <ledest@gmail.com> 0.32.2-2
- fix BuildRequires

* Sat May 11 2024 Led <ledest@gmail.com> 0.32.2-1
- 0.32.2
- git 4e24493

* Sat May 11 2024 Led <ledest@gmail.com> 0.31.2-1
- 0.31.2

* Sat May 11 2024 Led <ledest@gmail.com> 0.30.9-1
- 0.30.9

* Thu May 09 2024 Led <ledest@gmail.com> 0.30.3-1
- 0.30.3

* Wed May 08 2024 Led <ledest@gmail.com> 0.29.4-1
- 0.29.4

* Sun Jul 16 2023 Led <ledest@gmail.com> 0.28.6-1
- 0.28.6

* Sun Jul 16 2023 Led <ledest@gmail.com> 0.27.2-1
- 0.27.2

* Sun Jul 16 2023 Led <ledest@gmail.com> 0.26.0-1
- 0.26.0
- git ee7772c

* Sun Jul 16 2023 Led <ledest@gmail.com> 0.25.1-1
- 0.25.1
- git f50e754

* Sun Jul 16 2023 Led <ledest@gmail.com> 0.24.2-1
- 0.24.2

* Sun Jul 16 2023 Led <ledest@gmail.com> 0.23.0-3
- update BuildRequires

* Sun Jul 16 2023 Led <ledest@gmail.com> 0.23.0-2
- update BuildRequires

* Sun Jul 16 2023 Led <ledest@gmail.com> 0.23.0-1
- 0.23.0
- git 2cc44d5

* Sun Jul 16 2023 Led <ledest@gmail.com> 0.22.6-2
- update BuildRequires

* Sat Jul 15 2023 Led <ledest@gmail.com> 0.22.6-1
- 0.22.6

* Sat Sep 07 2019 Led <ledest@gmail.com> 0.19.3-1
- 0.19.3

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

* 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