Blame golang-googlecode-net.spec

ff3b7b7
%if 0%{?fedora}
ff3b7b7
%global with_devel 1
ff3b7b7
%global with_bundled 0
ff3b7b7
%global with_debug 1
ff3b7b7
%global with_check 1
ff3b7b7
%else
ff3b7b7
%global with_devel 0
ff3b7b7
%global with_bundled 1
ff3b7b7
%global with_debug 0
ff3b7b7
%global with_check 0
ff3b7b7
%endif
ff3b7b7
ff3b7b7
%if 0%{?with_debug}
ff3b7b7
# https://bugzilla.redhat.com/show_bug.cgi?id=995136#c12
ff3b7b7
%global _dwz_low_mem_die_limit 0
ff3b7b7
%else
8a1dd91
%global debug_package   %{nil}
ff3b7b7
%endif
8a1dd91
%global provider_tld    com
ab022d1
%global provider        github
ab022d1
%global project         golang
8a1dd91
%global repo            net
ab022d1
%global import_path     code.google.com/p/go.net
ff3b7b7
%global commit          446d52dd4018303a13b36097e26d0888aca5d6ef
ab022d1
%global shortcommit     %(c=%{commit}; echo ${c:0:7})
4b66dc7
8e7b9a8
%global x_provider      golang
8e7b9a8
%global x_provider_tld  org
8e7b9a8
%global x_repo          net
8e7b9a8
%global x_import_path   %{x_provider}.%{x_provider_tld}/x/%{x_repo}
8e7b9a8
%global x_name          golang-%{x_provider}%{x_provider_tld}-%{repo}
8e7b9a8
b5ee3d9
%global devel_main      golang-golangorg-net-devel
b5ee3d9
%global devel_prefix    x
b5ee3d9
ab022d1
Name:       golang-googlecode-net
8a1dd91
Version:    0
ff3b7b7
Release:    0.23.git%{shortcommit}%{?dist}
8a1dd91
Summary:    Supplementary Go networking libraries
8a1dd91
License:    BSD
8a1dd91
URL:        http://%{import_path}
ab022d1
Source0:    https://github.com/%{project}/%{repo}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
ab022d1
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
ab022d1
BuildArch:      noarch
ab022d1
%else
ab022d1
ExclusiveArch:  %{ix86} x86_64 %{arm}
ab022d1
%endif
4b66dc7
4b66dc7
%description
4b66dc7
%{summary}
4b66dc7
ff3b7b7
%if 0%{?with_devel}
4b66dc7
%package devel
8a1dd91
BuildRequires:  golang >= 1.2.1-3
8a1dd91
BuildRequires:  golang(code.google.com/p/go.text/encoding)
8a1dd91
BuildRequires:  golang(code.google.com/p/go.text/encoding/charmap)
8a1dd91
BuildRequires:  golang(code.google.com/p/go.text/encoding/japanese)
8a1dd91
BuildRequires:  golang(code.google.com/p/go.text/encoding/korean)
8a1dd91
BuildRequires:  golang(code.google.com/p/go.text/encoding/simplifiedchinese)
8a1dd91
BuildRequires:  golang(code.google.com/p/go.text/encoding/traditionalchinese)
8a1dd91
BuildRequires:  golang(code.google.com/p/go.text/encoding/unicode)
8a1dd91
BuildRequires:  golang(code.google.com/p/go.text/transform)
b5ee3d9
Requires:  golang(code.google.com/p/go.text/encoding)
b5ee3d9
Requires:  golang(code.google.com/p/go.text/encoding/charmap)
b5ee3d9
Requires:  golang(code.google.com/p/go.text/encoding/japanese)
b5ee3d9
Requires:  golang(code.google.com/p/go.text/encoding/korean)
b5ee3d9
Requires:  golang(code.google.com/p/go.text/encoding/simplifiedchinese)
b5ee3d9
Requires:  golang(code.google.com/p/go.text/encoding/traditionalchinese)
b5ee3d9
Requires:  golang(code.google.com/p/go.text/encoding/unicode)
b5ee3d9
Requires:  golang(code.google.com/p/go.text/transform)
8e7b9a8
Summary:    Supplementary Go networking libraries for code.google.com/p/ imports
8a1dd91
Provides:   golang(%{import_path}/context) = %{version}-%{release}
8a1dd91
Provides:   golang(%{import_path}/dict) = %{version}-%{release}
8a1dd91
Provides:   golang(%{import_path}/html) = %{version}-%{release}
8a1dd91
Provides:   golang(%{import_path}/html/atom) = %{version}-%{release}
8a1dd91
Provides:   golang(%{import_path}/html/charset) = %{version}-%{release}
b5ee3d9
Provides:   golang(%{import_path}/icmp) = %{version}-%{release}
8a1dd91
Provides:   golang(%{import_path}/idna) = %{version}-%{release}
8a1dd91
Provides:   golang(%{import_path}/internal/iana) = %{version}-%{release}
b5ee3d9
Provides:   golang(%{import_path}/internal/nettest) = %{version}-%{release}
ff3b7b7
Provides:   golang(%{import_path}/internal/timeseries) = %{version}-%{release}
8a1dd91
Provides:   golang(%{import_path}/ipv4) = %{version}-%{release}
8a1dd91
Provides:   golang(%{import_path}/ipv6) = %{version}-%{release}
b5ee3d9
Provides:   golang(%{import_path}/netutil) = %{version}-%{release}
8a1dd91
Provides:   golang(%{import_path}/proxy) = %{version}-%{release}
8a1dd91
Provides:   golang(%{import_path}/publicsuffix) = %{version}-%{release}
ff3b7b7
Provides:   golang(%{import_path}/trace) = %{version}-%{release}
b5ee3d9
Provides:   golang(%{import_path}/webdav) = %{version}-%{release}
8a1dd91
Provides:   golang(%{import_path}/websocket) = %{version}-%{release}
4b66dc7
8e7b9a8
%package -n %{x_name}-devel
8e7b9a8
BuildRequires:  golang >= 1.2.1-3
8e7b9a8
BuildRequires:  golang(golang.org/x/text/encoding)
8e7b9a8
BuildRequires:  golang(golang.org/x/text/encoding/charmap)
8e7b9a8
BuildRequires:  golang(golang.org/x/text/encoding/japanese)
8e7b9a8
BuildRequires:  golang(golang.org/x/text/encoding/korean)
8e7b9a8
BuildRequires:  golang(golang.org/x/text/encoding/simplifiedchinese)
8e7b9a8
BuildRequires:  golang(golang.org/x/text/encoding/traditionalchinese)
8e7b9a8
BuildRequires:  golang(golang.org/x/text/encoding/unicode)
8e7b9a8
BuildRequires:  golang(golang.org/x/text/transform)
b5ee3d9
Requires:  golang(golang.org/x/text/encoding)
b5ee3d9
Requires:  golang(golang.org/x/text/encoding/charmap)
b5ee3d9
Requires:  golang(golang.org/x/text/encoding/japanese)
b5ee3d9
Requires:  golang(golang.org/x/text/encoding/korean)
b5ee3d9
Requires:  golang(golang.org/x/text/encoding/simplifiedchinese)
b5ee3d9
Requires:  golang(golang.org/x/text/encoding/traditionalchinese)
b5ee3d9
Requires:  golang(golang.org/x/text/encoding/unicode)
b5ee3d9
Requires:  golang(golang.org/x/text/transform)
b5ee3d9
8e7b9a8
Summary:    Supplementary Go networking libraries for golang.org/x/ imports
8e7b9a8
Provides:   golang(%{x_import_path}/context) = %{version}-%{release}
8e7b9a8
Provides:   golang(%{x_import_path}/dict) = %{version}-%{release}
8e7b9a8
Provides:   golang(%{x_import_path}/html) = %{version}-%{release}
8e7b9a8
Provides:   golang(%{x_import_path}/html/atom) = %{version}-%{release}
8e7b9a8
Provides:   golang(%{x_import_path}/html/charset) = %{version}-%{release}
b5ee3d9
Provides:   golang(%{x_import_path}/icmp) = %{version}-%{release}
8e7b9a8
Provides:   golang(%{x_import_path}/idna) = %{version}-%{release}
8e7b9a8
Provides:   golang(%{x_import_path}/internal/iana) = %{version}-%{release}
b5ee3d9
Provides:   golang(%{x_import_path}/internal/nettest) = %{version}-%{release}
ff3b7b7
Provides:   golang(%{x_import_path}/internal/timeseries) = %{version}-%{release}
8e7b9a8
Provides:   golang(%{x_import_path}/ipv4) = %{version}-%{release}
8e7b9a8
Provides:   golang(%{x_import_path}/ipv6) = %{version}-%{release}
b5ee3d9
Provides:   golang(%{x_import_path}/netutil) = %{version}-%{release}
8e7b9a8
Provides:   golang(%{x_import_path}/proxy) = %{version}-%{release}
8e7b9a8
Provides:   golang(%{x_import_path}/publicsuffix) = %{version}-%{release}
ff3b7b7
Provides:   golang(%{x_import_path}/trace) = %{version}-%{release}
b5ee3d9
Provides:   golang(%{x_import_path}/webdav) = %{version}-%{release}
8e7b9a8
Provides:   golang(%{x_import_path}/websocket) = %{version}-%{release}
8e7b9a8
4b66dc7
%description devel
4b66dc7
%{summary}
4b66dc7
bc4883d
This package contains library source intended for building other packages
8e7b9a8
which use the supplementary Go networking libraries with code.google.com/p/ imports.
8e7b9a8
8e7b9a8
%description -n %{x_name}-devel
8e7b9a8
8e7b9a8
This package contains library source intended for building other packages
8e7b9a8
which use the supplementary Go text libraries with golang.org/x/ imports.
ff3b7b7
%endif
bc4883d
4b66dc7
%prep
bc4883d
ab022d1
%setup -q -n %{repo}-%{commit}
4b66dc7
4b66dc7
%build
4b66dc7
4b66dc7
%install
ff3b7b7
%if 0%{?with_devel}
8a1dd91
install -dp %{buildroot}/%{gopath}/src/%{import_path}
8e7b9a8
install -dp %{buildroot}/%{gopath}/src/%{x_import_path}
8a1dd91
for dir in */ ; do
8a1dd91
   cp -rpav $dir %{buildroot}/%{gopath}/src/%{import_path}/
8e7b9a8
   cp -rpav $dir %{buildroot}/%{gopath}/src/%{x_import_path}/
bc4883d
done
4b66dc7
780a70a
cd %{buildroot}/%{gopath}/src/%{import_path}/
780a70a
sed -i 's/"golang\.org\/x\//"code\.google\.com\/p\/go\./g' \
780a70a
        $(find . -name '*.go')
ff3b7b7
%endif
780a70a
f212b2f
%check
ff3b7b7
%if 0%{?with_check}
ff3b7b7
export GOPATH=%{buildroot}%{gopath}:%{gopath}
ff3b7b7
go test %{import_path}/html
ff3b7b7
go test %{import_path}/html/atom
b5ee3d9
%if 0%{?fedora} == 20 || 0%{?fedora} == 21
ff3b7b7
go test %{import_path}/html/charset
b5ee3d9
%endif
ff3b7b7
go test %{import_path}/idna
ff3b7b7
go test %{import_path}/internal/timeseries
ff3b7b7
#go test %{import_path}/ipv4
b5ee3d9
%if 0%{?fedora} == 20 || 0%{?fedora} == 21
ff3b7b7
go test %{import_path}/ipv6
ff3b7b7
%endif
ff3b7b7
go test %{import_path}/netutil
ff3b7b7
go test %{import_path}/proxy
ff3b7b7
go test %{import_path}/publicsuffix
ff3b7b7
go test %{import_path}/trace
ff3b7b7
#go test %{import_path}/webdav
ff3b7b7
go test %{import_path}/websocket
b5ee3d9
%endif
8a1dd91
8a1dd91
rm -rf %{buildroot}%{gopath}/src/%{import_path}/html/testdata
8a1dd91
rm -rf %{buildroot}%{gopath}/src/%{import_path}/html/charset/testdata
8e7b9a8
rm -rf %{buildroot}%{gopath}/src/%{x_import_path}/html/testdata
8e7b9a8
rm -rf %{buildroot}%{gopath}/src/%{x_import_path}/html/charset/testdata
f212b2f
ff3b7b7
%if 0%{?with_devel}
4b66dc7
%files devel
bc4883d
%doc AUTHORS CONTRIBUTORS LICENSE PATENTS README
8e7b9a8
%{gopath}/src/%{import_path}
8e7b9a8
8e7b9a8
%files -n %{x_name}-devel
8e7b9a8
%doc AUTHORS CONTRIBUTORS LICENSE PATENTS README
8e7b9a8
%{gopath}/src/%{x_import_path}
ff3b7b7
%endif
4b66dc7
4b66dc7
%changelog
ff3b7b7
* Thu Jul 23 2015 jchaloup <jchaloup@redhat.com> - 0-0.23.git446d52d
ff3b7b7
- Bump to upstream 446d52dd4018303a13b36097e26d0888aca5d6ef
ff3b7b7
  related: #1230677
ff3b7b7
fa7cabf
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.22.git7dbad50
fa7cabf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
fa7cabf
b5ee3d9
* Thu Jun 11 2015 jchaloup <jchaloup@redhat.com> - 0-0.21.git7dbad50
b5ee3d9
- Bump to 7dbad50ab5b31073856416cdcfeb2796d682f844
b5ee3d9
  resolves: #1230677
b5ee3d9
ab022d1
* Fri Feb 06 2015 jchaloup <jchaloup@redhat.com> - 0-0.20.git71586c3
ab022d1
- Bump to upstream 71586c3cf98f806af322c5a361660eb046e00501
ab022d1
- Repo moved to github, changing spec file header and globals
ab022d1
546ae7f
* Thu Dec 18 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.19.hg937a34c9de13
546ae7f
- Resolves: rhbz#1056185 disable ipv6 test
546ae7f
- also disable html/charset test
546ae7f
780a70a
* Tue Dec 09 2014 jchaloup <jchaloup@redhat.com> - 0-0.18.hg937a34c9de13
780a70a
- Update to the latest commit 937a34c9de13c766c814510f76bca091dee06028
780a70a
  related: #1009967
780a70a
8e7b9a8
* Mon Nov 24 2014 jchaloup <jchaloup@redhat.com> - 0-0.17.hg90e232e2462d
8e7b9a8
- Extend import paths for golang.org/x/
8e7b9a8
- context test failing on master
8e7b9a8
  related: #1009967
8e7b9a8
8a1dd91
* Mon Sep 29 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.16.hg90e232e2462d
8a1dd91
- Resolves: rhbz#1147193 - update to latest upstream revision 
8a1dd91
  90e232e2462dedc03bf3c93358da62d54d55dfb6
8a1dd91
- don't redefine gopath, don't own dirs owned by golang
8a1dd91
- use golang >= 1.2.1-3 for golang specific rpm macros
8a1dd91
- preserve timestamps of copied files
8a1dd91
- br stuff from golang-googlecode-text
8a1dd91
Vincent Batts fe7eaf7
* Fri Jul 11 2014 Vincent Batts <vbatts@fedoraproject.org> - 0-0.15.hg84a4013f96e0
Vincent Batts fe7eaf7
- don't fail on ipv6 test bz1056185
Vincent Batts fe7eaf7
9d51816
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0-0.14.hg84a4013f96e0
9d51816
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
9d51816
f212b2f
* Fri Jan 17 2014 Lokesh Mandvekar <lsm5@redhat.com> 0-0.13.hg84a4013f96e0
f212b2f
- golang exclusivearch for el6+
f212b2f
- add check
f212b2f
4cd6095
* Fri Jan 17 2014 Lokesh Mandvekar <lsm5@redhat.com> 0-0.12.hg84a4013f96e0
4cd6095
- revert golang >= 1.2 version requirement
4cd6095
0237aff
* Wed Jan 15 2014 Lokesh Mandvekar <lsm5@redhat.com> 0-0.11.hg84a4013f96e0
0237aff
- require golang 1.2 and up
0237aff
cc40863
* Wed Oct 16 2013 Lokesh Mandvekar <lsm5@redhat.com> 0-0.10.hg84a4013f96e0
cc40863
- removed double quotes from Provides
cc40863
d255514
* Tue Oct 08 2013 Lokesh Mandvekar <lsm5@redhat.com> 0-0.9.hg84a4013f96e0
d255514
- noarch for f19+ and rhel7+, exclusivearch otherwise
d255514
9355824
* Mon Oct 07 2013 Lokesh Mandvekar <lsm5@redhat.com> 0-0.8.hg84a4013f96e0
9355824
- exclusivearch as per golang package
9355824
- debug_package nil
9355824
bc4883d
* Sun Sep 22 2013 Matthew Miller <mattdm@fedoraproject.org> 0-0.7.hg
bc4883d
- install just the source code for devel package
bc4883d
ce564c4
* Fri Sep 20 2013 Lokesh Mandvekar <lsm5@redhat.com> 0-0.6.hg
ce564c4
- All Provides listed explicitly
ce564c4
4b66dc7
* Fri Sep 20 2013 Lokesh Mandvekar <lsm5@redhat.com> 0-0.5.hg
4b66dc7
- Provides corrected
4b66dc7
4b66dc7
* Fri Sep 20 2013 Lokesh Mandvekar <lsm5@redhat.com> 0-0.4.hg
4b66dc7
- comment cleanup
4b66dc7
- build explanation
4b66dc7
4b66dc7
* Fri Sep 20 2013 Lokesh Mandvekar <lsm5@redhat.com> 0-0.3.hg
4b66dc7
- html/webkit/scripted ownership set
4b66dc7
- codereview.cfg not packaged
4b66dc7
4b66dc7
* Fri Sep 20 2013 Lokesh Mandvekar <lsm5@redhat.com> 0-0.2.hg
4b66dc7
- IPv6 doesn't build
4b66dc7
- Typo correction
4b66dc7
- directory ownership taken care of
4b66dc7
4b66dc7
* Thu Sep 19 2013 Lokesh Mandvekar <lsm5@redhat.com> 0-0.1.hg
4b66dc7
- Initial fedora package