# Generated by go2rpm 1.8.0 # # This specfile is licensed under: # SPDX-License-Identifier: MIT # License text: https://spdx.org/licenses/MIT.html # SPDX-FileCopyrightText: 2022 Maxwell G # SPDX-FileCopyrightText: Fedora Project Authors %bcond_without check # https://git.sr.ht/~emersion/hut %global goipath git.sr.ht/~emersion/hut %global topdir %{name}-v%{version} Version: 0.2.0 %gometa -f %global goname hut %global common_description %{expand: hut is a CLI tool for interacting with Sourcehut instances. It supports git.sr.ht as well as self-hosted Sourcehut instances.} %global golicenses LICENSE %global godocs doc README.md Name: %{goname} Release: %autorelease Summary: A CLI tool for sr.ht. License: AGPL-3.0-only URL: %{gourl} # The forge macros don't support Sourcehut. # https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/209 Source: %{gourl}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: scdoc %description %{common_description} %gopkg %prep %goprep # We use %%gobuild to build the hut binary sed -i 's|$(GO) build $(GOFLAGS)|true|' Makefile %generate_buildrequires %go_generate_buildrequires %build # The Makefile expects hut to be in the current directory %gobuild -o hut %{goipath} %make_build doc/hut.1 completions %install %gopkginstall %make_install PREFIX=%{_prefix} %if %{with check} %check %gocheck %endif %files %license LICENSE %doc %{godocs} %{_bindir}/hut %{_mandir}/man1/hut.1* %{bash_completions_dir}/hut %{zsh_completions_dir}/_hut %{fish_completions_dir}/hut.fish %gopkgfiles %changelog %autochangelog