File openh264.spec of Package openh264

#
# spec file for package openh264
#

# Remember to bump in baselibs.conf too!
%define sover 7

Name:           openh264
Version:        2.3.1
Release:        0
Summary:        H.264 codec library
Group:          Productivity/Multimedia/Other
License:        BSD-2-Clause
URL:            http://www.openh264.org/
Source0:        https://github.com/cisco/openh264/archive/v%{version}/%{name}-%{version}.tar.gz
Source99:       baselibs.conf

BuildRequires:  c++_compiler
BuildRequires:  meson
BuildRequires:  nasm
BuildRequires:  pkgconfig

%description
OpenH264 is a codec library which supports H.264 encoding and decoding. It is
suitable for use in real time applications such as WebRTC.

%package -n     lib%{name}-%{sover}
Summary:        Shared library package for %{name}
Group:          System/Libraries

%description -n lib%{name}-%{sover}
This package contains the shared libraries of %{name}

%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries/Other
Requires:       lib%{name}-%{sover} = %{version}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%prep
%autosetup -p1

%build
%meson \
	--default-library=shared \
	-Dtests=disabled \
	%{nil}
%meson_build

%install
%meson_install

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

%files -n lib%{name}-%{sover}
%license LICENSE
%{_libdir}/libopenh264.so.*

%files devel
%doc README.md
%dir %{_includedir}/wels
%{_includedir}/wels/codec_*.h
%{_libdir}/libopenh264.so
%{_libdir}/pkgconfig/openh264.pc

%changelog