File erlang-ebloom.spec of Package erlang-ebloom

#
# spec file for package erlang-ebloom
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

%define pkg_version 2.0.0

Name:           erlang-ebloom
Version:        %{pkg_version}
Release:        1
Summary:        An Erlang NIF for bloom filters
License:        Apache-2.0 and CPL-1.0
Group:          Development/Libraries/Other
URL:            https://github.com/basho/ebloom
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        ebloom-%{version}.tar.gz
Requires:       erlang >= R13B01
BuildRequires:  erlang-rebar
BuildRequires:  gcc-c++


%description
A NIF wrapper around a basic bloom filter.

%package src
Summary:        An Erlang NIF for bloom filters
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}

%description src
A NIF wrapper around a basic bloom filter.

%prep
%setup -q -n ebloom-%{version}

%build
%rebar compile

%install
for dir in c_src ebin priv src ; do
  install -d %{buildroot}%{erlang_libdir}/ebloom-%{version}/${dir}
  cp -r ${dir}/* %{buildroot}%{erlang_libdir}/ebloom-%{version}/${dir}/
done

%files
%defattr(-,root,root) 
%doc README.org
%dir %{erlang_libdir}/ebloom-%{version}
%{erlang_libdir}/ebloom-%{version}/ebin
%{erlang_libdir}/ebloom-%{version}/priv

%files src
%defattr(-,root,root)
%{erlang_libdir}/ebloom-%{version}/c_src
%{erlang_libdir}/ebloom-%{version}/src

%changelog
openSUSE Build Service is sponsored by