forked from serbaut/go-rpm-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
go-tools.spec
43 lines (35 loc) · 1.2 KB
/
go-tools.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Name: go-tools
Version: 1.2
Release: 2%{?dist}
Summary: Go development tools
Group: Development/Languages
License: BSD
URL: http://golang.org
Source: https://tools.go.googlecode.com
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: go >= %{version}
AutoReqProv: no
Requires: go >= %{version}
%define __spec_install_post %{nil}
%define tooldir %{_libdir}/go/pkg/tool/linux_amd64
%description
This package includes additional go development tools.
%prep
export GOPATH=$(pwd)/go-tools
go get -d code.google.com/p/go.tools/cmd/godoc code.google.com/p/go.tools/cmd/cover
%build
export GOPATH=$(pwd)/go-tools
(cd go-tools/src/code.google.com/p/go.tools/cmd/godoc && go build)
(cd go-tools/src/code.google.com/p/go.tools/cmd/cover && go build)
%install
rm -rf %{buildroot}
install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{tooldir}
install go-tools/src/code.google.com/p/go.tools/cmd/godoc/godoc %{buildroot}%{_bindir}
install go-tools/src/code.google.com/p/go.tools/cmd/cover/cover %{buildroot}%{tooldir}
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_bindir}/godoc
%{tooldir}/cover