%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.6 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-Properly-compare-versions-with-and-w-o-leading-R-let.patch Patch3: erlang-cuttlefish-0003-No-rebar_mustache-available.patch Patch4: erlang-cuttlefish-0004-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 %setup -q -n %{realname}-%{version} %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 # 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 Mar 15 2016 Peter Lemenkov - 2.0.6-1 - Initial packaging