# The naming scheme in non-Mandriva-based distros %if 0%{!?mklibname:1} %define mklibname(ds) lib%{1}%{?2:%{2}}%{-s:-static}%{-d:-devel} %endif %if 0%{!?mkrel:1} %define mkrel(c) %{1}%{?dist} %endif %define major 4 %define libname %mklibname rist %{major} %define devname %mklibname rist -d # Tests are flaky in Koji %bcond tests 0 Name: librist Version: 0.2.20 Release: %mkrel 1 Summary: Library for Reliable Internet Stream Transport (RIST) protocol Group: System/Libraries # Everything used is BSD-2-Clause except getopt-shim, which is ISC as well License: BSD-2-Clause and ISC URL: https://code.videolan.org/rist/librist Source0: %{url}/-/archive/v%{version}/librist-v%{version}.tar.bz2 # Backport from upstream # BuildRequires: gcc BuildRequires: meson BuildRequires: ninja-build BuildRequires: mbedtls-devel BuildRequires: pkgconfig(cmocka) BuildRequires: pkgconfig(libcjson) %description A library that can be used to speak the RIST protocol (as defined by Video Services Forum (VSF) Technical Recommendations TR-06-1 and TR-06-2). %package -n %libname Summary: Library for Reliable Internet Stream Transport (RIST) protocol Group: System/Libraries %description -n %libname A library that can be used to speak the RIST protocol (as defined by Video Services Forum (VSF) Technical Recommendations TR-06-1 and TR-06-2). %package -n %devname Summary: Development files for %{name} Group: Development/C Requires: %{libname}%{?_isa} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} %description -n %devname The %{devname} package contains libraries and header files for developing applications that use %{name}. %package doc Summary: Technical documentation for %{name} BuildArch: noarch %description doc The %{name}-doc package contains technical documentation for developing applications that use %{name}. %package -n rist-tools Summary: User tools for %{name} %description -n rist-tools This package contains the user tools for the RIST protocol library. %prep %autosetup -n %{name}-v%{version} -p1 %build %meson %meson_build %install %meson_install # Strip unwanted executable bits chmod -x %{buildroot}%{_includedir}/%{name}/*.h chmod -x docs/* # Install documentation mkdir -p %{buildroot}%{_docdir}/%{name} cp -av docs/* %{buildroot}%{_docdir}/%{name} %if %{with tests} %check %meson_test %endif %files -n %libname %doc README.md CONTRIBUTING.md %license COPYING %{_libdir}/*.so.%{major}{,.*} %files -n %devname %{_includedir}/%{name}/ %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc %files doc %license COPYING # Co-own with librist package %dir %{_docdir}/%{name} %doc %{_docdir}/%{name}/VSF_TR-06-1.pdf %doc %{_docdir}/%{name}/VSF_TR-06-2.pdf %doc %{_docdir}/%{name}/librist_logo.png %doc %{_docdir}/%{name}/RIST_vs_SRT.png %files -n rist-tools %{_bindir}/rist* %{_bindir}/udp2udp