# Generated by rust2rpm 26
%bcond_without check

%global crate ripdrag
%global cargo_install_lib 0

Name:           ripdrag
Version:        0.4.10
Release:        %autorelease
Summary:        Drag and Drop files to and from the terminal
License:        GPL-3.0-only

URL:            https://github.com/nik012003/ripdrag
Source:         %{url}/archive/refs/tags/v%{version}.tar.gz

BuildRequires:  cargo-rpm-macros >= 26
BuildRequires:  pkg-config
BuildRequires:  glib2-devel
BuildRequires:  gdk-pixbuf2-devel
BuildRequires:  cairo-devel
BuildRequires:  cairo-gobject-devel
BuildRequires:  pango-devel
BuildRequires:  graphene-devel
BuildRequires:  gtk4-devel

%global _description %{expand:
Drag and Drop files to and from the terminal.}

%description %{_description}

%prep
%autosetup -n %{crate}-%{version} -p1
cargo vendor
%cargo_prep -v vendor

%build
%cargo_build
%{cargo_license_summary}
%{cargo_license} > LICENSE.dependencies
%{cargo_vendor_manifest}

%install
%cargo_install

%if %{with check}
%check
%cargo_test
%endif

%files
%license LICENSE
%license LICENSE.dependencies
%license cargo-vendor.txt
%doc README.md
%{_bindir}/ripdrag

%changelog
%autochangelog