[golang-github-emicklei-go-restful/f20] First package for Fedora - resolves: #1164152

Jan Chaloupka jchaloup at fedoraproject.org
Thu Nov 20 15:43:14 UTC 2014


commit 89062dd0687e815f4f6618d6af4d20d64a44cceb
Author: Jan Chaloupka <jchaloup at redhat.com>
Date:   Thu Nov 20 16:22:17 2014 +0100

    First package for Fedora
    - resolves: #1164152

 .gitignore                             |    1 +
 golang-github-emicklei-go-restful.spec |   69 ++++++++++++++++++++++++++++++++
 sources                                |    1 +
 3 files changed, 71 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..2f32626 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/go-restful-ad99b12.tar.gz
diff --git a/golang-github-emicklei-go-restful.spec b/golang-github-emicklei-go-restful.spec
new file mode 100644
index 0000000..280310a
--- /dev/null
+++ b/golang-github-emicklei-go-restful.spec
@@ -0,0 +1,69 @@
+%global debug_package   %{nil}
+%global provider        github
+%global provider_tld    com
+%global project         emicklei
+%global repo            go-restful
+%global import_path     %{provider}.%{provider_tld}/%{project}/%{repo}
+%global commit          ad99b12d8d5917a59c03085cbeae1af8d2fc275a
+%global shortcommit     %(c=%{commit}; echo ${c:0:7})
+
+Name:           golang-%{provider}-%{project}-%{repo}
+Version:        0
+Release:        0.1.git%{shortcommit}%{?dist}
+Summary:        Package for building REST-style Web Services using Google Go
+License:        MIT
+URL:            https://%{import_path}
+Source0:        https://%{import_path}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
+%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
+# these are needed only for examples folder so far
+#BuildRequires:  golang(github.com/gorilla/schema)
+#BuildRequires:  golang(github.com/mjibson/appstats)
+Requires:       golang >= 1.2.1-3
+#Requires:       golang(github.com/gorilla/schema)
+#Requires:       golang(github.com/mjibson/appstats)
+Summary:        %{summary}
+Provides:       golang(%{import_path}) = %{version}-%{release}
+Provides:       golang(%{import_path}/swagger) = %{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}/
+cp -rpav swagger %{buildroot}/%{gopath}/src/%{import_path}/
+cp -rpav examples %{buildroot}/%{gopath}/src/%{import_path}/
+
+%check
+GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}
+# swagger fails
+#GOPATH={buildroot}/{gopath}:{gopath} go test {import_path}/swagger
+
+%files devel
+%doc CHANGES.md README.md LICENSE
+%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project}
+%{gopath}/src/%{import_path}
+
+%changelog
+* Fri Nov 14 2014 jchaloup <jchaloup at redhat.com> - 0-0.1.gitad99b12
+- First package for Fedora
+  resolves: #1164152
+
diff --git a/sources b/sources
index e69de29..d3a7211 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+d22e196df9928632a554b82c87e87fda  go-restful-ad99b12.tar.gz


More information about the scm-commits mailing list