[golang-github-gorilla-mux] pkg archives no longer installed

Lokesh Mandvekar lsm5 at fedoraproject.org
Sun Sep 22 05:42:26 UTC 2013


commit 922e0c7cd44c1d9e4bd64a11dd31e8bb431e3ced
Author: Lokesh Mandvekar <lsm5 at redhat.com>
Date:   Sun Sep 22 00:42:04 2013 -0500

    pkg archives no longer installed
    
    Signed-off-by: Lokesh Mandvekar <lsm5 at redhat.com>

 golang-github-gorilla-mux.spec |   70 ++++++++++++++++-----------------------
 1 files changed, 29 insertions(+), 41 deletions(-)
---
diff --git a/golang-github-gorilla-mux.spec b/golang-github-gorilla-mux.spec
index 3283ef2..6997dc5 100644
--- a/golang-github-gorilla-mux.spec
+++ b/golang-github-gorilla-mux.spec
@@ -1,18 +1,16 @@
-%global debug_package   %{nil}
-%global pkgname         github-gorilla-mux
 %global import_path     github.com/gorilla/mux
-%global goroot          %(go env GOROOT)
-%global pkgarch         %(go env GOOS)_%(go env GOARCH)
+%global gopath          %{_datadir}/gocode
 %global commit          e718e932ee606838744df844eb75064959eb74bc
 %global shortcommit     %(c=%{commit}; echo ${c:0:7})
 
-Name:           golang-%{pkgname}
+Name:           golang-github-gorilla-mux
 Version:        0
-Release:        0.5.git%{shortcommit}%{?dist}
+Release:        0.6.git%{shortcommit}%{?dist}
 Summary:        A powerful URL router and dispatcher for golang
 License:        BSD
 URL:            http://www.gorillatoolkit.org/pkg/mux
 Source0:        https://github.com/gorilla/mux/archive/%{commit}/mux-%{shortcommit}.tar.gz
+BuildArch:      noarch
 
 %description
 Package gorilla/mux implements a request router and dispatcher.
@@ -23,57 +21,47 @@ registered routes and calls a handler for the route that matches the URL or
 other conditions.
 
 %package devel
-BuildRequires:  golang("github.com/gorilla/context")
+Requires:       golang
 Requires:       golang("github.com/gorilla/context")
 Summary:        A powerful URL router and dispatcher for golang
 Provides:       golang("%{import_path}") = %{version}-%{release}
 
 %description devel
-%{summary}
+Package gorilla/mux implements a request router and dispatcher.
+
+The name mux stands for "HTTP request multiplexer". Like the standard
+http.ServeMux, mux.Router matches incoming requests against a list of
+registered routes and calls a handler for the route that matches the URL or
+other conditions.
+
+This package contains library source intended for building other packages
+which use gorilla/mux.
+
 
 %prep
-%setup -c
-mkdir -p src/$(dirname %{import_path})
-cp -R mux-%{commit} src/%{import_path}
+%setup -n %setup -n mux-%{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}/bench_test.go
-%{goroot}/src/pkg/%{import_path}/doc.go
-%{goroot}/src/pkg/%{import_path}/mux.go
-%{goroot}/src/pkg/%{import_path}/mux_test.go
-%{goroot}/src/pkg/%{import_path}/old_test.go
-%{goroot}/src/pkg/%{import_path}/regexp.go
-%{goroot}/src/pkg/%{import_path}/route.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/mux
+%{gopath}/src/%{import_path}/*.go
 
 %changelog
+* Sun Sep 22 2013 Matthew Miller <mattdm at fedoraproject.org> 0-0.6.gite718e93
+- install just the source code for devel package
+
 * Tue Sep 17 2013 Lokesh Mandvekar <lsm5 at redhat.com> 0-0.5.gite718e93
 - Version format changed
 - docdir changed


More information about the scm-commits mailing list