File otpbp.spec of Package otpbp

%define bname otpbp
Name: %bname
Version: 0.38.2
Release: 1
Summary: Erlang OTP backports
License: GPL-3.0+
Group: Development/Tools/Other
URL: https://github.com/Ledest/%bname
Source: %bname-%version.tar.xz
BuildArch: noarch
Provides: erlang-%bname = %version-%release

BuildRequires: rpm-macros-erlang rpm-build-erlang
BuildRequires: rebar >= 2.6.1-7

%description
%summary.


%package devel
Summary: Headers and parse transformer of %bname
Group: Development/Tools/Other
Provides: erlang-%bname-devel = %version-%release
Conflicts: %name < 0.22.0

%description devel
Headers and parse transformer of %bname.


%package doc
Summary: Documentation of %bname
Group: Documentation/HTML
Provides: erlang-%bname-doc = %version-%release
Conflicts: %name < 0.22.0

%description doc
Documentation of %bname.


%prep
%setup -q -n %bname-%version


%build
erl -noshell -eval '
{ok, L} = file:consult("rebar.config"),
file:write_file("%bname.rebar.config", [[io_lib:print(E), ".\n"] || E <- lists:keydelete(deps, 1, L)], [raw]),
init:stop().'
ln -sf rebar.config.script %bname.rebar.config.script
ERL_COMPILER_OPTIONS="[inline,verbose]" rebar %{?_smp_mflags} -C %bname.rebar.config compile -v
rebar %{?_smp_mflags} -C %bname.rebar.config doc -v


%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/include
install -p -m 0644 include/* %buildroot%_otplibdir/%bname-%version/include/
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* TODO %buildroot%_docdir/%name/


%files
%defattr(-,root,root)
%_otplibdir/*
%exclude %_otplibdir/%bname-*/doc
%exclude %_otplibdir/%bname-*/include
%exclude %_otplibdir/%bname-*/ebin/%{bname}_pt.*


%files devel
%defattr(-,root,root)
%dir %_otplibdir/%bname-*
%dir %_otplibdir/%bname-*/ebin
%_otplibdir/%bname-*/include
%_otplibdir/%bname-*/ebin/%{bname}_pt.*


%files doc
%defattr(-,root,root)
%doc %_docdir/%name
%doc %dir %_otplibdir/%bname-*
%doc %_otplibdir/%bname-*/doc


%changelog
* Sat Jun 09 2018 Led <ledest@gmail.com> 0.38.2-1
- 0.38.2

* Sat Jun 09 2018 Led <ledest@gmail.com> 0.38.1-1
- 0.38.1

* Fri Jun 08 2018 Led <ledest@gmail.com> 0.38.0-1
- 0.38.0

* Mon Jun 04 2018 Led <ledest@gmail.com> 0.37.2-1
- 0.37.2

* Sun Jun 03 2018 Led <ledest@gmail.com> 0.37.1-1
- 0.37.1

* Mon May 14 2018 Led <ledest@gmail.com> 0.36.1-2
- add README to doc subpackage

* Thu May 10 2018 Led <ledest@gmail.com> 0.36.1-1
- 0.36.1

* Sun Apr 29 2018 Led <ledest@gmail.com> 0.36.0-1
- 0.36.0

* Mon Mar 26 2018 Led <ledest@gmail.com> 0.35.0-1
- 0.35.0

* Tue Mar 20 2018 Led <ledest@gmail.com> 0.34.0-1
- 0.34.0

* Thu Mar 07 2018 Led <ledest@gmail.com> 0.33.0-1
- 0.33.0

* Sat Mar 03 2018 Led <ledest@gmail.com> 0.32.5-1
- 0.32.5

* Thu Mar 01 2018 Led <ledest@gmail.com> 0.32.4-1
- 0.32.4

* Fri Jan 19 2018 Led <ledest@gmail.com> 0.32.3-1
- 0.32.3

* Fri Jan 19 2018 Led <ledest@gmail.com> 0.32.2-1
- 0.32.2

* Tue Jan 16 2018 Led <ledest@gmail.com> 0.32.1-1
- 0.32.1

* Tue Jan 02 2018 Led <ledest@gmail.com> 0.32.0-1
- 0.32.0

* Thu Dec 14 2017 Led <ledest@gmail.com> 0.31.0-1
- 0.31.0

* Thu Dec 07 2017 Led <ledest@gmail.com> 0.30.1-1
- 0.30.1

* Fri Dec 01 2017 Led <ledest@gmail.com> 0.30.0-1
- 0.30.0

* Mon Nov 13 2017 Led <ledest@gmail.com> 0.29.1-1
- 0.29.1

* Mon Sep 18 2017 Led <ledest@gmail.com> 0.28.8-1
- 0.28.8

* Thu Jul 13 2017 Led <ledest@gmail.com> 0.28.7-1
- 0.28.7

* Sun Jun 25 2017 Led <ledest@gmail.com> 0.28.6-1
- 0.28.6

* Wed Jun 21 2017 Led <ledest@gmail.com> 0.28.5-1
- 0.28.5

* Fri Jun 16 2017 Led <ledest@gmail.com> 0.28.3-1
- 0.28.3

* Fri Jun 16 2017 Led <ledest@gmail.com> 0.28.2-1
- 0.28.2

* Fri Jun 16 2017 Led <ledest@gmail.com> 0.28.1-1
- 0.28.1

* Sun Jun 04 2017 Led <ledest@gmail.com> 0.28.0-1
- 0.28.0

* Wed May 31 2017 Led <ledest@gmail.com> 0.27.3-1
- 0.27.3

* Wed May 31 2017 Led <ledest@gmail.com> 0.27.2-1
- 0.27.2

* Wed May 31 2017 Led <ledest@gmail.com> 0.27.1-1
- 0.27.1

* Wed May 31 2017 Led <ledest@gmail.com> 0.27.0-1
- 0.27.0

* Sun May 28 2017 Led <ledest@gmail.com> 0.26.7-2
- update %%files

* Sun May 28 2017 Led <ledest@gmail.com> 0.26.7-1
- 0.26.7

* Sun May 28 2017 Led <ledest@gmail.com> 0.26.6-1
- 0.26.6

* Sun May 28 2017 Led <ledest@gmail.com> 0.26.5-1
- 0.26.5

* Sun May 28 2017 Led <ledest@gmail.com> 0.26.4-1
- 0.26.4

* Sun May 28 2017 Led <ledest@gmail.com> 0.26.3-1
- 0.26.3

* Sun May 28 2017 Led <ledest@gmail.com> 0.26.2-1
- 0.26.2

* Sun May 28 2017 Led <ledest@gmail.com> 0.26.1-1
- 0.26.1

* Sat May 27 2017 Led <ledest@gmail.com> 0.26.0-1
- 0.26.0

* Sat May 27 2017 Led <ledest@gmail.com> 0.25.1-1
- 0.25.1

* Thu May 04 2017 Led <ledest@gmail.com> 0.25.0-1
- 0.25.0

* Tue Apr 11 2017 Led <ledest@gmail.com> 0.24.0-1
- 0.24.0

* Tue Mar 28 2017 Led <ledest@gmail.com> 0.23.1-1
- 0.23.1

* Sun Mar 12 2017 Led <ledest@gmail.com> 0.23.0-2
- cosmetic fix description

* Sat Mar 11 2017 Led <ledest@gmail.com> 0.23.0-1
- 0.23.0

* Sat Feb 25 2017 Led <ledest@gmail.com> 0.22.1-2
- add Conflicts

* Fri Feb 24 2017 Led <ledest@gmail.com> 0.22.1-1
- 0.22.1
- move docs to doc subpackage
- move parse transformer to devel subpackage

* Wed Feb 01 2017 Led <ledest@gmail.com> 0.20.2-1
- 0.20.2

* Sat Jan 28 2017 Led <ledest@gmail.com> 0.20.1-1
- 0.20.1

* Mon Dec 19 2016 Led <ledest@gmail.com> 0.20.0-1
- 0.20.0

* Sun Dec 04 2016 Led <ledest@gmail.com> 0.19.0-1
- 0.19.0

* Sat Aug 27 2016 Led <ledest@gmail.com> 0.16.7-1
- 0.16.7

* Fri Aug 26 2016 Led <ledest@gmail.com> 0.16.6-1
- 0.16.6

* Wed May 11 2016 Led <ledest@gmail.com> 0.16.5-1
- 0.16.5

* Tue Apr 26 2016 Led <ledest@gmail.com> 0.13.1-2
- fix build docs

* Tue Apr 26 2016 Led <ledest@gmail.com> 0.13.1-1
- 0.13.1

* Tue Mar 22 2016 Led <ledest@gmail.com> 0.12.7-2
- add URL

* Tue Mar 22 2016 Led <ledest@gmail.com> 0.12.7-1
- initial build
openSUSE Build Service is sponsored by