From 28d1fd8403d45807fc47153da2c5c41160b7014a Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Feb 08 2024 16:02:06 +0000 Subject: Add conditionals for only building openh264 support on F40+ for now The "noopenh264" stub package that makes it all possible is currently only available on F40+. --- diff --git a/gstreamer1-plugins-bad-free.spec b/gstreamer1-plugins-bad-free.spec index a5e9072..53e3906 100644 --- a/gstreamer1-plugins-bad-free.spec +++ b/gstreamer1-plugins-bad-free.spec @@ -4,6 +4,7 @@ # Only have extras package on fedora %bcond extras %{defined fedora} %bcond opencv %[ 0%{?fedora} >= 39 ] +%bcond openh264 %[ 0%{?fedora} >= 40 ] #global gitrel 140 #global gitcommit 4ca3a22b6b33ad8be4383063e76f79c4d346535d @@ -118,7 +119,9 @@ BuildRequires: openal-soft-devel BuildRequires: opencv-devel %endif BuildRequires: openjpeg2-devel +%if %{with openh264} BuildRequires: pkgconfig(openh264) +%endif BuildRequires: pkgconfig(spandsp) >= 0.0.6 ## Plugins not ported #BuildRequires: SDL-devel @@ -240,6 +243,7 @@ This package (%{name}-opencv) contains the OpenCV plugins. %endif +%if %{with openh264} %package -n gstreamer1-plugin-openh264 Summary: GStreamer OpenH264 plugin License: LGPL-2.0-or-later AND BSD-2-Clause @@ -251,6 +255,7 @@ GStreamer is a streaming media framework, based on graphs of elements which operate on media data. This package contains the OpenH264 plugin. +%endif %package libs @@ -300,6 +305,7 @@ aren't tested well enough, or the code is not of good enough quality. %{!?with_extras:-D modplug=disabled } \ %{!?with_extras:-D openal=disabled } \ %{!?with_opencv:-D opencv=disabled } \ + %{!?with_openh264:-D openh264=disabled } \ %{!?with_extras:-D openjpeg=disabled } \ %{!?with_extras:-D wildmidi=disabled -D zbar=disabled } \ %{!?with_extras:-D gme=disabled -D lv2=disabled } \ @@ -396,6 +402,7 @@ cat > $RPM_BUILD_ROOT%{_metainfodir}/gstreamer-bad-free.appdata.xml < EOF +%if %{with openh264} cat > $RPM_BUILD_ROOT%{_metainfodir}/gstreamer-openh264.appdata.xml < @@ -426,6 +433,7 @@ cat > $RPM_BUILD_ROOT%{_metainfodir}/gstreamer-openh264.appdata.xml < EOF +%endif %find_lang gst-plugins-bad-%{majorminor} @@ -632,11 +640,13 @@ rm $RPM_BUILD_ROOT%{_bindir}/playout %{_libdir}/libgstopencv-%{majorminor}.so.0{,.*} %endif +%if %{with openh264} %files -n gstreamer1-plugin-openh264 %license COPYING %license ext/openh264/LICENSE %{_metainfodir}/gstreamer-openh264.appdata.xml %{_libdir}/gstreamer-1.0/libgstopenh264.so +%endif %files libs %license COPYING