elixir115/elixir115.spec
Simon Lees 00ad5ae61c - Use pregenerated documentation
- Switch from %patch0 to %autosetup

- Update to Elixir 1.15.7:
  * Fix build for Erlang 26
  * Changelog available at https://hexdocs.pm/elixir/1.15.7/changelog.html
- Add 0001-Use-PID-valid-for-32-bit-systems-closes-12741.patch:
  * Fix build for 32bit
- Add 0001-Use-PID-valid-for-32-bit-systems-followup-to-12741-1.patch:
  * Fix build for 32bit

- Add _multibuild to define 2nd spec file as additional flavor.
  Eliminates the need for source package links in OBS.

- Drop git as a requires and switch buildrequires from git to git-core
 * Git is not needed to use Elixir, only to run some tests
   (which git-core can accomplish on its own without git)

- Elixir 1.14.2 
  * 1. Enhancements
    Elixir
      [Code] Add Code.eval_quoted_with_env/4 with support for the :prune_binding option
    ExUnit
      [ExUnit.Case] Allow test cases to not be registered on use
      [ExUnit.DocTest] Include :doctest and :doctest_line as meta tags
      [ExUnit.Formatter] Expose ExUnit.Formatter.format_assertion_diff/4
    Mix
      [Mix] Mix.install/2 accepts atoms as paths
  * 2. Bug fixes

OBS-URL: https://build.opensuse.org/package/show/home:simotek/elixir115?expand=0&rev=1
2024-07-30 01:58:17 +00:00

136 lines
4.0 KiB
RPMSpec

#
# spec file for package elixir
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define elixirdir %{_prefix}/lib/elixir
%define _rname elixir
Name: elixir115
Version: 1.15.7
Release: 0
Summary: Functional meta-programming aware language built atop Erlang
License: Apache-2.0
Group: Development/Languages/Other
URL: http://elixir-lang.org
Source0: https://github.com/elixir-lang/%{_rname}/archive/v%{version}/%{_rname}-%{version}.tar.gz
Source1: https://github.com/elixir-lang/%{_rname}/releases/download/v%{version}/Docs.zip#/%{_rname}-%{version}-doc.zip
Source2: macros.elixir
Patch0: 0001-Use-PID-valid-for-32-bit-systems-closes-12741.patch
Patch1: 0001-Use-PID-valid-for-32-bit-systems-followup-to-12741-1.patch
BuildRequires: fdupes
BuildRequires: gcc
BuildRequires: make
Requires: erlang >= 24
BuildRequires: erlang >= 24
BuildRequires: erlang-dialyzer >= 24
BuildRequires: erlang-src >= 24
# required by Mix.SCM.Git see also (https://github.com/elixir-lang/elixir/issues/1386)
BuildRequires: git-core >= 1.7
BuildRequires: unzip
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
Provides: elixir
Conflicts: elixir
%description
Elixir is a functional meta-programming aware language built on top
of the Erlang VM. It is a dynamic language with flexible syntax with
macros support that leverage Erlang's abilities to build concurrent,
distributed, fault-tolerant applications with hot code upgrades.
Elixir also provides first-class support for pattern matching,
polymorphism via protocols (similar to Clojure's), aliases and
associative data structures (usually known as dicts or hashes in
other programming languages).
Finally, Elixir and Erlang share the same bytecode and data types.
This means one can invoke Erlang code from Elixir (and vice-versa)
without any conversion or performance impact.
%package doc
Summary: Documentation for elixir
Group: Documentation/Other
BuildArch: noarch
Provides: elixir-doc
Conflicts: elixir-doc
Requires: elixir = %{version}
%description doc
Documentation for the Elixir language.
%prep
%autosetup -p1 -n %{_rname}-%{version}
unzip -o %{SOURCE1}
find doc \( -name ".build" -or -name ".ex_doc" \) -delete
%build
# Elixir wants UTF-8 locale, force it
export LANG=en_US.UTF-8
# Make Elixir
make
%install
make install DESTDIR=%{buildroot} PREFIX=%{_prefix}
mkdir -p %{buildroot}%{_bindir}
for I in iex elixir elixirc mix
do
ln -sf %{elixirdir}/bin/$I %{buildroot}%{_bindir}/$I
done
install -D -m 0644 %{S:2} %{buildroot}%{_rpmmacrodir}/macros.elixir
mkdir -p %{buildroot}%{_defaultdocdir}
cp -pa doc %{buildroot}%{_defaultdocdir}/elixir-doc
%fdupes -s %{buildroot}/%{_mandir}
%fdupes %{buildroot}/%{_prefix}
%check
export LANG=en_US.UTF-8
make test
%files
%defattr(-,root,root)
%doc CHANGELOG.md README.md NOTICE
%license LICENSE
%dir %{elixirdir}
%dir %{elixirdir}/bin
%dir %{elixirdir}/lib
%{_bindir}/iex
%{_bindir}/elixir
%{_bindir}/elixirc
%{_bindir}/mix
%{_mandir}/man1/iex.1.gz
%{_mandir}/man1/elixir.1.gz
%{_mandir}/man1/elixirc.1.gz
%{_mandir}/man1/mix.1.gz
%{elixirdir}/bin/iex
%{elixirdir}/bin/elixirc
%{elixirdir}/bin/mix
%{elixirdir}/bin/elixir
%{elixirdir}/lib/*
%{_rpmmacrodir}/macros.elixir
%files doc
%defattr(-,root,root)
%license LICENSE
%{_defaultdocdir}/elixir-doc
%changelog