[golang-googlecode-net/el6] Extend import paths for golang.org/x/ - related: #1009967

Jan Chaloupka jchaloup at fedoraproject.org
Mon Nov 24 12:04:35 UTC 2014


commit 31bd9c2afcad290cd45bd47e1ee75879e3859e33
Author: Jan Chaloupka <jchaloup at redhat.com>
Date:   Mon Nov 24 10:15:15 2014 +0100

    Extend import paths for golang.org/x/
    - related: #1009967

 golang-googlecode-net.spec |   63 +++++++++++++++++++++++++++++++++++++------
 1 files changed, 54 insertions(+), 9 deletions(-)
---
diff --git a/golang-googlecode-net.spec b/golang-googlecode-net.spec
index 9747aab..933a1fd 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,8 +99,10 @@ 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
@@ -74,17 +114,22 @@ 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 <jchaloup at redhat.com> - 0-0.17.hg90e232e2462d
+- Extend import paths for golang.org/x/
+  related: #1009967
+
 * Mon Sep 29 2014 Lokesh Mandvekar <lsm5 at fedoraproject.org> - 0-0.16.hg90e232e2462d
 - Resolves: rhbz#1147193 - update to latest upstream revision 
   90e232e2462dedc03bf3c93358da62d54d55dfb6


More information about the scm-commits mailing list