A new user interface for you! Read more...

File olifer.spec of Package olifer

%define bname olifer
Name: %bname
Version: 2.0.2
Release: 1
Summary: An Erlang LIVR implementation library
License: MPL-2.0
Group: Development/Tools/Other
URL: https://github.com/Prots/%bname
Source: %bname-%version.tar.xz
Patch1: 0001-Update-README.md.patch
BuildArch: noarch
Provides: erlang-%bname = %version-%release

BuildRequires: rpm-macros-erlang rpm-build-erlang
BuildRequires: erlang
# docs
BuildRequires: erlang-edoc
%if 0
# check
BuildRequires: LIVR
%endif

%description
Olifer is lightweight validator supporting
Language Independent Validation Rules Specification (LIVR) for Erlang.


%package devel
Summary: Headers of %bname
Group: Development/Tools/Other
Provides: erlang-%bname-devel = %version-%release

%description devel
Headers of %bname.


%package doc
Summary: Documentation of %bname
Group: Documentation/HTML
Provides: erlang-%bname-doc = %version-%release

%description doc
Documentation of %bname.


%prep
%setup -q -n %bname-%version
%patch1 -p1


%build
make %{?_smp_mflags} DEPS= ERL_COMPILER_OPTIONS="[inline,verbose]" V=1 all docs


%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/*.hrl %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/


%if 0
%check
make DEPS= TEST_DEPS= ERL_COMPILER_OPTIONS="[inline,verbose]" 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
* Thu Nov 16 2017 Led <ledest@gmail.com> 2.0.2-1
- initial build