A new user interface for you!

File elixir.spec of Package elixir

Name: elixir
Version: 1.1.1
Release: 8
License: Apache-2.0 and ErlPL-1.1
Summary: Functional meta-programming aware language built on top of the Erlang
Url: http://%name-lang.org
Group: Development/Languages/Other
Source: %name-%version.tar.xz
Patch: %name-%version-git.patch
BuildArch: noarch
Provides: %name-logger = %version-%release
Requires: erlang >= 1:17
Requires: erlang-otp-base >= 1:17

BuildRequires: rpm-build-erlang >= 0.9.8
BuildRequires: erlang >= 1:17
BuildRequires: erl_interface >= 1:17
BuildRequires: erlang-syntax_tools >= 1:17
BuildRequires: erlang-inets >= 1:17
BuildRequires: erlang-otp-devel >= 1:17
BuildRequires: erlang-parsetools >= 1:17
BuildRequires: erlang-eunit >= 1:17
BuildRequires: erlang-tools >= 1:17
BuildRequires: git-core >= 1.7

%define elixirdir %_otpdir

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
leverages 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 you
can invoke Erlang code from Elixir (and vice-versa) without any conversion or
performance hit. This allows a developer to mix the expressiveness of Elixir with
the robustness and performance of Erlang.

%package iex
Summary: Elixir’s interactive shell
Group: Development/Languages/Other
BuildArch: noarch
Provides: iex = %version-%release
Requires: %name = %version-%release

%description iex
IEx is the main entry point for Interactive Elixir.

%package mix
Summary: Build tool for creating, compiling and testing Elixir projects
Group: Development/Languages/Other
BuildArch: noarch
Provides: mix = %version-%release
Requires: %name = %version-%release
# required by Mix.SCM.Git see also (https://github.com/elixir-lang/elixir/issues/1386)
Requires: git-core >= 1.7

%description mix
Mix is a build tool that provides tasks for creating, compiling, testing (and
soon deploying) Elixir projects. Mix is inspired by the Leiningen build tool for
Clojure and was written by one of its contributors.
This module works as a facade for accessing the most common functionality in
Elixir, as the shell and the current project configuration.

%package eex
Summary: Embedded Elixir for embed Elixir code inside a string
Group: Development/Languages/Other
BuildArch: noarch
Requires: %name = %version-%release

%description eex
EEx stands for Embedded Elixir. It allows you to embed Elixir code inside a
string in a robust way.
EEx has the concept of engines which allows you to modify or transform the code
extracted from the given string or file.

%package ex_unit
Summary: Unit test for Elixir
Group: Development/Languages/Other
BuildArch: noarch
Requires: %name = %version-%release

%description ex_unit
ExUnit is a unit test for Elixir.

%setup -q
%patch -p1
sed -i '1s|.*|#!%_bindir/%name|' bin/mix
sed -i \
	-e 's|\$(PREFIX)\("\?\)/\$(LIBDIR)/%name|%elixirdir\1|g' \
	-e 's|"\.\./\$(LIBDIR)/%name/bin/[^"]*"|"$$file"|g' \

sed -i '231,235 s/^/#/' lib/elixir/test/elixir/exception_test.exs

LANG=en_US.UTF-8 \
make %{?_smp_mflags} PREFIX=%_prefix

%make_install DESTDIR=%buildroot PREFIX=%_prefix
for i in %buildroot%elixirdir/bin/*; do
	f=$(basename $i)
	ln -sf %elixirdir/bin/$f %buildroot%_bindir/$f
[ "%_otpdir" != "%elixirdir" ] || ln -sf start.boot %buildroot%_otpdir/bin/%name.boot
for i in %buildroot%elixirdir/lib/*; do
	mv $i $i-%version

%add_erlang_req_beam_skiplist Elixir.Collectable.Atom Elixir.Collectable.Float Elixir.Collectable.Function
%add_erlang_req_beam_skiplist Elixir.Collectable.Integer Elixir.Collectable.PID Elixir.Collectable.Port
%add_erlang_req_beam_skiplist Elixir.Collectable.Reference Elixir.Collectable.Tuple
%add_erlang_req_beam_skiplist Elixir.Enumerable.Atom Elixir.Enumerable.BitString Elixir.Enumerable.Float
%add_erlang_req_beam_skiplist Elixir.Enumerable.Integer Elixir.Enumerable.PID Elixir.Enumerable.Port
%add_erlang_req_beam_skiplist Elixir.Enumerable.Reference Elixir.Enumerable.Tuple
%add_erlang_req_beam_skiplist Elixir.Hex
%add_erlang_req_beam_skiplist Elixir.List.Chars.Function Elixir.List.Chars.Map Elixir.List.Chars.PID
%add_erlang_req_beam_skiplist Elixir.List.Chars.Port Elixir.List.Chars.Reference Elixir.List.Chars.Tuple
%add_erlang_req_beam_skiplist Elixir.String.Chars.Function Elixir.String.Chars.Map Elixir.String.Chars.PID
%add_erlang_req_beam_skiplist Elixir.String.Chars.Port Elixir.String.Chars.Reference Elixir.String.Chars.Tuple

LANG=en_US.UTF-8 \
make %{?_smp_mflags} test

%dir %elixirdir
%dir %elixirdir/bin
%dir %elixirdir/lib

%files iex

%files mix

%files eex

%files ex_unit