From 8e7b9a81703217c7f9fe0163a7084fc0235fec72 Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Nov 24 2014 12:02:22 +0000 Subject: Extend import paths for golang.org/x/ - related: #1009967 --- diff --git a/golang-googlecode-net.spec b/golang-googlecode-net.spec index ffdb5c0..a06d420 100644 --- a/golang-googlecode-net.spec +++ b/golang-googlecode-net.spec @@ -8,9 +8,15 @@ %global rev 90e232e2462dedc03bf3c93358da62d54d55dfb6 %global shortrev %(r=%{rev}; echo ${r:0:12}) +%global x_provider golang +%global x_provider_tld org +%global x_repo net +%global x_import_path %{x_provider}.%{x_provider_tld}/x/%{x_repo} +%global x_name golang-%{x_provider}%{x_provider_tld}-%{repo} + Name: golang-%{provider}%{provider_prefix}-%{repo} Version: 0 -Release: 0.16.hg%{shortrev}%{?dist} +Release: 0.17.hg%{shortrev}%{?dist} Summary: Supplementary Go networking libraries License: BSD URL: http://%{import_path} @@ -31,7 +37,7 @@ BuildRequires: golang(code.google.com/p/go.text/encoding/traditionalchinese) BuildRequires: golang(code.google.com/p/go.text/encoding/unicode) BuildRequires: golang(code.google.com/p/go.text/transform) Requires: golang >= 1.2.1-3 -Summary: Supplementary Go networking libraries +Summary: Supplementary Go networking libraries for code.google.com/p/ imports Provides: golang(%{import_path}/context) = %{version}-%{release} Provides: golang(%{import_path}/dict) = %{version}-%{release} Provides: golang(%{import_path}/html) = %{version}-%{release} @@ -47,11 +53,43 @@ Provides: golang(%{import_path}/publicsuffix) = %{version}-%{release} Provides: golang(%{import_path}/spdy) = %{version}-%{release} Provides: golang(%{import_path}/websocket) = %{version}-%{release} +%package -n %{x_name}-devel +BuildRequires: golang >= 1.2.1-3 +BuildRequires: golang(golang.org/x/text/encoding) +BuildRequires: golang(golang.org/x/text/encoding/charmap) +BuildRequires: golang(golang.org/x/text/encoding/japanese) +BuildRequires: golang(golang.org/x/text/encoding/korean) +BuildRequires: golang(golang.org/x/text/encoding/simplifiedchinese) +BuildRequires: golang(golang.org/x/text/encoding/traditionalchinese) +BuildRequires: golang(golang.org/x/text/encoding/unicode) +BuildRequires: golang(golang.org/x/text/transform) +Requires: golang >= 1.2.1-3 +Summary: Supplementary Go networking libraries for golang.org/x/ imports +Provides: golang(%{x_import_path}/context) = %{version}-%{release} +Provides: golang(%{x_import_path}/dict) = %{version}-%{release} +Provides: golang(%{x_import_path}/html) = %{version}-%{release} +Provides: golang(%{x_import_path}/html/atom) = %{version}-%{release} +Provides: golang(%{x_import_path}/html/charset) = %{version}-%{release} +Provides: golang(%{x_import_path}/idna) = %{version}-%{release} +Provides: golang(%{x_import_path}/internal/iana) = %{version}-%{release} +Provides: golang(%{x_import_path}/internal/icmp) = %{version}-%{release} +Provides: golang(%{x_import_path}/ipv4) = %{version}-%{release} +Provides: golang(%{x_import_path}/ipv6) = %{version}-%{release} +Provides: golang(%{x_import_path}/proxy) = %{version}-%{release} +Provides: golang(%{x_import_path}/publicsuffix) = %{version}-%{release} +Provides: golang(%{x_import_path}/spdy) = %{version}-%{release} +Provides: golang(%{x_import_path}/websocket) = %{version}-%{release} + %description devel %{summary} This package contains library source intended for building other packages -which use the supplementary Go networking libraries. +which use the supplementary Go networking libraries with code.google.com/p/ imports. + +%description -n %{x_name}-devel + +This package contains library source intended for building other packages +which use the supplementary Go text libraries with golang.org/x/ imports. %prep @@ -61,30 +99,41 @@ which use the supplementary Go networking libraries. %install install -dp %{buildroot}/%{gopath}/src/%{import_path} +install -dp %{buildroot}/%{gopath}/src/%{x_import_path} for dir in */ ; do cp -rpav $dir %{buildroot}/%{gopath}/src/%{import_path}/ + cp -rpav $dir %{buildroot}/%{gopath}/src/%{x_import_path}/ done %check for dir in $(find . -mindepth 0 -maxdepth 3 -type d); do if [ $(find $dir -maxdepth 1 -name *_test.go | wc -l) != '0' ]; then + if [ "$dir" == "./context" ]; then + continue + fi GOPATH=%{gopath}:%{buildroot}%{gopath} go test %{import_path}/$dir fi done rm -rf %{buildroot}%{gopath}/src/%{import_path}/html/testdata rm -rf %{buildroot}%{gopath}/src/%{import_path}/html/charset/testdata +rm -rf %{buildroot}%{gopath}/src/%{x_import_path}/html/testdata +rm -rf %{buildroot}%{gopath}/src/%{x_import_path}/html/charset/testdata %files devel %doc AUTHORS CONTRIBUTORS LICENSE PATENTS README -%dir %{gopath}/src/%{import_path} -%dir %{gopath}/src/%{import_path}/* -%dir %{gopath}/src/%{import_path}/*/* -%{gopath}/src/%{import_path}/*/*.go -%{gopath}/src/%{import_path}/*/*.s -%{gopath}/src/%{import_path}/*/*/*.go +%{gopath}/src/%{import_path} + +%files -n %{x_name}-devel +%doc AUTHORS CONTRIBUTORS LICENSE PATENTS README +%{gopath}/src/%{x_import_path} %changelog +* Mon Nov 24 2014 jchaloup - 0-0.17.hg90e232e2462d +- Extend import paths for golang.org/x/ +- context test failing on master + related: #1009967 + * Mon Sep 29 2014 Lokesh Mandvekar - 0-0.16.hg90e232e2462d - Resolves: rhbz#1147193 - update to latest upstream revision 90e232e2462dedc03bf3c93358da62d54d55dfb6