generated from demus/golang-rpm-template
82 lines
1.9 KiB
RPMSpec
82 lines
1.9 KiB
RPMSpec
# Generated by go2rpm 1.15.0
|
|
%bcond check 1
|
|
%bcond bootstrap 0
|
|
|
|
%global debug_package %{nil}
|
|
|
|
%if %{with bootstrap}
|
|
%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$
|
|
%endif
|
|
|
|
# https://github.com/digitalocean/go-qemu
|
|
%global goipath github.com/digitalocean/go-qemu
|
|
%global commit 2e3d0186973edb6a2811ee1240651bda63d7687d
|
|
|
|
%gometa -f
|
|
|
|
%global common_description %{expand:
|
|
Go packages to interact with QEMU using the QEMU Machine Protocol (QMP).
|
|
Apache 2.0 Licensed.}
|
|
|
|
%global golicenses LICENSE.md scripts/license.txt\\\
|
|
scripts/licensecheck.sh
|
|
%global godocs examples AUTHORS CONTRIBUTING.md README.md\\\
|
|
hypervisor/README.md qapi-schema/README.md\\\
|
|
qmp/README.md
|
|
|
|
Name: golang-github-digitalocean-qemu
|
|
Version: 0
|
|
Release: %autorelease -p
|
|
Summary: Go packages to interact with QEMU using the QEMU Machine Protocol (QMP). Apache 2.0 Licensed
|
|
|
|
License: Apache-2.0
|
|
URL: %{gourl}
|
|
Source: %{gosource}
|
|
|
|
%description %{common_description}
|
|
|
|
%gopkg
|
|
|
|
%prep
|
|
%goprep -A
|
|
%autopatch -p1 -q
|
|
|
|
%if %{without bootstrap}
|
|
%generate_buildrequires
|
|
%go_generate_buildrequires
|
|
%endif
|
|
|
|
%if %{without bootstrap}
|
|
%build
|
|
for cmd in qmp/raw; do
|
|
%gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
|
|
done
|
|
%endif
|
|
|
|
%install
|
|
%gopkginstall
|
|
%if %{without bootstrap}
|
|
install -m 0755 -vd %{buildroot}%{_bindir}
|
|
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
|
|
%endif
|
|
|
|
%if %{without bootstrap}
|
|
%if %{with check}
|
|
%check
|
|
%gocheck
|
|
%endif
|
|
%endif
|
|
|
|
%if %{without bootstrap}
|
|
%files
|
|
%license LICENSE.md scripts/license.txt scripts/licensecheck.sh
|
|
%doc examples AUTHORS CONTRIBUTING.md README.md hypervisor/README.md
|
|
%doc qapi-schema/README.md qmp/README.md
|
|
%{_bindir}/*
|
|
%endif
|
|
|
|
%gopkgfiles
|
|
|
|
%changelog
|
|
%autochangelog
|