File webm.spec of Package webm

#
# spec file for package webm
#
# 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 so_version 1

Name:           webm
Version:        1.0.0.32+git.20250721T173707~923d7ef
Release:        4.1
Summary:        A high-quality, open video format for the web
License:        GPL-3.0-or-later
Group:          Productivity/Multimedia/Video/Editors and Convertors
URL:            https://www.webmproject.org/
Source0:        %{name}-%{version}.tar.xz
# https://sources.debian.org/data/main/libw/libwebm/1.0.0.30-6/debian/patches/0001-Use-system-googletest.patch
Patch1:         0001-Use-system-googletest.patch
# https://sources.debian.org/data/main/libw/libwebm/1.0.0.30-6/debian/patches/0002-Build-and-install-system-tools.patch
Patch2:         0002-Build-install-libwebm-tools.patch
# https://sources.debian.org/data/main/libw/libwebm/1.0.0.30-6/debian/patches/0003-Provide-SOVERSION-for-correct-symlinking.patch
Patch3:			0003-Provide-SOVERSION-for-correct-symlinking.patch
# https://sources.debian.org/data/main/libw/libwebm/1.0.0.30-6/debian/patches/0004-Build-in-c-14-instead-of-c-11.patch
Patch4:			0004-Build-in-c-14-instead-of-c-11.patch			
BuildRequires:  cmake >= 3.12
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig(gmock)
BuildRequires:  pkgconfig(gtest)

%description
WebM is an open, royalty-free, media file format designed for the web.
WebM defines the file container structure, video and audio formats.
WebM files consist of video streams compressed with the VP8 or VP9 video codecs and audio streams compressed with the Vorbis or Opus audio codecs.
The WebM file structure is based on the Matroska container.

%package -n     lib%{name}%{so_version}
Summary:        A high-quality, open video format for the web
Group:          Productivity/Multimedia/Video/Editors and Convertors

%description -n lib%{name}%{so_version}
WebM is an open, royalty-free, media file format designed for the web.
WebM defines the file container structure, video and audio formats.
WebM files consist of video streams compressed with the VP8 or VP9 video codecs and audio streams compressed with the Vorbis or Opus audio codecs.
The WebM file structure is based on the Matroska container.

%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries/C and C++
Requires:       lib%{name}%{so_version}%{_isa} = %{version}

%description    devel
WebM is an open, royalty-free, media file format designed for the web.
WebM defines the file container structure, video and audio formats.
WebM files consist of video streams compressed with the VP8 or VP9 video codecs and audio streams compressed with the Vorbis or Opus audio codecs.
The WebM file structure is based on the Matroska container.

This package provides the %{name} headers, development libraries and tools.

%package        tools
Summary:        Development files for %{name}
Group:          Development/Libraries/C and C++

%description    tools
WebM is an open, royalty-free, media file format designed for the web.
WebM defines the file container structure, video and audio formats.
WebM files consist of video streams compressed with the VP8 or VP9 video codecs and audio streams compressed with the Vorbis or Opus audio codecs.
The WebM file structure is based on the Matroska container.

This package provides the binary tools of %{name}.

%prep
%autosetup -p1 -n  %{name}-%{version}

%build
%cmake \
    -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
    -DBUILD_SHARED_LIBS=ON \
    -DENABLE_IWYU=ON \
    -DENABLE_WEBM_PARSER=ON \
    -DENABLE_TESTS=OFF
%cmake_build

%install
%cmake_install

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

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

%files -n lib%{name}%{so_version}
%{_libdir}/*.so*

%files devel
%dir %{_includedir}/webm
%dir %{_includedir}/webm/common
%dir %{_includedir}/webm/mkvmuxer
%dir %{_includedir}/webm/mkvparser
%{_includedir}/webm/*.h
%{_includedir}/webm/common/*.h
%{_includedir}/webm/mkvmuxer/*.h
%{_includedir}/webm/mkvparser/*.h

%files tools
%{_bindir}/*

%changelog
* Sat Sep 13 2025 obs-service-tar-scm@invalid
- Update to version 1.0.0.32+git.20250721T173707~923d7ef:
  * apply clang-format-19
  * bump version for tag
  * cmake: bump minimum version to 3.16
  * vpxpes2ts.cc: add missing webm2pes.h include
  * mkvmuxer_test: add missing mkvparser.h include
  * file_util,GetTempFileName: fix return value
  * mkvmuxer: don't create cue points for non-keyframes
  * add missing (std::nothrow)
  * Fix nothrow new for PrimaryChromaticity parsing
  * Check if long long may possibly be > LONG_MAX
* Sat Oct 14 2023 Robert Herb <proletheus@freenet.de>
- rename package to webm
- refresh Debian patches
* Fri Sep  9 2022 Bruno Pitrus <brunopitrus@hotmail.com>
- Fix broken requirements
- Remove unnecessary CMake flags
- Run test suite in %%check
* Thu Sep  8 2022 Robert Herb <proletheus@freenet.de>
- removed service
- removed BuildRequires for gcc10
- added patches from Debian package
- enabled tests
- renamed library package
- added tools subpackage
* Sun Apr 24 2022 Robert Herb <proletheus@freenet.de>
- Update to version 1.0.0.28.20211014T111818~ba0e4366:
  * Android.mk: import LICENSE indicators from AOSP
  * presubmit: Add pylint-2.7 and .pylintrc
  * patch-check: shfmt
  * patch-check: Add shellcheck
  * Reformat docstring and .style.yapf
  * Replace single quotes
  * Set CheckPatchFormatted flags to fail on diffs
  * Port jenkins scripts: Fix link error in x86-ubsan
  * Port jenkins scripts: unit testing
  * infra/*.sh: apply shfmt
* Thu Dec 16 2021 Robert Herb <proletheus@freenet.de>
- Initial package
openSUSE Build Service is sponsored by