%global realname hyper %global upstream GameAnalytics %global git_tag 4b1abc4284fc784f6def4f4928f715b0d33136f9 %global short_tag %(c=%{git_tag}; echo ${c:0:7}) Name: erlang-%{realname} Version: 0 Release: 0.1.20161011git%{short_tag}%{?dist} Summary: An implementation of the HyperLogLog algorithm in Erlang Group: Development/Languages License: MIT 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 Source0: https://github.com/%{upstream}/%{realname}/archive/%{git_tag}/%{realname}-%{version}.tar.gz Patch1: erlang-hyper-0001-remove-need-for-bisect-lib-hyper_bisect-as-it.patch Patch2: erlang-hyper-0002-Module-random-is-deprecated.patch Patch3: erlang-hyper-0003-Remove-unused-functions.patch Patch4: erlang-hyper-0004-Exclude-eunit-from-production-builds.patch BuildRequires: erlang-basho_stats BuildRequires: erlang-proper BuildRequires: erlang-rebar BuildRequires: erlang-stdlib2 %description An implementation of the HyperLogLog algorithm in Erlang. Using HyperLogLog you can estimate the cardinality of very large data sets using constant memory. The relative error is 1.04 * sqrt(2^P). When creating a new HyperLogLog filter, you provide the precision P, allowing you to trade memory for accuracy. The union of two filters is lossless. %prep %autosetup -p1 -n %{realname}-%{git_tag} %build %{erlang_compile} %install %{erlang_install} %check %{erlang_test} %files %license LICENSE %doc README.md %{erlang_appdir}/ %changelog * Tue Aug 22 2017 Peter Lemenkov - 0-0.1.20161011git4b1abc4 - Initial build