File tntpub.spec of Package tntpub

#
# spec file for package tntpub
#
# Copyright (c) 2021 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


%define major   0
Name:           tntpub
Version:        1.0
Release:        0
Summary:        Publish subscribe server with cxxtools
License:        GPL-3.0-only
Group:          Productivity/Networking/Web/Servers
URL:            http://www.tntnet.org/index.html
Source0:        https://github.com/maekitalo/tntpub/archive/V%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source99:       tntpub-rpmlintrc
BuildRequires:  autoconf
BuildRequires:  gcc-c++
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(cxxtools) >= 3.0

%description
Tntpub implements a publish subcribe pattern. A client can subscribe to
a topic, which is just a string and will receive any messages sent to
that topic by other clients (or itself). The server is very simple and
needs no configuration since topics exist if there are subscribers to
that. Messages sent to topics, where nobody id subscribed to will just
be discarded.

The server as well as client are implemented in a library. It is simple
to implement a own server with additional features like recovery or
integrate the server in own applications. It runs in the cxxtools event
loop.

The main features are: * only TCP/IP communication * send and receive
cxxtools serializable objects * no configuration * no distinction
between publisher and subscriber - every client may subscribe and can
send messages to topics.

%package -n libtntpub%{major}
Summary:        Shared library part of tntpub
Group:          System/Libraries

%description -n libtntpub%{major}
Publish subscribe server with cxxtools.

Shared library part of tntpub.

%package demos
Summary:        Example applications for tntpub
Group:          Productivity/Networking/Web/Servers
Requires:       tntpub = %{version}

%description demos
Publish subscribe server with cxxtools.

This package provides few examples written in it.

%package devel
Summary:        Devel files for tntpub
Group:          Development/Libraries/C and C++
Requires:       libtntpub%{major} = %{version}
Requires:       pkgconfig(cxxtools) >= 3.0

%description devel
Publish subscribe server with cxxtools.

Development files.

%prep
%autosetup -p1
cp -r demo demos

%build
autoreconf -fiv
%configure --disable-static
%make_build

%install
%make_install
mkdir -pv %{buildroot}%{_datadir}/tntpub
cp -r demos %{buildroot}%{_datadir}/tntpub/demos
find %{buildroot} -type f -name "*.la" -delete -print


%post -n libtntpub%{major} -p /sbin/ldconfig
%postun -n libtntpub%{major} -p /sbin/ldconfig

%files
%license COPYING
%doc AUTHORS
%{_bindir}/tntpubsender
%{_bindir}/tntpubserver


%files demos
%dir %{_datadir}/tntpub
%{_datadir}/tntpub/demos

%files -n libtntpub%{major}
%{_libdir}/libtntpub.so.%{major}*

%files devel
%{_includedir}/tntpub
%{_libdir}/libtntpub.so
%{_libdir}/pkgconfig/tntpub.pc

%changelog

openSUSE Build Service is sponsored by