File erlang-syn.spec of Package erlang-syn

%if 0%{?opensuse_bs}
#!BuildIgnore:  ghostscript-x11

%global realname syn
%global upstream ostinelli
# Techincally, we're noarch; but erlang whose directories we install into is not.
%global debug_package %{nil}
%global git_tag d43b232
%global patchnumber 0

Name:           erlang-%{realname}
Version:        1.6.0
Release:        1%{?dist}
Summary:        Process Registry and Process Group manager for Erlang
Group:          Development/Libraries
License:        ASL 2.0
# wget --content-disposition
Source0:        %{upstream}-%{realname}-%{version}-%{patchnumber}-g%{git_tag}.tar.gz

BuildRequires:  erlang-rebar

A global Process Registry allows registering a process on all the nodes of a
cluster with a single Key. Consider this the process equivalent of a DNS
server: in the same way you can retrieve an IP address from a domain name, you
can retrieve a process from its Key.

%setup -q -n %{upstream}-%{realname}-%{git_tag}

rebar compile -v

mkdir -p %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/.eunit
mkdir -p %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/ebin
mkdir -p %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/include

find . -type f | sort

install -m 644 ebin/%{realname}.app %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/ebin
install -m 644 ebin/*.beam %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/ebin
install -m 644 include/*.hrl %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/include
install -m 644 rebar.config %{buildroot}%{_libdir}/erlang/lib/%{realname}-%{version}/

rebar -C test.config skip_deps=true eunit -v || :

%dir %{_libdir}/erlang/lib/%{realname}-%{version}
%dir %{_libdir}/erlang/lib/%{realname}-%{version}/.eunit
%dir %{_libdir}/erlang/lib/%{realname}-%{version}/ebin
%dir %{_libdir}/erlang/lib/%{realname}-%{version}/include

* Mon Feb  6 2017 Jeroen van Meeuwen (Kolab Systems) <> - 1.6.0-1
- First package