# Generated by go2rpm 1.9.0
%bcond_with bootstrap
%if %{with bootstrap}
# Do not run %%check when bootstrapping.
%bcond_with check
%else
%bcond_without check
%endif
%global debug_package %{nil}
# https://github.com/spf13/viper
%global goipath github.com/spf13/viper
Version: 1.17.0
%gometa
%global goipaths0 github.com/spf13/viper
%global goipathsex0 github.com/spf13/viper/remote
%if %{without bootstrap}
%global goipaths1 github.com/spf13/viper/remote
%endif
%global common_description %{expand:
Viper is a complete configuration solution for Go applications including
12-Factor apps. It is designed to work within an application, and can handle all
types of configuration needs and formats. It supports:
- setting defaults
- reading from JSON, TOML, YAML, HCL, and Java properties config files
- live watching and re-reading of config files (optional)
- reading from environment variables
- reading from remote config systems (etcd or Consul), and watching changes
- reading from command line flags
- reading from buffer
- setting explicit values
Viper can be thought of as a registry for all of your applications configuration
needs.}
%global golicenses LICENSE
%global godocs README.md
Name: %{goname}
Release: %autorelease
Summary: Go configuration with fangs
License: MIT
URL: %{gourl}
Source: %{gosource}
%if %{without bootstrap}
BuildRequires: golang(github.com/sagikazarmark/crypt/config)
%endif
BuildRequires: golang(github.com/fsnotify/fsnotify)
BuildRequires: golang(github.com/hashicorp/hcl)
BuildRequires: golang(github.com/hashicorp/hcl/hcl/printer)
BuildRequires: golang(github.com/magiconair/properties)
BuildRequires: golang(github.com/mitchellh/mapstructure)
BuildRequires: golang(github.com/pelletier/go-toml/v2)
BuildRequires: golang(github.com/sagikazarmark/crypt/config)
BuildRequires: golang(github.com/sagikazarmark/slog-shim)
BuildRequires: golang(github.com/spf13/afero)
BuildRequires: golang(github.com/spf13/cast)
BuildRequires: golang(github.com/spf13/pflag)
BuildRequires: golang(github.com/subosito/gotenv)
BuildRequires: golang(gopkg.in/ini.v1)
BuildRequires: golang(gopkg.in/yaml.v3)
%if %{with check}
# Tests
BuildRequires: golang(github.com/stretchr/testify/assert)
BuildRequires: golang(github.com/stretchr/testify/require)
%endif
%description %{common_description}
%gopkg
%prep
%goprep
%autopatch -p1
%install
%gopkginstall
%if %{with check}
%check
%gocheck
%endif
%gopkgfiles
%changelog
%autochangelog