# Generated by go2rpm 1 %bcond_without check # https://github.com/nicksnyder/go-i18n/v2 %global goipath github.com/nicksnyder/go-i18n/v2 %global forgeurl https://github.com/nicksnyder/go-i18n Version: 2.1.2 %gometa %global common_description %{expand: go-i18n is a Go package and a command that helps you translate Go programs into multiple languages. - Supports pluralized strings for all 200+ languages in the Unicode Common Locale Data Repository (CLDR). - Code and tests are automatically generated from CLDR data. - Supports strings with named variables using text/template syntax. - Supports message files of any format (e.g. JSON, TOML, YAML, etc.). - Documented and tested!} %global golicenses LICENSE %global godocs CHANGELOG.md README.md dev.md example Name: %{goname} Release: %autorelease Summary: Translate your Go program into multiple languages License: MIT URL: %{gourl} Source0: %{gosource} # Not upstreamed Patch0: 0001-Fix-error-message-changed-with-Go-1.16.patch # Remove in F43 Provides: golang-github-nicksnyder-i18n-2 = %{version}-%{release} Obsoletes: golang-github-nicksnyder-i18n-2 < 2.1.2-10 %global godevelheader %{expand: Provides: golang-github-nicksnyder-i18n-2-devel = %{version}-%{release} Obsoletes: golang-github-nicksnyder-i18n-2-devel < 2.1.2-10} BuildRequires: golang(github.com/BurntSushi/toml) BuildRequires: golang(golang.org/x/text/language) BuildRequires: golang(gopkg.in/yaml.v2) Provides: go-i18n = %{version}-%{release} %description %{common_description} %gopkg %prep %goprep %patch0 -p1 mv v2/* ./ %build for cmd in goi18n; 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 %doc README.md CHANGELOG.md %license LICENSE %{_bindir}/* %gopkgfiles %changelog %autochangelog