LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File erlang-syslog.spec of Package erlang-syslog (Project home:Ledest:erlang:19)

%define bname syslog
Name: erlang-%bname
Version: 1.0.3
Release: 5
Summary: Erlang driver for syslog
License: MIT
Group: Development/Tools/Other
URL: https://github.com/Vagabond/%name
Source: %name-%version.tar.xz
Provides: erlang-%bname = %version-%release

BuildRequires: rpm-macros-erlang rpm-build-erlang
BuildRequires: erlang >= R13
BuildRequires: rebar erl_interface erts-devel
BuildRequires: epmd

%description
This is an erlang port driver for interacting with syslog.


%prep
%setup -q


%build
erl -noshell -eval '
file:write_file("%bname.rebar.config", io_lib:format("~p.~n", [{erl_opts, [no_debug_info, slim, inline]}])),
halt().'
export CFLAGS="%optflags -flto" LDFLAGS="%optflags -flto"
for c in compile doc; do
	rebar -C %bname.rebar.config $c -v
done


%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/priv
install -p -m 0755 priv/* %buildroot%_otplibdir/%bname-%version/priv/
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/


%check
rebar -C %bname.rebar.config eunit


%files
%defattr(-,root,root)
%doc %_docdir/%name
%_otplibdir/*


%changelog
* Fri Feb 19 2016 Led <ledest@gmail.com> 1.0.3-5
- fix URL

* Tue Feb 09 2016 Led <ledest@gmail.com> 1.0.3-4
- add -flto to %%optflags

* Sun Jan 31 2016 Led <ledest@gmail.com> 1.0.3-3
- add epmd to BuildRequires

* Sun Jul 26 2015 Led <ledest@gmail.com> 1.0.3-2
- fix BuildRequires

* Sun Jul 26 2015 Led <ledest@gmail.com> 1.0.3-1
- initial build