diff --git a/.gitignore b/.gitignore index 23f758e..b5c03c2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /84a4013f96e01fdd14b65d260a78b543e3702ee1.zip +/90e232e2462dedc03bf3c93358da62d54d55dfb6.tar.gz diff --git a/golang-googlecode-net.spec b/golang-googlecode-net.spec index 8295373..ffdb5c0 100644 --- a/golang-googlecode-net.spec +++ b/golang-googlecode-net.spec @@ -1,38 +1,51 @@ -%global import_path code.google.com/p/go.net -%global rev 84a4013f96e01fdd14b65d260a78b543e3702ee1 +%global debug_package %{nil} +%global provider_tld com +%global provider google +%global provider_prefix code +%global project p +%global repo net +%global import_path %{provider_prefix}.%{provider}.%{provider_tld}/%{project}/go.%{repo} +%global rev 90e232e2462dedc03bf3c93358da62d54d55dfb6 %global shortrev %(r=%{rev}; echo ${r:0:12}) -Name: golang-googlecode-net -Version: 0 -Release: 0.15.hg%{shortrev}%{?dist} -Summary: Supplementary Go networking libraries -License: BSD -URL: http://%{import_path} -Source0: https://net.go.googlecode.com/archive/%{rev}.zip -%if 0%{?fedora} >= 19 -BuildArch: noarch -%else -ExclusiveArch: %{go_arches} -%endif -BuildRequires: golang +Name: golang-%{provider}%{provider_prefix}-%{repo} +Version: 0 +Release: 0.16.hg%{shortrev}%{?dist} +Summary: Supplementary Go networking libraries +License: BSD +URL: http://%{import_path} +Source0: https://%{repo}.go.%{provider}%{provider_prefix}.%{provider_tld}/archive/%{rev}.tar.gz +BuildArch: noarch %description %{summary} %package devel -Requires: golang -Summary: Supplementary Go networking libraries -Provides: golang(%{import_path}) = %{version}-%{release} -Provides: golang(%{import_path}/dict) = %{version}-%{release} -Provides: golang(%{import_path}/html) = %{version}-%{release} -Provides: golang(%{import_path}/html/atom) = %{version}-%{release} -Provides: golang(%{import_path}/idna) = %{version}-%{release} -Provides: golang(%{import_path}/ipv4) = %{version}-%{release} -Provides: golang(%{import_path}/ipv6) = %{version}-%{release} -Provides: golang(%{import_path}/proxy) = %{version}-%{release} -Provides: golang(%{import_path}/publicsuffix) = %{version}-%{release} -Provides: golang(%{import_path}/spdy) = %{version}-%{release} -Provides: golang(%{import_path}/websocket) = %{version}-%{release} +BuildRequires: golang >= 1.2.1-3 +BuildRequires: golang(code.google.com/p/go.text/encoding) +BuildRequires: golang(code.google.com/p/go.text/encoding/charmap) +BuildRequires: golang(code.google.com/p/go.text/encoding/japanese) +BuildRequires: golang(code.google.com/p/go.text/encoding/korean) +BuildRequires: golang(code.google.com/p/go.text/encoding/simplifiedchinese) +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 +Provides: golang(%{import_path}/context) = %{version}-%{release} +Provides: golang(%{import_path}/dict) = %{version}-%{release} +Provides: golang(%{import_path}/html) = %{version}-%{release} +Provides: golang(%{import_path}/html/atom) = %{version}-%{release} +Provides: golang(%{import_path}/html/charset) = %{version}-%{release} +Provides: golang(%{import_path}/idna) = %{version}-%{release} +Provides: golang(%{import_path}/internal/iana) = %{version}-%{release} +Provides: golang(%{import_path}/internal/icmp) = %{version}-%{release} +Provides: golang(%{import_path}/ipv4) = %{version}-%{release} +Provides: golang(%{import_path}/ipv6) = %{version}-%{release} +Provides: golang(%{import_path}/proxy) = %{version}-%{release} +Provides: golang(%{import_path}/publicsuffix) = %{version}-%{release} +Provides: golang(%{import_path}/spdy) = %{version}-%{release} +Provides: golang(%{import_path}/websocket) = %{version}-%{release} %description devel %{summary} @@ -40,69 +53,46 @@ Provides: golang(%{import_path}/websocket) = %{version}-%{release} This package contains library source intended for building other packages which use the supplementary Go networking libraries. - %prep -%setup -n net.go-%{shortrev} -cp html/testdata/webkit/README README-webkit +%setup -qn net.go-%{shortrev} %build %install -install -d %{buildroot}/%{gopath}/src/%{import_path} -for d in dict html idna ipv4 ipv6 proxy publicsuffix spdy websocket; do - cp -av $d %{buildroot}/%{gopath}/src/%{import_path}/ +install -dp %{buildroot}/%{gopath}/src/%{import_path} +for dir in */ ; do + cp -rpav $dir %{buildroot}/%{gopath}/src/%{import_path}/ done %check -GOPATH=%{buildroot}/%{gopath} go test %{import_path}/html -GOPATH=%{buildroot}/%{gopath} go test %{import_path}/html/atom -GOPATH=%{buildroot}/%{gopath} go test %{import_path}/idna -GOPATH=%{buildroot}/%{gopath} go test %{import_path}/ipv4 -GOPATH=%{buildroot}/%{gopath} go test %{import_path}/ipv6 || : -GOPATH=%{buildroot}/%{gopath} go test %{import_path}/proxy -GOPATH=%{buildroot}/%{gopath} go test %{import_path}/publicsuffix -GOPATH=%{buildroot}/%{gopath} go test %{import_path}/spdy -GOPATH=%{buildroot}/%{gopath} go test %{import_path}/websocket +for dir in $(find . -mindepth 0 -maxdepth 3 -type d); do + if [ $(find $dir -maxdepth 1 -name *_test.go | wc -l) != '0' ]; then + 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 %files devel -%defattr(-,root,root,-) %doc AUTHORS CONTRIBUTORS LICENSE PATENTS README -%doc README-webkit -%dir %attr(755,root,root) %{gopath} -%dir %attr(755,root,root) %{gopath}/src -%dir %attr(755,root,root) %{gopath}/src/code.google.com -%dir %attr(755,root,root) %{gopath}/src/code.google.com/p -%dir %attr(755,root,root) %{gopath}/src/%{import_path} -%dir %attr(755,root,root) %{gopath}/src/%{import_path}/dict -%dir %attr(755,root,root) %{gopath}/src/%{import_path}/html -%dir %attr(755,root,root) %{gopath}/src/%{import_path}/html/atom -%dir %attr(755,root,root) %{gopath}/src/%{import_path}/html/testdata -%dir %attr(755,root,root) %{gopath}/src/%{import_path}/html/testdata/webkit -%dir %attr(755,root,root) %{gopath}/src/%{import_path}/html/testdata/webkit/scripted -%dir %attr(755,root,root) %{gopath}/src/%{import_path}/idna -%dir %attr(755,root,root) %{gopath}/src/%{import_path}/ipv4 -%dir %attr(755,root,root) %{gopath}/src/%{import_path}/ipv6 -%dir %attr(755,root,root) %{gopath}/src/%{import_path}/proxy -%dir %attr(755,root,root) %{gopath}/src/%{import_path}/publicsuffix -%dir %attr(755,root,root) %{gopath}/src/%{import_path}/spdy -%dir %attr(755,root,root) %{gopath}/src/%{import_path}/websocket -%{gopath}/src/%{import_path}/dict/*.go -%{gopath}/src/%{import_path}/html/*.go -%{gopath}/src/%{import_path}/html/atom/*.go -%{gopath}/src/%{import_path}/html/testdata/*.html -%{gopath}/src/%{import_path}/html/testdata/webkit/*.dat -%{gopath}/src/%{import_path}/html/testdata/webkit/README -%{gopath}/src/%{import_path}/html/testdata/webkit/scripted/*.dat -%{gopath}/src/%{import_path}/idna/*.go -%{gopath}/src/%{import_path}/ipv4/*.go -%{gopath}/src/%{import_path}/ipv6/*.go -%{gopath}/src/%{import_path}/proxy/*.go -%{gopath}/src/%{import_path}/publicsuffix/*.go -%{gopath}/src/%{import_path}/spdy/*.go -%{gopath}/src/%{import_path}/websocket/*.go +%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 %changelog +* Mon Sep 29 2014 Lokesh Mandvekar - 0-0.16.hg90e232e2462d +- Resolves: rhbz#1147193 - update to latest upstream revision + 90e232e2462dedc03bf3c93358da62d54d55dfb6 +- don't redefine gopath, don't own dirs owned by golang +- use golang >= 1.2.1-3 for golang specific rpm macros +- preserve timestamps of copied files +- br stuff from golang-googlecode-text + * Fri Jul 11 2014 Vincent Batts - 0-0.15.hg84a4013f96e0 - don't fail on ipv6 test bz1056185 diff --git a/sources b/sources index 255843b..553600a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6f88f58a1638d08878e5b6e085aa947e 84a4013f96e01fdd14b65d260a78b543e3702ee1.zip +81b9462a7e6052c0f01772a3738dd49d 90e232e2462dedc03bf3c93358da62d54d55dfb6.tar.gz