File depcache.spec of Package depcache

%define bname depcache
Name: %bname
Version: 1.2.1
Release: 1
Summary: An in-memory caching server for Erlang 
License: Apache-2.0
Group: Development/Tools/Other
Source: %bname-%version.tar.xz
Patch: %bname-%version-git.patch
BuildArch: noarch
Provides: erlang-%bname = %version-%release

BuildRequires: rpm-macros-erlang rpm-build-erlang
BuildRequires: rebar erl_interface

depcache is an in-memory caching server for Erlang with dependency checks, cache
expiration and local in process memoization of lookups. It is used by the Zotonic
project for all memory-related caching strategies.

%setup -q -n %bname-%version
%patch -p1

echo "{erl_opts, [slim, inline, no_debug_info]}." > %bname.rebar.config
for c in compile doc; do
	rebar -C %bname.rebar.config $c -v

install -d -m 0755 %buildroot%_otplibdir/%bname-%version/ebin
install -p -m 0644 ebin/* %buildroot%_otplibdir/%bname-%version/ebin/
install -d -m 0755 %buildroot%_otplibdir/%bname-%version/include
install -p -m 0644 include/* %buildroot%_otplibdir/%bname-%version/include/
install -d -m 0755 %buildroot%_otplibdir/%bname-%version/doc
install -p -m 0644 doc/*.{css,html,png} %buildroot%_otplibdir/%bname-%version/doc/
install -d -m 0755 %buildroot%_docdir/%name
ln -sf %_otplibdir/%bname-%version/doc %buildroot%_docdir/%name/html
install -p -m 0644 README* %buildroot%_docdir/%name/

rebar -C %bname.rebar.config eunit

%doc %_docdir/%name

* Sun Jun 26 2016 Led <> 1.2.1-1
- 1.2.1
- git 96b1aea
- remove patches:
  + depcache-1.1-doc.patch

* Sun Jun 07 2015 Led <> 1.1-1
- initial build