File elixir_make.spec of Package elixir_make
%def_enable check
%define bname elixir_make
Name: %bname
Version: 0.6.3
Release: 2
Summary: A Make compiler for Mix
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
BuildArch: noarch
Requires: elixir >= 1.3
BuildRequires: rpm-macros-erlang rpm-build-erlang
BuildRequires: elixir-mix elixir-hex
%{?_enable_check:BuildRequires: elixir-ex_unit}
%description
This project provides a Mix compiler that makes it straight-forward to use
makefiles in your Mix projects.
%prep
%setup -q -n %bname-%version
#patch -p1 -P0
sed -i \
-e '/^ deps:/a\ prune_code_paths: false,' \
-e '/^ deps:/s/: /&[], #/' \
mix.exs
%build
export LANG=en_US.UTF-8
ERL_COMPILER_OPTIONS='[inline,verbose]' mix compile --force --no-deps-check
%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 *.md %buildroot%_docdir/%name/
%if_enabled check
%check
export 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
* Tue Nov 19 2024 Led <ledest@gmail.com> 0.6.3-2
- fix build
- fix BuildRequires
* Tue Mar 07 2023 Led <ledest@gmail.com> 0.6.3-1
- 0.6.3