# "realname" variable name is required for erlang_appdir macro %global realname rebar3_fmt # Technically we're noarch, but our install path is not. For non-NIF # or non-DRV packages we can set the debug package to nil. # This line should be removed if a package contains NIF, or driver. %global debug_package %{nil} # True version number used in the erlang library directory %global realver 1.18.0 Name: erlang-formatter Version: 1.4.0 Release: 1%{?dist} Summary: Format Erlang code using Emacs' erlang-mode License: Apache-2.0 URL: https://github.com/fenollp/erlang-formatter Source0: https://github.com/fenollp/erlang-formatter/archive/refs/tags/1.4.0.tar.gz BuildRequires: erlang-rebar3 Requires: emacs BuildArch: noarch %description Format Erlang code "to the standard": using Emacs' erlang-mode. %prep %autosetup %build %{erlang3_compile} %install # Manually installing files because of realver variable mkdir -p %{buildroot}%{_erllibdir}/%{realname}-%{realver} install -p -m 0644 _build/default/lib/%{realname}/ebin/*.beam %{buildroot}%{_erllibdir}/%{realname}-%{realver}/ install -p -m 0644 _build/default/lib/%{realname}/ebin/%{realname}.app %{buildroot}%{_erllibdir}/%{realname}-%{realver}/%{realname}.app %files %license LICENSE %doc README.md %{_erllibdir}/%{realname}-%{realver}/ %changelog * Mon Jul 10 2023 Matthieu Saulnier - 1.4.0-1 - Initial packaging