[golang-github-gorilla-context] archives not installed anymore

Lokesh Mandvekar lsm5 at fedoraproject.org
Sun Sep 22 05:34:02 UTC 2013


commit 4e5c94511000bf2d391724c4cc11e3a3502ff991
Author: Lokesh Mandvekar <lsm5 at redhat.com>
Date:   Sun Sep 22 00:33:50 2013 -0500

    archives not installed anymore
    
    Signed-off-by: Lokesh Mandvekar <lsm5 at redhat.com>

 golang-github-gorilla-context.spec |   70 ++++++++++++++++-------------------
 1 files changed, 32 insertions(+), 38 deletions(-)
---
diff --git a/golang-github-gorilla-context.spec b/golang-github-gorilla-context.spec
index 153b626..3d6f3db 100644
--- a/golang-github-gorilla-context.spec
+++ b/golang-github-gorilla-context.spec
@@ -1,18 +1,16 @@
-%global debug_package   %{nil} 
-%global pkgname         github-gorilla-context
 %global import_path     github.com/gorilla/context
-%global goroot          %(go env GOROOT)
-%global pkgarch         %(go env GOOS)_%(go env GOARCH)
+%global gopath          %{_datadir}/gocode
 %global commit          708054d61e5a2918b9f4e9700000ee611dcf03f5
 %global shortcommit     %(c=%{commit}; echo ${c:0:7})
 
-Name:           golang-%{pkgname}
+Name:           golang-github-gorilla-context
 Version:        0
-Release:        0.14.git%{shortcommit}%{?dist}
+Release:        0.15.git%{shortcommit}%{?dist}
 Summary:        A golang registry for global request variables
 License:        BSD
 URL:            http://www.gorillatoolkit.org/pkg/context
 Source0:        https://%{import_path}/archive/%{commit}/context-%{shortcommit}.tar.gz
+BuildArch:      noarch
 
 %description
 Package gorilla/context stores values shared during a request lifetime.
@@ -20,59 +18,55 @@ Package gorilla/context stores values shared during a request lifetime.
 For example, a router can set variables extracted from the URL and later
 application handlers can access those values, or it can be used to store
 sessions values to be saved at the end of a request. There are several
-others common uses.
+other common uses.
 
 %package devel
-BuildRequires:  golang
 Requires:       golang
 Summary:        A golang registry for global request variables
 Provides:       golang("%{import_path}") = %{version}-%{release}
 
+
 %description devel
-%{summary}
+Package gorilla/context stores values shared during a request lifetime.
+
+For example, a router can set variables extracted from the URL and later
+application handlers can access those values, or it can be used to store
+sessions values to be saved at the end of a request. There are several
+other common uses.
+
+This package contains library source intended for building other packages
+which use gorilla/context.
+
 
 %prep
-%setup -c
-mkdir -p src/%{import_path}
-cp -R context-%{commit}/* src/%{import_path}
+%setup -n context-%{commit}
 
 %build
-unset GOROOT GOPATH GOOS GOARCH
-if [ ! -d %{goroot}/src/pkg/%{import_path} ]; then
-    GOPATH=$(readlink -f .) go install %{import_path}
-else
-    GOPATH=$(readlink -f .)
-    pushd $GOPATH/src
-    for dir in $(find %{import_path} -type d) ; do
-        mkdir -p $GOPATH/pkg/%{pkgarch}/$(dirname $dir)
-        go build -o $GOPATH/pkg/%{pkgarch}/${dir}.a %{import_path}
-    done
-    popd
-fi
 
 %install
-mkdir -p %{buildroot}/%{goroot}/src/pkg/%{import_path}
-cp -a src/%{import_path}/*.go %{buildroot}/%{goroot}/src/pkg/%{import_path}
-mkdir -p %{buildroot}/%{goroot}/pkg/
-cp -a pkg/* %{buildroot}/%{goroot}/pkg/
+install -d %{buildroot}/%{gopath}/src/%{import_path}
+cp -av *.go %{buildroot}/%{gopath}/src/%{import_path}
+
 
 %files devel
 %defattr(-,root,root,-)
-%doc src/%{import_path}/LICENSE src/%{import_path}/README.md
-%dir %attr(755,root,root) %{goroot}/src/pkg/github.com/
-%dir %attr(755,root,root) %{goroot}/src/pkg/github.com/gorilla/
-%dir %attr(755,root,root) %{goroot}/src/pkg/%{import_path}
-%{goroot}/src/pkg/%{import_path}/context.go
-%{goroot}/src/pkg/%{import_path}/context_test.go
-%{goroot}/src/pkg/%{import_path}/doc.go
-%dir %attr(755,root,root) %{goroot}/pkg/%{pkgarch}/github.com/
-%dir %attr(755,root,root) %{goroot}/pkg/%{pkgarch}/github.com/gorilla/
-%{goroot}/pkg/%{pkgarch}/%{import_path}.a
+%doc LICENSE README.md
+%dir %attr(755,root,root) %{gopath}
+%dir %attr(755,root,root) %{gopath}/src
+%dir %attr(755,root,root) %{gopath}/src/github.com
+%dir %attr(755,root,root) %{gopath}/src/github.com/gorilla
+%dir %attr(755,root,root) %{gopath}/src/github.com/gorilla/context
+%{gopath}/src/%{import_path}/*.go
+
 
 %changelog
+* Sun Sep 22 2013 Matthew Miller <mattdm at fedoraproject.org> 0-0.15.git708054d
+- install just the source code for devel package
+
 * Tue Sep 17 2013 Lokesh Mandvekar <lsm5 at redhat.com> 0-0.14.git708054d
 - docdir unversioned
 
+
 * Tue Sep 17 2013 Lokesh Mandvekar <lsm5 at redhat.com> 0-0.13.git708054d
 - Version format changed
 


More information about the scm-commits mailing list