File roc-toolkit.spec of Package roc-toolkit
#
# spec file for package roc-toolkit
#
# Copyright (c) 2024 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 soversion 0_4
%define soversion_dots 0.4
Name: roc-toolkit
Version: 0.4.0
Release: 0
Summary: Toolkit for real-time audio streaming over the network
Group: Productivity/Networking/Other
License: MPL-2.0
URL: https://roc-streaming.org
Source0: https://github.com/roc-streaming/roc-toolkit/archive/refs/tags/v%{version}.tar.gz
BuildRequires: scons
BuildRequires: gcc-c++
BuildRequires: gengetopt
BuildRequires: ragel
BuildRequires: pkgconfig(libuv)
BuildRequires: pkgconfig(libunwind)
BuildRequires: pkgconfig(libssl)
BuildRequires: pkgconfig(speexdsp)
BuildRequires: pkgconfig(sndfile)
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(sox)
#openFEC not available in suse (yet)
%define SCONS_OPTS --disable-openfec
%description
Roc Toolkit implements real-time audio streaming over the network.
It is a network transport specialized for real-time streaming. The programmer
writes the stream to the one end and reads it from another end, and Roc handles
the complexities of delivering data in time and with no loss. ROC does
encoding, decoding, latency maintenance, clock adjustment and loss recovery.
It supports a variety of network protocols, encodings, Forward Error Correction
(FEC) schemes and related features.
%package devel
Summary: Development files for %{name}, a network real-time streaming library
Group: Development/Libraries/C and C++
Requires: libroc%{soversion} = %{version}
Requires: %{name} = %{version}
%description devel
The %{name}-devel package contains libraries and
header files for developing applications that use
%{name}
%package -n libroc%{soversion}
Summary: Toolkit for real-time audio streaming over the network
Group: System/Libraries
%description -n libroc%{soversion}
Shared library for applications which use %{name}
%prep
%autosetup -p1
%build
scons %SCONS_OPTS CXXFLAGS="%{optflags}"
%install
scons install --prefix=%{buildroot} \
--bindir=%{buildroot}%{_bindir} \
--libdir=%{buildroot}%{_libdir} \
--incdir=%{buildroot}%{_includedir} \
--mandir=%{buildroot}%{_mandir} \
%SCONS_OPTS
%check
#NOTE a test suite is available but it requires
#cpputest library, not yet available in suse
%ldconfig_scriptlets -n libroc%{soversion}
%files
%{_bindir}/roc-copy
%{_bindir}/roc-send
%{_bindir}/roc-recv
%{_mandir}/roc-copy.1
%{_mandir}/roc-send.1
%{_mandir}/roc-recv.1
%files -n libroc%{soversion}
%{_libdir}/libroc.so.%{soversion_dots}
%files devel
%dir %{_includedir}/roc
%{_includedir}/roc/*.h
%{_libdir}/*.so
%{_libdir}/*.so.0
%{_libdir}/pkgconfig/roc.pc
%changelog