Move from using a subpackage to using a weak dependency for golang-bin approach

Signed-off-by: W. Michael Petullo <mike@flyn.org>
This commit is contained in:
W. Michael Petullo 2022-08-02 17:56:19 -05:00
parent 5c9a60e699
commit 8e3da8b8d0

View File

@ -36,22 +36,16 @@ Patch0002: 0020-clbanning-mxj.patch
Patch0003: 0030-nicksnyder-go-i18n.patch
BuildRequires: golang(github.com/bep/golibsass/libsass) >= 0.7.0
Requires: golang-bin
Requires: hugo-bin
# This is in response to Red Hat Bugzilla #2104346. The full dependencies for
# Hugo are large, including GCC and the Go toolchain. For example,
# "hugo server" will not work without these. It might be beneficial to
# install a smaller package in some instances---such as CI pipelines---that do
# not require "hugo server". Installing hugo-bin rather than hugo avoids the
# dependencies.
%package bin
Summary: The worlds fastest framework for building websites - binary
# This is in response to Red Hat Bugzilla #2104346. The full dependencies
# for Hugo are large, including GCC and the Go toolchain. For example,
# "hugo server" will not work without these. It might be beneficial to avoid
# such large dependencies in some instances---such as CI pipelines---that
# do not require "hugo server". Thus golang-bin is a weak dependency.
#
# Also see the discussion at https://src.fedoraproject.org/rpms/hugo/pull-request/13.
Recommends: golang-bin
%description bin
%{common_description}
This package contains only the hugo binary for use in CI.
%description
%{common_description}
@ -122,14 +116,12 @@ install -Dp man/* -t %{buildroot}%{_mandir}/man1
%files
%doc CONTRIBUTING.md README.md docs
%license LICENSE
%{_bindir}/hugo
%{_datadir}/bash-completion/completions/hugo
%{_mandir}/man1/*.1*
%gopkgfiles
%files bin
%license LICENSE
%{_bindir}/hugo
%changelog
%autochangelog