Blob Blame History Raw
%global realname cuttlefish
%global upstream basho
# Technically, we're noarch; but erlang whose directories we install into is not.
%global debug_package %{nil}


Name:		erlang-%{realname}
Version:        2.0.10
Release:        1%{?dist}
Summary:        A library for dealing with sysctl-like configuration syntax
Group:          Development/Libraries
License:        ASL 2.0
URL:		https://github.com/%{upstream}/%{realname}
%if 0%{?el7}%{?fedora}
VCS:		scm:git:https://github.com/%{upstream}/%{realname}.git
%endif
Source0:	https://github.com/%{upstream}/%{realname}/archive/%{version}/%{realname}-%{version}.tar.gz
Source1:	%{realname}.escript
Patch1:		erlang-cuttlefish-0001-Disable-escript-generation.patch
Patch2:		erlang-cuttlefish-0002-No-rebar_mustache-available.patch
Patch3:		erlang-cuttlefish-0003-Double-quites-escaping-is-no-longer-necessary.patch
BuildRequires:  erlang-lager
BuildRequires:  erlang-rebar


%description
Cuttlefish is a library for Erlang applications that wish to walk the fine line
between Erlang app.configs and a sysctl-like syntax. The name is a pun on the
pronunciation of 'sysctl' and jokes are better explained.


%prep
%autosetup -q -p1 -n %{realname}-%{version}
# Temporarily remove rebar plugin until we start packaging rebar plugins
rm -f src/cuttlefish_rebar_plugin.erl


%build
%{erlang_compile}


%install
%{erlang_install}
# Install cuttlefish script itself
install -D -p -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{realname}



%check
%{erlang_test}


%files
%doc README.md
%{_bindir}/%{realname}
%{erlang_appdir}/


%changelog
* Tue Nov 15 2016 Peter Lemenkov <lemenkov@gmail.com> - 2.0.10-1
- Ver. 2.0.10

* Tue Mar 15 2016 Peter Lemenkov <lemenkov@gmail.com> - 2.0.6-1
- Initial packaging