04fc885
# Generated by go2rpm 1.8.2
797e33d
%bcond_without check
797e33d
797e33d
# https://github.com/atotto/clipboard
797e33d
%global goipath         github.com/atotto/clipboard
b000135
Version:                0.1.4
797e33d
797e33d
%gometa
797e33d
797e33d
%global common_description %{expand:
797e33d
Provide copying and pasting to the Clipboard for Go.}
797e33d
797e33d
%global golicenses      LICENSE
797e33d
%global godocs          README.md
797e33d
797e33d
Name:           %{goname}
c19a9e1
Release:        %autorelease
04fc885
Summary:        Clipboard for golang
797e33d
04fc885
License:        BSD-3-Clause
797e33d
URL:            %{gourl}
04fc885
Source:         %{gosource}
797e33d
04fc885
BuildRequires:  xorg-x11-server-Xvfb
04fc885
BuildRequires:  xclip
04fc885
04fc885
%description %{common_description}
797e33d
797e33d
%gopkg
797e33d
797e33d
%prep
797e33d
%goprep
797e33d
04fc885
%generate_buildrequires
04fc885
%go_generate_buildrequires
04fc885
797e33d
%build
797e33d
for cmd in cmd/* ; do
797e33d
  %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
797e33d
done
797e33d
797e33d
%install
797e33d
%gopkginstall
797e33d
install -m 0755 -vd                     %{buildroot}%{_bindir}
797e33d
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
797e33d
797e33d
%if %{with check}
797e33d
%check
04fc885
export DISPLAY=:99
04fc885
xdpyinfo -display $DISPLAY > /dev/null || Xvfb $DISPLAY -screen 0 1024x768x16 &
797e33d
%gocheck
797e33d
%endif
797e33d
797e33d
%files
797e33d
%license LICENSE
797e33d
%doc README.md
04fc885
%{_bindir}/gocopy
04fc885
%{_bindir}/gopaste
797e33d
797e33d
%gopkgfiles
797e33d
797e33d
%changelog
c19a9e1
%autochangelog