diff --git a/.gitignore b/.gitignore index 721b029..4774551 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /go-i18n-1.10.0.tar.gz +/go-i18n-2.0.0.tar.gz diff --git a/dcabc04bafa409ece9c72bd55b1233fd01f7e06b.patch b/dcabc04bafa409ece9c72bd55b1233fd01f7e06b.patch deleted file mode 100644 index db88019..0000000 --- a/dcabc04bafa409ece9c72bd55b1233fd01f7e06b.patch +++ /dev/null @@ -1,41 +0,0 @@ -From dcabc04bafa409ece9c72bd55b1233fd01f7e06b Mon Sep 17 00:00:00 2001 -From: jcajka -Date: Mon, 5 Feb 2018 16:45:55 +0100 -Subject: [PATCH] Make tests pass with go1.10 avoiding following failures: - (#86) - -i18n/translations_test.go:66: Error call has possible formatting directive %v -FAIL _/root/go-i18n/i18n [build failed] -i18n/language/pluralspec_test.go:73: Errorf format %q has arg spec of wrong type *language.PluralSpec -FAIL _/root/go-i18n/i18n/language [build failed] ---- - i18n/language/pluralspec_test.go | 2 +- - i18n/translations_test.go | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/i18n/language/pluralspec_test.go b/i18n/language/pluralspec_test.go -index 51c1685..e31cfb7 100644 ---- a/i18n/language/pluralspec_test.go -+++ b/i18n/language/pluralspec_test.go -@@ -70,7 +70,7 @@ func TestGetPluralSpec(t *testing.T) { - for _, test := range tests { - spec := GetPluralSpec(test.src) - if spec != test.spec { -- t.Errorf("getPluralSpec(%q) = %q expected %q", test.src, spec, test.spec) -+ t.Errorf("getPluralSpec(%v) = %v expected %v", test.src, spec, test.spec) - } - } - } -diff --git a/i18n/translations_test.go b/i18n/translations_test.go -index 86c5808..ba1a21b 100644 ---- a/i18n/translations_test.go -+++ b/i18n/translations_test.go -@@ -63,7 +63,7 @@ func testFile(t *testing.T, path string) { - - got := T(tc.id, args...) - if got != tc.want { -- t.Error("got: %v; want: %v", got, tc.want) -+ t.Errorf("got: %v; want: %v", got, tc.want) - } - } - } diff --git a/golang-github-nicksnyder-i18n.spec b/golang-github-nicksnyder-i18n.spec index aa00947..ad7a157 100644 --- a/golang-github-nicksnyder-i18n.spec +++ b/golang-github-nicksnyder-i18n.spec @@ -1,52 +1,60 @@ -%global goipath github.com/nicksnyder/go-i18n -Version: 1.10.0 +# Generated by go2rpm +%bcond_without check + +# https://github.com/nicksnyder/go-i18n +%global goipath github.com/nicksnyder/go-i18n +Version: 2.0.0 %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: 1%{?dist} Summary: Translate your Go program into multiple languages + License: MIT URL: %{gourl} Source0: %{gosource} -Patch0001: https://github.com/nicksnyder/go-i18n/commit/dcabc04bafa409ece9c72bd55b1233fd01f7e06b.patch - -%description -%{summary} - -%package devel -Summary: %{summary} -BuildArch: noarch +BuildRequires: golang(github.com/BurntSushi/toml) +BuildRequires: golang(github.com/pelletier/go-toml) +BuildRequires: golang(golang.org/x/text/language) +BuildRequires: golang(gopkg.in/yaml.v2) -BuildRequires: golang(github.com/pelletier/go-toml) -BuildRequires: golang(golang.org/x/text/language) -BuildRequires: golang(gopkg.in/yaml.v2) - -%description devel -%{summary} - -This package contains library source intended for building other packages which -use import path with %{goipath} prefix. +%description +%{common_description} +%gopkg %prep -%forgeautosetup -p1 - +%goprep %install -%goinstall - +%gopkginstall +%if %{with check} %check -%gochecks - - -%files devel -f devel.file-list -%doc README.md CHANGELOG -%license LICENSE +%gocheck +%endif +%gopkgfiles %changelog +* Thu May 23 18:53:45 CEST 2019 Robert-André Mauchin - 2.0.0-1 +- Release 2.0.0 + * Tue Feb 19 2019 Elliott Sales de Andrade - 1.10.0-1 - First package for Fedora diff --git a/sources b/sources index e9ad265..f56738e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (go-i18n-1.10.0.tar.gz) = b9dd6f64066cd2184dcbd9d5795b8c7e8c296cb889bd264580bfc5981e9e11fe9b91189991c3c7a005c957bbe1ab1e8c8ef52a00fab24bd25d8056d467e41cae +SHA512 (go-i18n-2.0.0.tar.gz) = 69eee77d3cca3603c39c34b5ca7cb7e3f0e8d6c93656a49407dc2540cb7749a378757a1a65e72bd606898ef92f934fd050ebbceee195e8ff2a91a0c65d5cf8c0