|
|
|
@ -4,12 +4,12 @@
|
|
|
|
|
%global shortcommit1 %(c=%{commit1}; echo ${c:0:7})
|
|
|
|
|
|
|
|
|
|
%global openh264_version 2.1.1
|
|
|
|
|
%global gst_version 1.16.2
|
|
|
|
|
%global gst_version 1.18.2
|
|
|
|
|
|
|
|
|
|
Name: openh264
|
|
|
|
|
Version: %{openh264_version}
|
|
|
|
|
# Also bump the Release tag for gstreamer1-plugin-openh264 down below
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
Summary: H.264 codec library
|
|
|
|
|
|
|
|
|
|
License: BSD
|
|
|
|
@ -22,19 +22,21 @@ Source1: https://github.com/mozilla/gmp-api/archive/%{commit1}/gmp-api-%{
|
|
|
|
|
Source2: gst-plugins-bad-openh264-%{gst_version}.tar.xz
|
|
|
|
|
Source3: gst-p-bad-cleanup.sh
|
|
|
|
|
|
|
|
|
|
# https://gitlab.freedesktop.org/gstreamer/common/-/merge_requests/4
|
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1799497
|
|
|
|
|
Patch0: gstreamer1-plugins-bad-build-adapt-to-backwards-incompatible-change.patch
|
|
|
|
|
# Fix build failure with opencv disabled:
|
|
|
|
|
# https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1406
|
|
|
|
|
# https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1570
|
|
|
|
|
Patch0: 0001-examples-only-check-opencv_dep-if-option-is-not-disa.patch
|
|
|
|
|
# Fix build failure with va disabled:
|
|
|
|
|
Patch1: 0001-No-va-test-when-va-disabled.patch
|
|
|
|
|
|
|
|
|
|
# Don't use pkg-config for finding openh264 as we are building against an in-tree copy
|
|
|
|
|
Patch2: hardcode-openh264-dep.patch
|
|
|
|
|
|
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
BuildRequires: autoconf
|
|
|
|
|
BuildRequires: automake
|
|
|
|
|
BuildRequires: chrpath
|
|
|
|
|
BuildRequires: gettext-devel
|
|
|
|
|
BuildRequires: gstreamer1-devel >= %{gst_version}
|
|
|
|
|
BuildRequires: gstreamer1-plugins-base-devel >= %{gst_version}
|
|
|
|
|
BuildRequires: libtool
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
BuildRequires: meson
|
|
|
|
|
BuildRequires: nasm
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
@ -63,7 +65,7 @@ browsers.
|
|
|
|
|
|
|
|
|
|
%package -n gstreamer1-plugin-openh264
|
|
|
|
|
Version: %{gst_version}
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Summary: GStreamer H.264 plugin
|
|
|
|
|
Supplements: totem%{?_isa}
|
|
|
|
|
|
|
|
|
@ -85,6 +87,8 @@ mv gmp-api-%{commit1} gmp-api
|
|
|
|
|
tar -xf %{S:2}
|
|
|
|
|
pushd gst-plugins-bad-%{gst_version}
|
|
|
|
|
%patch0 -p1
|
|
|
|
|
%patch1 -p1
|
|
|
|
|
%patch2 -p1
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
# Update the makefile with our build options
|
|
|
|
@ -106,17 +110,14 @@ make plugin %{?_smp_mflags}
|
|
|
|
|
# openh264 libraries
|
|
|
|
|
pushd gst-plugins-bad-%{gst_version}
|
|
|
|
|
ln -s ../codec/api/svc wels
|
|
|
|
|
export OPENH264_CFLAGS="-I."
|
|
|
|
|
export OPENH264_LIBS="-L`pwd`/.. -lopenh264"
|
|
|
|
|
autoreconf --force --install
|
|
|
|
|
%configure \
|
|
|
|
|
--with-package-name="Fedora gstreamer1-plugin-openh264 package" \
|
|
|
|
|
--with-package-origin="http://www.openh264.org/" \
|
|
|
|
|
--disable-static \
|
|
|
|
|
--disable-gl \
|
|
|
|
|
--disable-hls \
|
|
|
|
|
--enable-openh264
|
|
|
|
|
make V=1 %{?_smp_mflags}
|
|
|
|
|
CFLAGS="%{build_cflags} -I." \
|
|
|
|
|
LDFLAGS="%{build_ldflags} -L`pwd`/.." \
|
|
|
|
|
%meson \
|
|
|
|
|
--auto-features=disabled \
|
|
|
|
|
-D package-name="Fedora gstreamer1-plugin-openh264 package" \
|
|
|
|
|
-D package-origin="http://www.openh264.org/" \
|
|
|
|
|
-D openh264=enabled
|
|
|
|
|
%meson_build
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -144,7 +145,7 @@ rm $RPM_BUILD_ROOT%{_libdir}/*.a
|
|
|
|
|
|
|
|
|
|
# Install the gstreamer plugin
|
|
|
|
|
pushd gst-plugins-bad-%{gst_version}
|
|
|
|
|
%make_install
|
|
|
|
|
%meson_install
|
|
|
|
|
|
|
|
|
|
# Register as an AppStream component to be visible in the software center
|
|
|
|
|
#
|
|
|
|
@ -185,24 +186,12 @@ cat > $RPM_BUILD_ROOT%{_datadir}/appdata/gstreamer-openh264.appdata.xml <<EOF
|
|
|
|
|
</component>
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
# Remove libtool .la files
|
|
|
|
|
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
|
|
|
|
|
|
|
|
|
|
# Remove unwanted gst-plugins-bad files
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_bindir}/gst-transcoder-1.0
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_includedir}/gstreamer-1.0/
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_libdir}/girepository-1.0/Gst*.typelib
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig/gstreamer-*.pc
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_libdir}/libgst*.so*
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_datadir}/gir-1.0/Gst*.gir
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_datadir}/gstreamer-1.0/
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_datadir}/gtk-doc/html/gst-plugins-bad*/
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/*/*/gst-plugins-bad-1.0.mo
|
|
|
|
|
|
|
|
|
|
# Only keep libgstopenh264.so
|
|
|
|
|
find $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/ -not -name 'libgstopenh264.so' -type f | xargs rm
|
|
|
|
|
|
|
|
|
|
# Kill rpath
|
|
|
|
|
chrpath --delete $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/libgstopenh264.so
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -231,6 +220,9 @@ popd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Thu Feb 11 2021 Kalev Lember <klember@redhat.com> - 2.1.1-2
|
|
|
|
|
- Update gstreamer plugin to 1.18.2
|
|
|
|
|
|
|
|
|
|
* Fri May 22 2020 Kalev Lember <klember@redhat.com> - 2.1.1-1
|
|
|
|
|
- Update to 2.1.1
|
|
|
|
|
- Add totem supplements to gstreamer1-plugin-openh264
|
|
|
|
|