diff --git a/elixir.spec b/elixir.spec index ce156e8..ae7ac6f 100644 --- a/elixir.spec +++ b/elixir.spec @@ -1,17 +1,20 @@ +%global debug_package %{nil} + Name: elixir Version: 1.5.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A modern approach to programming for the Erlang VM Group: Development/Languages -# See LEGAL (provided by upstream) for explaination/breakdown. -License: ASL 2.0 and ERPL +License: ASL 2.0 URL: http://elixir-lang.org/ -Source0: https://github.com/elixir-lang/elixir/archive/v%{version}/%{name}-%{version}.tar.gz +Source0: https://github.com/elixir-lang/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz +Source1: https://github.com/elixir-lang/%{name}/releases/download/v%{version}/Docs.zip#/%{name}-%{version}-doc.zip #BuildArch: noarch BuildRequires: erlang-rebar BuildRequires: git +BuildRequires: sed Requires: erlang-compiler Requires: erlang-crypto Requires: erlang-erts @@ -28,9 +31,13 @@ Elixir is a programming language built on top of the Erlang VM. As Erlang, it is a functional language built to support distributed, fault-tolerant, non-stop applications with hot code swapping. -%global debug_package %{nil} %prep -%setup -q +# Unpack the HTML documentation (Source1) +%setup -q -T -c -n %{name}-%{version}/docs -a 1 +find -name ".build" -exec rm \{\} \; + +# Unpack elixir itself (Source0) +%setup -q -D sed -i -e "s/time //g" Makefile find -name '*.bat' -exec rm \{\} \; @@ -42,6 +49,9 @@ rm lib/elixir/test/elixir/io/ansi_test.exs export LANG="en_US.UTF-8" %{rebar_compile} +# This target requires `sed`. +make build_man + %check export LANG="en_US.UTF-8" %{rebar_eunit} @@ -53,16 +63,39 @@ cp -ra bin lib %{buildroot}/%{_datadir}/%{name}/%{version} mkdir -p %{buildroot}/%{_bindir} ln -s %{_datadir}/%{name}/%{version}/bin/{elixir,elixirc,iex,mix} %{buildroot}/%{_bindir}/ +# Manual pages +mkdir -p %{buildroot}/%{_mandir}/man1 +cp -a man/elixir.1 man/elixirc.1 man/iex.1 man/mix.1 %{buildroot}/%{_mandir}/man1 + %files -%doc LICENSE +%license LICENSE %{_bindir}/elixir %{_bindir}/elixirc %{_bindir}/iex %{_bindir}/mix %{_datadir}/%{name} +%{_mandir}/man1/elixir.1* +%{_mandir}/man1/elixirc.1* +%{_mandir}/man1/iex.1* +%{_mandir}/man1/mix.1* + +%package doc +License: ASL 2.0 +Summary: Documentation for the elixir language and tools +%description doc +HTML documentation for eex, elixir, iex, logger and mix. + +%files doc +%license docs/LICENSE +%doc docs/doc/eex docs/doc/elixir docs/doc/iex docs/doc/logger docs/doc/mix %changelog +* Mon Apr 30 2018 Timothée Floure - 1.5.0-3 +- Package the man pages of elixir, elixirc, iex and mix. +- Package (elixir-doc subpackage) the HTML documentation of eex, elixir, iex, logger and mix. +- Change the license from ASL 2.0 and ERPL to ASL 2.0 only. + * Wed Aug 02 2017 Fedora Release Engineering - 1.5.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild