commit 69cfc9ff6382ae07fbe7e38844b3f814320b66c2 Author: Jan Chaloupka jchaloup@redhat.com Date: Fri Nov 21 09:51:59 2014 +0100
First package for Fedora - resolves: #1164170
.gitignore | 1 + golang-github-vishvananda-netns.spec | 60 ++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 62 insertions(+), 0 deletions(-) --- diff --git a/.gitignore b/.gitignore index e69de29..82d0f73 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/netns-e14a2d4.tar.gz diff --git a/golang-github-vishvananda-netns.spec b/golang-github-vishvananda-netns.spec new file mode 100644 index 0000000..f7bfc0b --- /dev/null +++ b/golang-github-vishvananda-netns.spec @@ -0,0 +1,60 @@ +%global debug_package %{nil} +%global provider github +%global provider_tld com +%global project vishvananda +%global repo netns +%global import_path %{provider}.%{provider_tld}/%{project}/%{repo} +%global commit e14a2d4e90ae568a5a78b248da5579f289e25925 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +Name: golang-%{provider}-%{project}-%{repo} +Version: 0 +Release: 0.1.git%{shortcommit}%{?dist} +Summary: Simple network namespace handling for go +License: ASL 2.0 +URL: https://%%7Bimport_path%7D +Source0: https://%%7Bimport_path%7D/archive/%%7Bcommit%7D/%%7Brepo%7D-%%7Bshortcommit... +%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 +BuildArch: noarch +%else +ExclusiveArch: %{ix86} x86_64 %{arm} +%endif + +%description +%{summary} + +%package devel +BuildRequires: golang >= 1.2.1-3 +Requires: golang >= 1.2.1-3 +Summary: %{summary} +Provides: golang(%{import_path}) = %{version}-%{release} + +%description devel +%{summary} + +This package contains library source intended for +building other packages which use %{project}/%{repo}. + +%prep +%setup -q -n %{repo}-%{commit} + +%build + +%install +install -d -p %{buildroot}/%{gopath}/src/%{import_path}/ +cp -pav *.go %{buildroot}/%{gopath}/src/%{import_path}/ + +%check +# test fails because: netns_linux.go: New creates a new network namespace and returns a handle to it. +#GOPATH={buildroot}/{gopath}:{gopath} go test {import_path} + +%files devel +%doc README.md LICENSE +%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project} +%{gopath}/src/%{import_path} + +%changelog +* Fri Nov 14 2014 jchaloup jchaloup@redhat.com - 0-0.1.gite14a2d4 +- First package for Fedora + resolves: #1164170 + diff --git a/sources b/sources index e69de29..f661ef9 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +99bc0f7b1a764972b1f2b0aa6f35dc9d netns-e14a2d4.tar.gz
golang@lists.fedoraproject.org