Skip to content

Commit

Permalink
drop gst subpkg
Browse files Browse the repository at this point in the history
Signed-off-by: madomado <[email protected]>
  • Loading branch information
madonuko authored Jun 25, 2024
1 parent 486830a commit 17f7d7a
Showing 1 changed file with 6 additions and 88 deletions.
94 changes: 6 additions & 88 deletions anda/lib/openh264/openh264.spec
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ Summary: H.264 codec library

License: BSD
URL: https://www.openh264.org/
Source0: https://github.com/cisco/openh264/archive/v%{openh264_version}/openh264-%{openh264_version}.tar.gz
Source0: https://github.com/cisco/openh264/archive/v%version/openh264-%version.tar.gz
Source1: https://github.com/mozilla/gmp-api/archive/%{commit1}/gmp-api-%{shortcommit1}.tar.gz

BuildRequires: gcc-c++
BuildRequires: gstreamer1-devel >= %{gst_version}
BuildRequires: gstreamer1-plugins-base-devel >= %{gst_version}
BuildRequires: gstreamer1-devel
BuildRequires: gstreamer1-plugins-base-devel
BuildRequires: make
BuildRequires: meson
BuildRequires: nasm
Expand All @@ -27,7 +27,7 @@ suitable for use in real time applications such as WebRTC.

%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{openh264_version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}

%description devel
The %{name}-devel package contains libraries and header files for
Expand All @@ -36,26 +36,14 @@ developing applications that use %{name}.

%package -n mozilla-openh264
Summary: H.264 codec support for Mozilla browsers
Requires: %{name}%{?_isa} = %{openh264_version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: mozilla-filesystem%{?_isa}

%description -n mozilla-openh264
The mozilla-openh264 package contains a H.264 codec plugin for Mozilla
browsers.


%package -n gstreamer1-plugin-openh264
Version: %{gst_version}
Release: 2%{?dist}
Summary: GStreamer H.264 plugin

%description -n gstreamer1-plugin-openh264
GStreamer is a streaming media framework, based on graphs of elements which
operate on media data.

This package contains the H.264 plugin.


%prep
%setup -q

Expand All @@ -79,20 +67,6 @@ make %{?_smp_mflags}
# ... then build the mozilla plugin
make plugin %{?_smp_mflags}

# ... and finally build the gstreamer plugin against the previously built
# openh264 libraries
pushd gst-plugins-bad-%{gst_version}
CFLAGS="%{build_cflags} -I`pwd`/../codec/api" \
CXXFLAGS="%{build_cflags} -I`pwd`/../codec/api" \
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


%install
%make_install
Expand All @@ -116,63 +90,12 @@ EOF
# Remove static libraries
rm $RPM_BUILD_ROOT%{_libdir}/*.a

# Install the gstreamer plugin
pushd gst-plugins-bad-%{gst_version}
%meson_install

# Register as an AppStream component to be visible in the software center
#
# NOTE: It would be *awesome* if this file was maintained by the upstream
# project, translated and installed into the right place during `make install`.
#
# See http://www.freedesktop.org/software/appstream/docs/ for more details.
#
mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
cat > $RPM_BUILD_ROOT%{_datadir}/appdata/gstreamer-openh264.appdata.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2015 Kalev Lember <[email protected]> -->
<component type="codec">
<id>gstreamer-openh264</id>
<metadata_license>CC0-1.0</metadata_license>
<name>GStreamer Multimedia Codecs - H.264</name>
<summary>Multimedia playback for H.264</summary>
<description>
<p>
This addon includes a codec for H.264 playback and encoding.
</p>
<p>
These codecs can be used to encode and decode media files where the
format is not patent encumbered.
</p>
<p>
A codec decodes audio and video for playback or editing and is also
used for transmission or storage.
Different codecs are used in video-conferencing, streaming media and
video editing applications.
</p>
</description>
<url type="homepage">http://gstreamer.freedesktop.org/</url>
<url type="bugtracker">https://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer</url>
<url type="help">http://gstreamer.freedesktop.org/documentation/</url>
<url type="donation">http://www.gnome.org/friends/</url>
<update_contact><!-- upstream-contact_at_email.com --></update_contact>
</component>
EOF

# 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}/pkgconfig/gstreamer-*.pc
rm -rf $RPM_BUILD_ROOT%{_libdir}/libgst*.so*
rm -rf $RPM_BUILD_ROOT%{_datadir}/gstreamer-1.0/
popd


%files
%license LICENSE
%doc README.md
%{_libdir}/libopenh264.so.7
%{_libdir}/libopenh264.so.%{openh264_version}
%{_libdir}/libopenh264.so.%{version}

%files devel
%{_includedir}/wels/
Expand All @@ -187,10 +110,5 @@ popd
%{_libdir}/firefox/defaults/pref/gmpopenh264.js
%{_libdir}/mozilla/plugins/gmp-gmpopenh264/

%files -n gstreamer1-plugin-openh264
%{_datadir}/appdata/*.appdata.xml
%{_libdir}/gstreamer-1.0/libgstopenh264.so


%changelog
%autochangelog

0 comments on commit 17f7d7a

Please sign in to comment.