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

File wazo-res-stasis-amqp.spec of Package wazo-res-stasis-amqp

# See _service
%define realname   wazo-res-stasis-amqp
%define srcext     tar.bz2
%define gh_version 18.09
%define realver    18.09

Name:           %{realname}
Version:        %{realver}
Release:        0
License:        GPL-2.0
Group:          Productivity/Telephony/Servers
Url:            https://github.com/wazo-pbx/wazo-res-stasis-amqp
Summary:        AMQP module to publish stasis message to rabbitmq

# Install-time parameters
Obsoletes:      %{realname} < %{version}

Source0:        %{realname}-%{gh_version}.%{srcext}
Patch0:         set_modules_dir.patch

Requires:       asterisk
Requires:       wazo-res-amqp
BuildRequires:  openssl-devel
BuildRequires:  asterisk-devel
BuildRequires:  wazo-res-amqp-devel
%if 0%{?suse_version}
BuildRequires:  librabbitmq4-devel
%else
BuildRequires:  librabbitmq-devel
%endif
%if 0%{?suse_version}
BuildRequires: libopenssl-devel
%endif
%if 0%{?rhel} >= 6
BuildRequires: openssl-devel
%endif
BuildRequires:  gcc-c++ make

%if 0%{?sles_version}
BuildArch:      %{_arch}
%endif

BuildRoot:      %{_tmppath}/%{name}-root

%description
AMQP module to publish stasis message to rabbitmq.

%prep
%setup -q -n %{name}-%{gh_version}
%patch0 -p1

%build
%__make

%install
%__make install MODULES_DIR=%{_libdir}/asterisk/modules DESTDIR=%{buildroot}
%__chmod +x %{buildroot}/%{_libdir}/asterisk/modules/*

%__mkdir_p %{buildroot}/etc/asterisk
%__make samples DESTDIR=%{buildroot}

%__mkdir_p %{buildroot}/%{_var}/lib/asterisk/documentation/thirdparty/
%__install -m 644 %{buildroot}/usr/share/asterisk/documentation/thirdparty/* %{buildroot}/%{_var}/lib/asterisk/documentation/thirdparty/

%__rm -rf %{buildroot}/usr/share/asterisk/

%files
%defattr(-,root,root,-)
%dir %{_sysconfdir}/asterisk
%config(noreplace) %{_sysconfdir}/asterisk/*
%{_libdir}/asterisk/modules/*.so
%dir /%{_var}/lib/asterisk/documentation/thirdparty/
/%{_var}/lib/asterisk/documentation/thirdparty/res_stasis_amqp_config-en_US.xml

%post
/sbin/ldconfig

%changelog