File relx.spec of Package relx
%def_disable check
%define bname relx
Name: %bname
Version: 4.5.0
Release: 2
Summary: A release assembler for Erlang
License: Apache-2.0
Group: Development/Tools/Other
URL: https://github.com/erlware/%bname
Source: %bname-%version.tar.xz
#Patch0: %bname-%version-git.patch
Patch1: 0001-fix-hex-metdata-license-to-match-spdx-list-of-licens.patch
Patch11: %bname-4.1.0-shebang.patch
Patch12: %bname-4.0.2-test.patch
Patch13: %bname-4.3.0-stacktrace.patch
Patch21: %bname-4.3.0-pre19.patch
Provides: erlang-%bname = %version-%release
BuildArch: noarch
BuildRequires: rpm-macros-erlang rpm-build-erlang
BuildRequires: erlang-otp-devel
BuildRequires: rebar >= 2.6.1-7
%{?_enable_check:BuildRequires: erlang-common_test erlang-common_test-devel epmd}
%description
Relx assembles releases for an Erlang/OTP release. Given a release specification
and a list of directories in which to search for OTP applications it will
generate a release output. That output depends heavily on what plugins available
and what options are defined, but usually it is simply a well configured release
directory.
The release-specification-file is optional but otherwise contains additional
specification information for releases.
%package doc
Summary: Documentation of %bname
Group: Documentation/HTML
Provides: erlang-%bname-doc = %version-%release
Conflicts: %bname < 3.23.1-2
%description doc
Relx assembles releases for an Erlang/OTP release. Given a release specification
and a list of directories in which to search for OTP applications it will
generate a release output. That output depends heavily on what plugins available
and what options are defined, but usually it is simply a well configured release
directory.
This package contains documentation of %bname.
%prep
%setup -q -n %bname-%version
#patch0 -p1
%patch1 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%if %_otp_release < 19
%patch21 -p1
%endif
erl -noshell -eval '
{ok, [{application, %bname, L}]} = file:consult("src/%bname.app.src"),
file:write_file("src/%bname.app.src",
io_lib:format("{application, %bname, ~p}.~n", [lists:keyreplace(vsn, 1, L, {vsn, "%version"})]), [raw]),
init:stop().'
%build
erl -noshell -eval '
{ok, L} = file:consult("rebar.config"),
file:write_file("%bname.rebar.config",
lists:map(fun(E) -> [io_lib:print(E), ".\n"] end,
lists:keystore(edoc_opts, 1, lists:keydelete(deps, 1, L), {edoc_opts, [{preprocess, true}]})),
[raw]),
init:stop().'
ERL_COMPILER_OPTIONS="[inline,nowarn_deprecated_function,nowarn_export_all,verbose]" rebar %{?_smp_mflags} -C %bname.rebar.config compile -v
rebar %{?_smp_mflags} -C %bname.rebar.config doc -v
cat > %bname.escript <<__EOF__
#!%__escript
%%%%
%%%%!-noinput +sbtu +A0
main(X) -> relx:main(X).
__EOF__
%install
install -d -m 0755 %buildroot%_otplibdir/%bname-%version/ebin
install -p -m 0644 ebin/* %buildroot%_otplibdir/%bname-%version/ebin/
install -d -m 0755 %buildroot%_otplibdir/%bname-%version/priv/templates
for i in \
priv/templates/bin priv/templates/builtin_* priv/templates/erl_* priv/templates/extended_bin priv/templates/bin \
priv/templates/install_upgrade_escript priv/templates/nodetool priv/templates/sys_config priv/templates/vm_args;
do
head -1 $i | grep '^#!' && m="0755" || m="0644"
install -p -m $m $i %buildroot%_otplibdir/%bname-%version/priv/templates/
done
install -d -m 0755 %buildroot%_otplibdir/%bname-%version/doc
install -p -m 0644 doc/*.{css,html,png} %buildroot%_otplibdir/%bname-%version/doc/
install -d -m 0755 %buildroot%_docdir/%name
ln -sf %_otplibdir/%bname-%version/doc %buildroot%_docdir/%name/html
install -p -m 0644 README* CONTRIBUTING* %buildroot%_docdir/%name/
install -pD -m 0755 %bname.escript %buildroot%_bindir/%bname
%if_enabled check
%check
ERL_COMPILER_OPTIONS='[inline,nowarn_deprecated_function,nowarn_export_all,{i, "'"$PWD"'/src"},verbose]' rebar -C %bname.rebar.config ct -v
%endif
%files
%defattr(-,root,root)
%_otplibdir/*
%_bindir/*
%exclude %_otplibdir/%bname-*/doc
%files doc
%defattr(-,root,root)
%doc %_docdir/%name
%doc %dir %_otplibdir/%bname-*
%doc %_otplibdir/%bname-*/doc
%changelog
* Thu May 20 2022 Led <ledest@gmail.com> 4.5.0-2
- add patches:
+ 0001-fix-hex-metdata-license-to-match-spdx-list-of-licens.patch
* Thu May 20 2022 Led <ledest@gmail.com> 4.5.0-1
- 4.5.0
* Mon May 24 2021 Led <ledest@gmail.com> 4.4.0-1
- 4.4.0
- git 5a9f6eb
* Tue Mar 23 2021 Led <ledest@gmail.com> 4.3.0-2
- add patches:
+ relx-4.3.0-stacktrace.patch
+ relx-4.3.0-pre19.patch
* Thu Feb 25 2021 Led <ledest@gmail.com> 4.3.0-1
- 4.3.0
* Tue Feb 23 2021 Led <ledest@gmail.com> 4.2.0-1
- 4.2.0
* Tue Feb 23 2021 Led <ledest@gmail.com> 4.1.0-1
- 4.1.0
- update patches:
+ relx-4.1.0-shebang.patch
* Wed Sep 02 2020 Led <ledest@gmail.com> 4.0.2-1
- 4.0.2
- remove patches:
+ relx-3.22.1-fix-templates.patch
+ relx-3.24.3-doc.patch
- add patches:
+ relx-4.0.2-shebang.patch
+ relx-4.0.2-test.patch
- update BuildRequires
- remove devel subpackage
* Mon Aug 24 2020 Led <ledest@gmail.com> 3.33.0-1
- 3.33.0
* Mon Aug 24 2020 Led <ledest@gmail.com> 3.32.1-1
- 3.32.1
- update BuildRequires
* Mon Aug 24 2020 Led <ledest@gmail.com> 3.31.0-1
- 3.31.0
* Mon Aug 24 2020 Led <ledest@gmail.com> 3.30.0-1
- 3.30.0
* Mon Aug 24 2020 Led <ledest@gmail.com> 3.29.0-1
- 3.29.0
* Mon Aug 24 2020 Led <ledest@gmail.com> 3.28.0-1
- 3.28.0
* Mon Aug 24 2020 Led <ledest@gmail.com> 3.27.0-2
- update BuildRequires
* Sun Aug 23 2020 Led <ledest@gmail.com> 3.27.0-1
- 3.27.0
- disable %%check
* Sun Aug 23 2020 Led <ledest@gmail.com> 3.24.5-1
- 3.24.5
* Sat Feb 10 2018 Led <ledest@gmail.com> 3.24.4-1
- 3.24.4
* Thu Dec 07 2017 Led <ledest@gmail.com> 3.24.3-2
- update BuildRequires
* Sun Nov 26 2017 Led <ledest@gmail.com> 3.24.3-1
- 3.24.3
* Fri Nov 24 2017 Led <ledest@gmail.com> 3.23.1-2
- update BuildRequires
- move headers and docs to separate packages
* Sun Jul 16 2017 Led <ledest@gmail.com> 3.23.1-1
- 3.23.1
- update patches:
+ relx-3.23.1-doc.patch
* Wed May 31 2017 Led <ledest@gmail.com> 3.23.0-1
- 3.23.0
* Sun May 21 2017 Led <ledest@gmail.com> 3.22.3-4
- revert BuildRequires
* Sat May 20 2017 Led <ledest@gmail.com> 3.22.3-3
- update BuildRequires
* Sun Mar 26 2017 Led <ledest@gmail.com> 3.22.3-2
- fix script
* Sun Mar 26 2017 Led <ledest@gmail.com> 3.22.3-1
- 3.22.3
* Sun Jan 01 2017 Led <ledest@gmail.com> 3.22.1-1
- 3.22.1
- add patches:
+ relx-3.22.1-fix-templates.patch
* Mon Dec 12 2016 Led <ledest@gmail.com> 3.21.1-2
- git c305c89
- add nowarn_export_all compile option
* Thu Oct 20 2016 Led <ledest@gmail.com> 3.21.1-1
- 3.21.1
- git 53a87ed
* Fri Aug 26 2016 Led <ledest@gmail.com> 3.21.0-1
- 3.21.0
* Mon Jul 25 2016 Led <ledest@gmail.com> 3.20.0-1
- 3.20.0
* Sat Apr 02 2016 Led <ledest@gmail.com> 3.18.0-1
- 3.18.0
- git 1e15397
* Sat Apr 02 2016 Led <ledest@gmail.com> 3.17.0-1
- 3.17.0
- clean up and update BuildRequires
* Sun Feb 14 2016 Led <ledest@gmail.com> 3.15.0-1
- 3.15.0
* Sun Jan 17 2016 Led <ledest@gmail.com> 3.13.0-1
- 3.13.0
- add patches:
+ relx-3.13.0-git.patch
* Sun Nov 29 2015 Led <ledest@gmail.com> 3.9.0-1
- 3.9.0
- remove patches:
+ relx-3.7.1-git.patch
* Sun Oct 11 2015 Led <ledest@gmail.com> 3.7.1-1
- 3.7.1
* Fri Sep 04 2015 Led <ledest@gmail.com> 3.5.0-1
- 3.5.0
- add patches:
+ relx-3.5.0-git.patch
* Sat Jul 04 2015 Led <ledest@gmail.com> 3.1.0-1
- 3.1.0
- fix changelog
* Sat Jul 04 2015 Led <ledest@gmail.com> 2.1.0-1
- 2.1.0
* Thu Jul 02 2015 Led <ledest@gmail.com> 2.0.0-2
- fix build with Erlang 18
* Sun May 31 2015 Led <ledest@gmail.com> 2.0.0-1
- initial build