File rtipc.spec of Package rtipc
#
# vim:tw=78
#
# spec file for rtipc library
#
# Copyright (c) 2019 Andreas Stewering-Bone <ab@igh-essen.com>
#
# This file is part of the rtipc library.
#
# The rtipc library is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# The rtipc library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with the rtipc library. If not, see <http://www.gnu.org/licenses/>.
#
#
%define pkgname rtipc
%define libname lib%{pkgname}1
Name: %{pkgname}
Version: 0.99.0
Release: 0
Summary: Real Time IPC Library
License: GPL-3.0+
Group: System/Libraries
Url: http://etherlab.org/
Source: rtipc-%{version}.tar.bz2
BuildRequires: gcc-c++
BuildRequires: cmake
%if 0%{?fedora} < 38
BuildRequires: libmhash2
%endif
BuildRequires: mhash-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(yaml-0.1)
%description
This is a library that allows unrelated processes to exchange variables via
shared memory. Typically, this library is used to communicate between
processes that implement different aspects of a control application.
An application exports named variables to shared memory. Similarly, it imports
named variables, which are read from shared memory. If all attributes are
correct (element count and data type), these are connected and data is
exchanged. Semaphores protect access to the shared memory areas.
#----------------------------------------------------------------------------
# Build step
# This must be before packaging, because otherwise the version number
# changes
#----------------------------------------------------------------------------
%prep
%setup
%build
%cmake --no-warn-unused-cli -DVERSION_HASH=%{version}
%if 0%{?cmake_build:1}
%cmake_build
%else
%make_jobs
%endif
%install
%cmake_install
#----------------------------------------------------------------------------
# C++ library
#----------------------------------------------------------------------------
%package -n %libname
Summary: Real Time IPC Library
Provides: %{name} = %{version}
Obsoletes: %{libname} < %{version}
%description -n %libname
This is a library that allows unrelated processes to exchange variables via
shared memory. Typically, this library is used to communicate between
processes that implement different aspects of a control application.
An application exports named variables to shared memory. Similarly, it imports
named variables, which are read from shared memory. If all attributes are
correct (element count and data type), these are connected and data is
exchanged. Semaphores protect access to the shared memory areas.
%files -n %libname
%defattr(-,root,root)
%{_libdir}/lib%{pkgname}.so.*
#----------------------------------------------------------------------------
# Development package
#----------------------------------------------------------------------------
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Provides: lib%{pkgname}.so
%description devel
The %{name}-devel package contains the static libraries and header files
needed for development with %{name}.
%files devel
%defattr(-,root,root)
%{_libdir}/lib%{pkgname}.so
%{_includedir}/%{pkgname}.h
%{_libdir}/pkgconfig/lib%{pkgname}.pc
%{_libdir}/cmake/%{pkgname}
%post -n %libname -p /sbin/ldconfig
%postun -n %libname -p /sbin/ldconfig
%changelog
* Sat Nov 19 2016 lerichi@gmx.net
- Updated for use with OBS