Sophie

Sophie

distrib > Mageia > 8 > aarch64 > by-pkgid > a124f396369c778669dd9a92a5311a6c > files > 1

erlang-rebar-2.6.4-9.mga8.src.rpm

%global realname rebar
%global upstream rebar

# Set this to true when starting a rebuild of the whole erlang stack. There's
# a cyclical dependency between erlang-rebar and erlang-getopt so this package
# (rebar) needs to get built first in bootstrap mode.
%global need_bootstrap_set 0

%{!?need_bootstrap: %global need_bootstrap  %{need_bootstrap_set}}


Name:		erlang-%{realname}
Version:	2.6.4
Release:	%mkrel 9
BuildArch:	noarch
Summary:	Erlang Build Tools
Group:		Development/Tools
License:	MIT
URL:		https://github.com/%{upstream}/%{realname}
Source0:	https://github.com/%{upstream}/%{realname}/archive/%{version}/%{realname}-%{version}.tar.gz
Source1:	rebar.escript
# Fedora/EPEL-specific
Patch1:		rebar-0001-Load-templates-from-the-filesystem-first.patch
# Fedora/EPEL-specific
Patch2:		rebar-0002-Remove-bundled-mustache.patch
# The bundled getopt is necessary to do the initial bootstrap since
# erlang-getopt requires erlang-rebar to build and vice versa.
# Fedora/EPEL-specific
Patch3:		rebar-0003-Remove-bundled-getopt.patch
# Will be proposed for inclusion
Patch4:		rebar-0004-Allow-discarding-building-ports.patch
# Fedora/EPEL-specific - we're using at least R16B03
Patch5:		rebar-0005-Remove-any-traces-of-long-time-obsolete-escript-fold.patch
Patch6:		rebar-0006-remove-abnfc.patch
Patch7:		rebar-0007-Remove-support-for-gpb-compiler.patch
# Fedora/EPEL-specific - we're using at least R16B03
Patch8:		rebar-0008-Remove-pre-R15B02-workaround.patch
# Fedora/EPEL-specific - keep until we dump R16B03-1 and 17.x.y entirely
Patch9:		rebar-0009-Use-erlang-timestamp-0-explicitly.patch
# Fedora/EPEL-specific - allow vsn variable override
Patch10:	rebar-0010-Try-shell-variable-VSN-first.patch
# Fedora/EPEL-specific - allow overriding missind deps error (versions
# mismatch)
Patch11:	rebar-0011-Allow-ignoring-missing-deps.patch
Patch12:	rebar-0012-Drop-obsolete-crypto-rand_uniform-2.patch
Patch13:	rebar-0013-Remove-compat-random-modules.patch
# Fedora 33+
Patch14:	rebar-0014-erl_interface-was-removed-in-Erlang-23.patch

%if 0%{?need_bootstrap} < 1
BuildRequires:	erlang-rebar
# FIXME remove later and revisit getopt<->rebar bootstrapping
BuildRequires:	erlang-getopt
%else
BuildRequires:	erlang-asn1
BuildRequires:	erlang-common_test
BuildRequires:	erlang-compiler
BuildRequires:	erlang-crypto
BuildRequires:	erlang-dialyzer
BuildRequires:	erlang-diameter
BuildRequires:	erlang-edoc
BuildRequires:	erlang-eflame
BuildRequires:	erlang-erl_interface
BuildRequires:	erlang-erlydtl
BuildRequires:	erlang-erts
BuildRequires:	erlang-eunit
BuildRequires:	erlang-getopt
BuildRequires:	erlang-kernel
BuildRequires:	erlang-lfe
BuildRequires:	erlang-mustache
BuildRequires:	erlang-neotoma
BuildRequires:	erlang-parsetools
BuildRequires:	erlang-protobuffs
BuildRequires:	erlang-reltool
BuildRequires:	erlang-rpm-macros
BuildRequires:	erlang-sasl
BuildRequires:	erlang-snmp
BuildRequires:	erlang-stdlib
BuildRequires:	erlang-syntax_tools
BuildRequires:	erlang-tools
BuildRequires:	erlang-triq
%endif

# FIXME wip
#Requires:	erlang-abnfc
#Requires:	erlang-gpb

# This one cannot be picked up automatically
# See https://bugzilla.redhat.com/960079
Requires:	erlang-common_test
# Requires for port compiling - no direct references in Rebar's src/*.erl files
Requires:	erlang-erl_interface
# This one cannot be picked up automatically
# See https://bugzilla.redhat.com/960079
Requires:	erlang-parsetools

Requires:	erlang-rpm-macros >= 0.2.4
Provides:	%{realname} = %{version}-%{release}


%description
Erlang Build Tools.


%prep
%setup -q -n %{realname}-%{version}
%patch1 -p1 -b .load_templates_from_fs
%patch2 -p1 -b .remove_bundled_mustache
%if 0%{?need_bootstrap} < 1
%patch3 -p1 -b .remove_bundled_getopt
%endif
%patch4 -p1 -b .allow_discarding_ports
%patch5 -p1 -b .remove_escript_foldl_3
%patch6 -p1 -b .remove_abnfc
%patch7 -p1 -b .remove_gpb
%patch8 -p1 -b .remove_pre_R15B02
%patch9 -p1 -b .erlang_timestamp_0
%patch10 -p1 -b .vsn_override
%patch11 -p1 -b .skip_deps_checking
%patch12 -p1 -b .erl20
%patch13 -p1 -b .erl22_compat
%patch14 -p1 -b .erl23_compat


%build
%if 0%{?need_bootstrap} < 1
%{erlang_compile}
%else
./bootstrap
./rebar compile -v
%endif


%install
%{erlang_install}
# Install rebar script itself
install -D -p -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/rebar
# Copy the contents of priv folder
cp -a priv %{buildroot}%{_erllibdir}/%{realname}-%{version}/


%check
%if 0%{?need_bootstrap} < 1
# For using during tests
install -D -p -m 0755 %{SOURCE1} ./rebar
sed -i -e "s,-noshell -noinput,-noshell -noinput -pa .,g" ./rebar
%{rebar_eunit}
%endif


%files
%doc README.md THANKS rebar.config.sample
%license LICENSE
%{_bindir}/rebar
%{erlang_appdir}/




%changelog
* Sun Dec 20 2020 wally <wally> 2.6.4-9.mga8
+ Revision: 1661485
- disable bootstrap build

* Sat Dec 19 2020 wally <wally> 2.6.4-8.1.mga8
+ Revision: 1661359
- test noarch build with new iurt

* Sat Dec 19 2020 wally <wally> 2.6.4-7.mga8
+ Revision: 1661290
- enable bootstrap build
- sync patches with Fedora
- make pkg noarch
+ umeabot <umeabot>
- Mageia 8 Mass Rebuild

* Sat Sep 22 2018 wally <wally> 2.6.4-5.mga7
+ Revision: 1296060
- drop BR for erlang-eflame
- add BR for erlang-getopt
- non-bootstrap build for aarch64

* Fri Sep 21 2018 wally <wally> 2.6.4-4.mga7
+ Revision: 1295474
- add fixes from Fedora to fix build with OTP 20
- enable bootstrap build for aarch64
- rebuild for aarch64
+ neoclust <neoclust>
- Disable Bootstrap

* Thu Nov 17 2016 neoclust <neoclust> 2.6.4-1.mga6
+ Revision: 1067928
- new version 2.6.4
+ pterjan <pterjan>
- Disable bootstrap

* Thu Jun 16 2016 tv <tv> 2.6.1-12.mga6
+ Revision: 1021689
- arm bootstrap

* Fri May 06 2016 neoclust <neoclust> 2.6.1-11.mga6
+ Revision: 1009775
- Rebuild post boostrap
- imported package erlang-rebar