# Generated by rust2rpm 26
%bcond_without check
%global crate gst-plugin-gtk4
Name: rust-gst-plugin-gtk4
Version: 0.12.3
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 dependencies and normalize metadata
Patch: gst-plugin-gtk4-fix-metadata-auto.diff
# Manually created patch for downstream crate metadata changes
# * drop Windows-specific "winegl" feature
Patch: gst-plugin-gtk4-fix-metadata.diff
BuildRequires: cargo-rpm-macros >= 24
%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: MPL-2.0 AND MIT AND (Apache-2.0 OR MIT) 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}+gtk_v4_10-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+gtk_v4_10-devel %{_description}
This package contains library source intended for building other packages which
use the "gtk_v4_10" feature of the "%{crate}" crate.
%files -n %{name}+gtk_v4_10-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+gtk_v4_12-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+gtk_v4_12-devel %{_description}
This package contains library source intended for building other packages which
use the "gtk_v4_12" feature of the "%{crate}" crate.
%files -n %{name}+gtk_v4_12-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+gtk_v4_14-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+gtk_v4_14-devel %{_description}
This package contains library source intended for building other packages which
use the "gtk_v4_14" feature of the "%{crate}" crate.
%files -n %{name}+gtk_v4_14-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} -p1
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires -f wayland,x11egl,x11glx
echo 'cargo-c >= 0.9.21'
%build
%cargo_build -f wayland,x11egl,x11glx
%{cargo_license_summary -f wayland,x11egl,x11glx}
%{cargo_license -f wayland,x11egl,x11glx} > LICENSE.dependencies
%cargo_cbuild -f wayland,x11egl,x11glx
%install
%cargo_install -f wayland,x11egl,x11glx
%cargo_cinstall -f wayland,x11egl,x11glx
# 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 -f wayland,x11egl,x11glx
%endif
%changelog
%autochangelog