File zyre.spec of Package zyre

#
# spec file for package 
#
# Copyright (c) 2014 SUSE LINUX Products 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 http://bugs.opensuse.org/
#

Name:           zyre
Version:        1.2.0
Release:        0
License:        GPL-3.0+ or LGPL-3.0+
Summary:        Open-source framework for proximity-based peer-to-peer applications
Url:            https://github.com/zeromq/zyre
Group:          Development/Libraries/C and C++
Source0:        https://github.com/zeromq/zyre/archive/v%{version}.tar.gz
Patch0:         0001-Problem-can-t-build-on-czmq-4.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  pkgconfig(libczmq) >= 3.0.0
BuildRequires:  pkg-config
BuildRequires:  automake
BuildRequires:  autoconf
BuildRequires:  libtool
BuildRequires:  pkgconfig(libsodium)
# documentation
BuildRequires:  asciidoc
BuildRequires:  xmlto

%description
Zyre does local area discovery and clustering. A Zyre node broadcasts UDP
beacons, and connects to peers that it finds. This class wraps a Zyre node with
a message-based API.

All incoming events are zmsg_t messages delivered via the zyre_recv call. The
first frame defines the type of the message, and following frames provide
further values:

%package -n lib%{name}1
Summary:    Shared library of %{name}
Group:      Development/Languages/C and C++

%description -n lib%{name}1
This package contain shared library of %{name}.

%package devel
Summary:    Devel files for %{name}
Group:      Development/Languages/C and C++
Requires:   lib%{name}1 = %{version}
Requires:   pkgconfig(libczmq) >= 3.0

%description devel
Development files (headers, pkgconfig, cmake) for %{name}.

%prep
%setup -q
%patch0 -p1

%build
./autogen.sh
%configure
make %{?_smp_mflags}

%install
%make_install

rm -f %{buildroot}/%{_libdir}/libzyre.{a,la}

cp src/.libs/{perf_local,perf_remote,zpinger,ztester_beacon,ztester_gossip} %{buildroot}%{_bindir}

%post -n lib%{name}1 -p /sbin/ldconfig

%postun -n lib%{name}1 -p /sbin/ldconfig

%files
%defattr(-,root,root)
# %doc COPYING
%{_bindir}/perf_local
%{_bindir}/perf_remote
%{_bindir}/zpinger
%{_bindir}/ztester_beacon
%{_bindir}/ztester_gossip
%{_mandir}/man1/zpinger.1.gz


%files -n lib%{name}1
%defattr(-,root,root)
%{_libdir}/libzyre.so.*

%files devel
%defattr(-,root,root)
%doc AUTHORS NEWS README.md
%{_includedir}/zyre.h
%{_includedir}/zyre_event.h
%{_includedir}/zyre_library.h
%{_includedir}/zre_msg.h
%{_libdir}/libzyre.so
%{_libdir}/pkgconfig/libzyre.pc
%{_mandir}/man3/zre_msg.3.gz
%{_mandir}/man3/zyre.3.gz
%{_mandir}/man3/zyre_event.3.gz
%dir %{_datadir}/zproject/
%{_datadir}/zproject/%{name}

%changelog

openSUSE Build Service is sponsored by