File jc.spec of Package jc
%define bname jc
Name: %bname
Version: 1.2.1
Release: 10
Summary: Erlang in-memory distributable cache
License: BSD-3-Clause
Group: Development/Tools/Other
URL: https://github.com/jr0senblum/%bname
Source: %bname-%version.tar.xz
Patch0: %bname-%version-git.patch
Patch1: %bname-1.2.1-fix-erl_opts.patch
Patch10: %bname-1.2.1-timestamp.patch
Patch11: jc-1.2.1-optional-tcp-protocol.patch
Patch12: add-jc_log.hrl-replace-lager-debug-2-to-DEBUG-2.patch
BuildArch: noarch
Provides: erlang-%bname = %version-%release
BuildRequires: rpm-macros-erlang rpm-build-erlang
BuildRequires: rebar >= 2.6.1-7
BuildRequires: erlang-lager-devel >= 3.2.4
%description
Erlang in-memory distributable cache.
Featruing: Pub/Sub, JSON-query, consistency support, and a simple, TCP interop.
protocol.
%package devel
Summary: Headers of %bname
Group: Development/Tools/Other
Provides: erlang-%bname-devel = %version-%release
Conflicts: %name < 1.2.1-3
%description devel
Headers of %bname.
%package doc
Summary: Documentation of %bname
Group: Documentation/HTML
Provides: erlang-%bname-doc = %version-%release
Conflicts: %name < 1.2.1-3
%description doc
Documentation of %bname.
%prep
%setup -q -n %bname-%version
%patch0 -p1
%patch1 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%build
erl -noshell -eval '
{ok, L} = file:consult("rebar.config"),
file:write_file("%bname.rebar.config", [[io_lib:print(E), ".\n"] || E <- lists:keydelete(deps, 1, L)], [raw]),
init:stop().'
ERL_COMPILER_OPTIONS="[inline,verbose]" rebar %{?_smp_mflags} -C %bname.rebar.config compile -v
rebar %{?_smp_mflags} -C %bname.rebar.config doc -v
%install
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/config
install -p -m 0644 config/* %buildroot%_otplibdir/%bname-%version/config/
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/%name-%version/doc %buildroot%_docdir/%name/html
install -p -m 0644 README* %buildroot%_docdir/%name/
%if 0
%check
ERL_COMPILER_OPTIONS="[inline,verbose]" rebar -C %bname.rebar.config ct
%endif
%files
%defattr(-,root,root)
%_otplibdir/*
%exclude %_otplibdir/%bname-*/include
%exclude %_otplibdir/%bname-*/doc
%files devel
%defattr(-,root,root)
%dir %_otplibdir/%bname-*
%_otplibdir/%bname-*/include
%files doc
%defattr(-,root,root)
%doc %_docdir/%name
%doc %dir %_otplibdir/%bname-*
%doc %_otplibdir/%bname-*/doc
%changelog
* Wed Dec 05 2018 Led <ledest@gmail.com> 1.2.1-10
- add patches:
+ jc-1.2.1-fix-erl_opts.patch
* Wed Nov 27 2018 Led <ledest@gmail.com> 1.2.1-9
- add patches:
+ jc-1.2.1-timestamp.patch
- update patches:
+ add-jc_log.hrl-replace-lager-debug-2-to-DEBUG-2.patch
* Wed Nov 27 2018 Led <ledest@gmail.com> 1.2.1-8
- git dac9cce
- remove patches:
+ 0001-Fixed-case-where-is_pid-times-out-and-would-unfortun.patch
+ 0002-committing-added-changes.patch
* Thu May 17 2018 Led <ledest@gmail.com> 1.2.1-7
- add patches:
+ add-jc_log.hrl-replace-lager-debug-2-to-DEBUG-2.patch
* Wed May 16 2018 Led <ledest@gmail.com> 1.2.1-6
- add patches:
+ 0002-committing-added-changes.patch
* Thu Mar 01 2018 Led <ledest@gmail.com> 1.2.1-5
- add patches:
+ jc-1.2.1-optional-tcp-protocol.patch
* Fri Feb 09 2018 Led <ledest@gmail.com> 1.2.1-4
- add patches:
+ 0001-Fixed-case-where-is_pid-times-out-and-would-unfortun.patch
* Fri Feb 09 2018 Led <ledest@gmail.com> 1.2.1-3
- git e43e185
- move headers and docs to separate subpackages
* Sat Nov 04 2017 Led <ledest@gmail.com> 1.2.1-2
- update %%build
* Wed Sep 14 2016 Led <ledest@gmail.com> 1.2.1-1
- 1.2.1
* Sat Jun 11 2016 Led <ledest@gmail.com> 1.2.0-1
- initial build