Sophie

Sophie

distrib > Mageia > cauldron > i586 > by-pkgid > 0cbcbcbde038b54caf670fa1ed65505e > files > 1

erlang-lfe-2.0.1-1.mga9.src.rpm

%global realname lfe
%global upstream rvirding

# Set this to true when starting a rebuild of the whole erlang stack. There's a
# cyclical dependency between erlang-erts, erlang-lfe, and erlang-rebar so this
# package (erlang-lfe) needs to get built first in bootstrap mode.
%global need_bootstrap 1


%if 0%{?need_bootstrap}
%global _erllibdir %{_libdir}/erlang/lib
%global debug_package %{nil}
%endif


Name:		erlang-%{realname}
Version:	2.0.1
Release:	%mkrel 1
Summary:	Lisp Flavoured Erlang
Group:		Development/Erlang
License:	BSD
URL:		https://github.com/%{upstream}/%{realname}
VCS:		scm:git:https://github.com/%{upstream}/%{realname}.git
Source0:	https://github.com/%{upstream}/%{realname}/archive/%{version}/%{realname}-%{version}.tar.gz
%if 0%{?need_bootstrap}
BuildRequires:	erlang-erts
BuildRequires:	erlang-rpm-macros
%else
BuildRequires:	erlang-rebar
%endif
BuildRequires:	pkgconfig
BuildRequires:	emacs
BuildRequires:	emacs-el
BuildRequires:	gcc
%{?__erlang_drv_version:Requires: %{__erlang_drv_version}}


%description
Lisp Flavoured Erlang, is a lisp syntax front-end to the Erlang
compiler. Code produced with it is compatible with "normal" Erlang
code. An LFE evaluator and shell is also included.


%prep
%setup -q -n %{realname}-%{version}
%autopatch -p1


%build
%if 0%{?need_bootstrap}
mkdir -p ./ebin/
/usr/bin/erlc -o ./ebin/ src/*.erl
%else
mkdir -p ./ebin/
%{erlang_compile}
%endif
emacs -L emacs/ -batch -f batch-byte-compile emacs/inferior-lfe.el emacs/lfe-mode.el emacs/lfe-indent.el


%install
install -m 0755 -d %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/{bin,ebin,priv}
install -p -m 0755 -D ebin/* %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/ebin/
install -p -m 0755 -D bin/*  %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/bin/
%if 0%{?need_bootstrap}
echo "we are going to install only bare minimum of LFE - just for rebar bootstrapping"
%else
install -p -m 0755 priv/%{realname}_drv.so %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/priv/
%endif
install -m 0755 -d %{buildroot}/%{_bindir}
ln -s %{_libdir}/erlang/lib/%{realname}-%{version}/bin/{lfe,lfec,lfescript} %{buildroot}%{_bindir}/

mkdir -p %{buildroot}%{_emacs_sitelispdir}
mkdir -p %{buildroot}%{_emacs_sitestartdir}
install -p -m 0644 emacs/inferior-lfe.el %{buildroot}%{_emacs_sitelispdir}
install -p -m 0644 emacs/inferior-lfe.elc %{buildroot}%{_emacs_sitelispdir}
install -p -m 0644 emacs/lfe-mode.el %{buildroot}%{_emacs_sitelispdir}
install -p -m 0644 emacs/lfe-mode.elc %{buildroot}%{_emacs_sitelispdir}
install -p -m 0644 emacs/lfe-indent.el %{buildroot}%{_emacs_sitelispdir}
install -p -m 0644 emacs/lfe-indent.elc %{buildroot}%{_emacs_sitelispdir}
install -p -m 0644 emacs/lfe-start.el %{buildroot}%{_emacs_sitestartdir}


%check
%if 0%{?need_bootstrap}
echo "No tests during bootstrapping"
%else
#%%{erlang_test}
%endif


%files
%license LICENSE
%doc README.md doc/ examples/
%{_bindir}/lfe
%{_bindir}/lfec
%{_bindir}/lfescript
%{erlang_appdir}/
%{_emacs_sitelispdir}/inferior-lfe.el
%{_emacs_sitelispdir}/inferior-lfe.elc
%{_emacs_sitelispdir}/lfe-indent.el
%{_emacs_sitelispdir}/lfe-indent.elc
%{_emacs_sitelispdir}/lfe-mode.el
%{_emacs_sitelispdir}/lfe-mode.elc
%{_emacs_sitestartdir}/lfe-start.el


%changelog
* Sun Aug 07 2022 neoclust <neoclust> 2.0.1-1.mga9
+ Revision: 1876051
- New version 2.0.1

* Thu Mar 31 2022 umeabot <umeabot> 1.3-4.mga9
+ Revision: 1836513
- Mageia 9 Mass Rebuild

* Mon May 04 2020 umeabot <umeabot> 1.3-3.mga8
+ Revision: 1579767
- Mageia 8 Mass Rebuild

* Sat Sep 22 2018 wally <wally> 1.3-2.mga7
+ Revision: 1296406
- disable bootstrap build

* Sat Sep 22 2018 wally <wally> 1.3-1.mga7
+ Revision: 1296372
- new version 1.3 (sync with Fedora)

* Tue Jul 05 2016 pterjan <pterjan> 1.0.2-3.mga6
+ Revision: 1039035
- Try fixing bootstrap...
- Try to bootstrap again

* Fri May 06 2016 neoclust <neoclust> 1.0.2-2.mga6
+ Revision: 1009764
- Rebuild post boostrap
- imported package erlang-lfe