File erlang-sd_notify.spec of Package erlang-sd_notify

# spec file for package erlang-sd_notify
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define app_name sd_notify

Name:           erlang-%{app_name}
Version:        0.1
%define app_ver {%version}
Release:        0
Summary:        Erlang interface to systemd notify subsystem
License:        MIT
Group:          Development/Libraries/Other
BuildRequires:  erlang-rebar
BuildRequires:  systemd-devel
Requires:       erlang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Erlang interface to systemd notify subsystem

%setup -q

%if 0%{?suse_version} > 1310  
export LDFLAGS=-lsystemd
export LDFLAGS=-lsystemd-daemon
%rebar compile

mkdir -p %{buildroot}%{erlang_libdir}/%{app_name}-%{app_ver}/{ebin,priv}
install -m 644 -p ebin/%{app_name}.app %{buildroot}%{erlang_libdir}/%{app_name}-%{app_ver}/ebin
install -m 644 -p ebin/%{app_name}.beam %{buildroot}%{erlang_libdir}/%{app_name}-%{app_ver}/ebin
install -m 755 -p priv/%{app_name} %{buildroot}%{erlang_libdir}/%{app_name}-%{app_ver}/priv

%dir %{erlang_libdir}/%{app_name}-%{app_ver}
%dir %{erlang_libdir}/%{app_name}-%{app_ver}/ebin
%dir %{erlang_libdir}/%{app_name}-%{app_ver}/priv