Skip to content

Instantly share code, notes, and snippets.

@dghubble
Created March 31, 2023 02:27
Show Gist options
  • Save dghubble/aa2821da4c13927fa9af96cbffebd28a to your computer and use it in GitHub Desktop.
Save dghubble/aa2821da4c13927fa9af96cbffebd28a to your computer and use it in GitHub Desktop.
# Generated by go2rpm 1.9.0
%bcond_without check
# https://github.com/containerd/btrfs
%global goipath github.com/containerd/btrfs/v2
Version: 2.0.0
%gometa -f
%global common_description %{expand:
Btrfs bindings for Go.}
%global golicenses LICENSE
%global godocs README.md
Name: %{goname}
Release: %autorelease
Summary: Btrfs bindings for Go
License: Apache-2.0
URL: %{gourl}
Source: %{gosource}
%description %{common_description}
%gopkg
%prep
%goprep
%autopatch -p1
%generate_buildrequires
%go_generate_buildrequires
%build
for cmd in cmd/* ; do
%gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
done
%install
%gopkginstall
install -m 0755 -vd %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
%if %{with check}
%check
%gocheck
%endif
%files
%license LICENSE
%doc README.md
%{_bindir}/*
%gopkgfiles
%changelog
%autochangelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment