Blob Blame History Raw
#%define gitcommit  833e9e9
#%define gitdate    20121022
#%define patchlevel 0
Name:           elixir
Version:        0.7.2
Release:        2%{?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
URL:            http://elixir-lang.org/
# Source0 retrieved by pulling a Github tarball.
# See: https://github.com/elixir-lang/elixir/tags
Source0:        %{name}-%{version}.tar.gz
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires:  erlang-rebar
BuildRequires:  git
Requires:       erlang-erts >= R15B
Requires:       erlang-inets

%description
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.

%prep
%setup -q
rm rebar
sed -i '/REBAR := $(/d' Makefile
sed -i '1i REBAR := $(shell which rebar || echo `pwd`/rebar)' Makefile
sed -i -e "s/time //g" Makefile
find -name '*.bat' -exec rm \{\} \;

%build
make %{?_smp_mflags}

%check
make test

%install
rm -rf %{buildroot}

mkdir -p %{buildroot}/%{_datadir}/%{name}/%{version}
cp -ra bin lib %{buildroot}/%{_datadir}/%{name}/%{version}

mkdir -p %{buildroot}/%{_bindir}
ln -s %{_datadir}/%{name}/%{version}/bin/{elixir,elixirc,iex} %{buildroot}/%{_bindir}/

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc LICENSE LEGAL
%{_bindir}/elixir
%{_bindir}/elixirc
%{_bindir}/iex
%{_datadir}/%{name}


%changelog
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Mon Jan 7 2013 Ricky Elrod <codeblock@fedoraproject.org> - 0.7.2-1
- Update to upstream 0.7.2.

* Mon Oct 22 2012 Ricky Elrod <codeblock@fedoraproject.org> - 0.7.0-1.20121022git833e9e9
- Update to upstream 0.7.0.

* Wed Aug 1 2012 Ricky Elrod <codeblock@fedoraproject.org> - 0.6.0-1.20120801git109919c
- Update to upstream 0.6.0.

* Sat May 26 2012 Ricky Elrod <codeblock@fedoraproject.org> - 0.5.0-1.20120526git6052352
- Initial build.