File earmark_parser.spec of Package earmark_parser
%def_disable check
%def_without doc
%define bname earmark_parser
Name: %bname
Version: 1.4.10
Release: 1
Summary: A Pure Elixir Markdown Parser
License: Apache-2.0
Group: Development/Tools/Other
URL: https://github.com/RobertDober/%bname
Source: %bname-%version.tar.xz
#Patch: %bname-%version-git.patch
BuildArch: noarch
Provides: elixir-%bname = %version-%release
Requires: elixir >= 1.7
BuildRequires: rpm-macros-erlang rpm-build-erlang
BuildRequires: elixir-eex >= 1.7
BuildRequires: mix >= 1.3.2-7
BuildRequires: elixir-hex
BuildRequires: erlang-parsetools-devel
%description
EarmarkParser is a pure Elixir Markdown Parser (split from Earmark).
%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* RELEASE* %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
LANG=en_US.UTF-8 ERL_COMPILER_OPTIONS='[inline,verbose]' mix test --no-deps-check
%endif
%files
%defattr(-,root,root)
%doc %_docdir/%name
%_otplibdir/*
%changelog
* Sat Jul 15 2023 Led <ledest@gmail.com> 1.4.10-1
- 1.4.10