# Generated by go2rpm 1.10.0
%bcond_without check

# https://github.com/sentriz/cliphist
%global goipath         go.senan.xyz/cliphist
%global forgeurl        https://github.com/sentriz/cliphist
Version:                0.1.2

%gometa -L -f

%global common_description %{expand:
Wayland clipboard manager with support for multimedia.}

%global golicenses      LICENSE
%global godocs          CHANGELOG.md readme.md version.txt

Name:           cliphist
Release:        %autorelease
Summary:        Wayland clipboard manager with support for multimedia

License:        GPL-3.0-only
URL:            %{gourl}
Source:         %{gosource}
Requires:       wl-clipboard xdg-utils

%description %{common_description}

%prep
%goprep -A
%autopatch -p1

%generate_buildrequires
%go_generate_buildrequires

%build
%gobuild -o %{gobuilddir}/bin/cliphist %{goipath}

%install
install -m 0755 -vd                     %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
install -m 0755 -vp contrib/*           %{buildroot}%{_bindir}/

%if %{with check}
%check
echo "Skipping _percent_gocheck until I figure out how to run it (it fails because of an import)"
%endif

%files
%license LICENSE
%doc CHANGELOG.md readme.md version.txt
%{_bindir}/*

%changelog
%autochangelog