File erlang-bookshelf.spec of Package erlang-bookshelf

#
# spec file for package erlang-bookshelf
#
# 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/
#

Name:           erlang-bookshelf
Version:        0.0.0+git.1365805075.ba1d730
%define mod_ver %(echo "%{version}" | cut -d "+" -f1)
Release:        0
License:        Apache-2.0
Summary:        Minimal S3 Clone
Url:            https://github.com/opscode/bookshelf
Group:          Development/Libraries/Other
Source:         bookshelf-%{version}.tar.gz
Patch01:        PATCH01-remove-dependencies-from-rebar.config-file.patch
BuildRequires:  erlang-rebar
Requires:       erlang
BuildRequires:  erlang-webmachine
Requires:       erlang-webmachine
BuildRequires:  erlang-erlsom
Requires:       erlang-erlsom
BuildRequires:  erlang-erlang_iso8601
Requires:       erlang-erlang_iso8601
BuildRequires:  erlang-erlware_commons
Requires:       erlang-erlware_commons
BuildRequires:  erlang-mini_s3
Requires:       erlang-mini_s3
BuildRequires:  erlang-eper
Requires:       erlang-eper
BuildRequires:  erlang-rebar_lock_deps_plugin
Requires:       erlang-rebar_lock_deps_plugin
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Minimal S3 clone.


%prep
%setup -n bookshelf-%{version}
%patch01

%build
%rebar compile escriptize

%install
for dir in ebin include priv; do
  install -d %{buildroot}%{erlang_libdir}/bookshelf-%{mod_ver}/${dir}
  cp -r ${dir}/* %{buildroot}%{erlang_libdir}/bookshelf-%{mod_ver}/${dir}/
done

%files
%defattr(-,root,root)
%dir %{erlang_libdir}/bookshelf-%{mod_ver}
%{erlang_libdir}/bookshelf-%{mod_ver}/ebin
%{erlang_libdir}/bookshelf-%{mod_ver}/include
%{erlang_libdir}/bookshelf-%{mod_ver}/priv

%changelog
openSUSE Build Service is sponsored by