# Generated by rust2rpm 24 %bcond_without check %global crate gst-plugin-gtk4 Name: rust-gst-plugin-gtk4 Version: 0.11.0 Release: %autorelease Summary: GStreamer GTK 4 Sink element and Paintable widget License: MPL-2.0 URL: https://crates.io/crates/gst-plugin-gtk4 Source: %{crates_source} # Automatically generated patch to strip foreign dependencies Patch: gst-plugin-gtk4-fix-metadata-auto.diff # Manually created patch for downstream crate metadata changes # * Downgrade cargo-c dep to the version available in Fedora # * Remove foreign winegl feature. Normally we'd use rust2rpm.conf to exclude # unwanted features, but in this crate, rust2rpm errors out when parsing the # winegl feature so we need to patch it before rust2rpm sees it to work this # around. Patch: gst-plugin-gtk4-fix-metadata.diff BuildRequires: rust-packaging >= 21 %global _description %{expand: GStreamer GTK 4 Sink element and Paintable widget.} %description %{_description} %package -n gstreamer1-plugin-gtk4 Summary: %{summary} # Apache-2.0 OR MIT # MIT # MIT OR Apache-2.0 # MPL-2.0 # Unlicense OR MIT License: (Apache-2.0 OR MIT) AND MIT AND (MIT OR Apache-2.0) AND MPL-2.0 AND (Unlicense OR MIT) # LICENSE.dependencies contains a full license breakdown # additionally provide the upstream name Provides: %{crate} = %{version}-%{release} %description -n gstreamer1-plugin-gtk4 %{_description} %files -n gstreamer1-plugin-gtk4 %license LICENSE-MPL-2.0 %license LICENSE.dependencies %doc README.md %{_libdir}/gstreamer-1.0/libgstgtk4.so %package devel Summary: %{summary} BuildArch: noarch %description devel %{_description} This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel %license %{crate_instdir}/LICENSE-MPL-2.0 %doc %{crate_instdir}/README.md %{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+default-devel %{_description} This package contains library source intended for building other packages which use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+capi-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+capi-devel %{_description} This package contains library source intended for building other packages which use the "capi" feature of the "%{crate}" crate. %files -n %{name}+capi-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+doc-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+doc-devel %{_description} This package contains library source intended for building other packages which use the "doc" feature of the "%{crate}" crate. %files -n %{name}+doc-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+gdk_wayland-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+gdk_wayland-devel %{_description} This package contains library source intended for building other packages which use the "gdk_wayland" feature of the "%{crate}" crate. %files -n %{name}+gdk_wayland-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+gdk_x11-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+gdk_x11-devel %{_description} This package contains library source intended for building other packages which use the "gdk_x11" feature of the "%{crate}" crate. %files -n %{name}+gdk_x11-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+gst_gl-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+gst_gl-devel %{_description} This package contains library source intended for building other packages which use the "gst_gl" feature of the "%{crate}" crate. %files -n %{name}+gst_gl-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+gst_gl_egl-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+gst_gl_egl-devel %{_description} This package contains library source intended for building other packages which use the "gst_gl_egl" feature of the "%{crate}" crate. %files -n %{name}+gst_gl_egl-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+gst_gl_wayland-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+gst_gl_wayland-devel %{_description} This package contains library source intended for building other packages which use the "gst_gl_wayland" feature of the "%{crate}" crate. %files -n %{name}+gst_gl_wayland-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+gst_gl_x11-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+gst_gl_x11-devel %{_description} This package contains library source intended for building other packages which use the "gst_gl_x11" feature of the "%{crate}" crate. %files -n %{name}+gst_gl_x11-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+static-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+static-devel %{_description} This package contains library source intended for building other packages which use the "static" feature of the "%{crate}" crate. %files -n %{name}+static-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+wayland-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+wayland-devel %{_description} This package contains library source intended for building other packages which use the "wayland" feature of the "%{crate}" crate. %files -n %{name}+wayland-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+x11egl-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+x11egl-devel %{_description} This package contains library source intended for building other packages which use the "x11egl" feature of the "%{crate}" crate. %files -n %{name}+x11egl-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+x11glx-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+x11glx-devel %{_description} This package contains library source intended for building other packages which use the "x11glx" feature of the "%{crate}" crate. %files -n %{name}+x11glx-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires echo 'cargo-c' %build %cargo_build %cargo_cbuild # write license summary and breakdown %cargo_license_summary %{cargo_license} > LICENSE.dependencies %install %cargo_install %cargo_cinstall # remove statically linked library rm -v %{buildroot}/%{_libdir}/gstreamer-1.0/libgstgtk4.a # remove unnecessary pkgconfig file rm -v %{buildroot}/%{_libdir}/pkgconfig/gstgtk4.pc %if %{with check} %check %cargo_test %endif %changelog %autochangelog