# Generated by go2rpm 1.14.0
%bcond check 0
%bcond bootstrap 0

#if %{with bootstrap}
%global debug_package %{nil}
#endif

%if %{with bootstrap}
%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$
%endif

# https://github.com/sentriz/cliphist
%global goipath         github.com/sentriz/cliphist
Version:                0.7.0

%gometa -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:        1%?dist
Summary:        Wayland clipboard manager with support for multimedia
Provides:       golang-github-sentriz-cliphist = %version-%release
Obsoletes:      golang-github-sentriz-cliphist < 0.6.1-2
Packager:       madonuko <mado@fyralabs.com>
License:        GPL-3.0-only
URL:            %{gourl}
Source:         %{gosource}
BuildRequires:  anda-srpm-macros

%description %{common_description}

%gopkg

%prep
%goprep -A
%autopatch -p1

%if %{without bootstrap}
%build
%define gomodulesmode GO111MODULE=on
mkdir -p build/bin
%gobuild -o build/bin/%name
%endif

%install
%gopkginstall
%if %{without bootstrap}
install -m 0755 -vd                 %{buildroot}%{_bindir}
install -m 0755 -vp build/bin/%name %{buildroot}%{_bindir}/cliphist
%endif

%if %{without bootstrap}
%if %{with check}
%check
%gocheck
%endif
%endif

%if %{without bootstrap}
%files
%license LICENSE
%doc CHANGELOG.md readme.md
%{_bindir}/cliphist
%endif

%gopkgfiles

%changelog
%autochangelog
