]> git.pld-linux.org Git - packages/golang.git/blame - golang.spec
- pl
[packages/golang.git] / golang.spec
CommitLineData
602caf80
ER
1# TODO
2# - allow disabling tests (currently bcond exists just for showing which are test deps)
30cbf052
ER
3# - add verbose build output (currently dummy bcond)
4# - setup GOMAXPROCS=2 from _smp_mflags
602caf80
ER
5
6# Conditional build:
7%bcond_without tests # build without tests
30cbf052 8%bcond_without verbose # verbose build (V=1)
602caf80 9
2ecef135 10Summary: Go compiler and tools
78dbb97f 11Summary(pl.UTF-8): Kompilator języka Go i narzędzia
2ecef135
PG
12Name: golang
13Version: 1.0.3
14Release: 0.1
15License: BSD
16Group: Development/Languages
2ecef135 17Source0: http://go.googlecode.com/files/go%{version}.src.tar.gz
510be9c2 18# Source0-md5: 31acddba58b4592242a3c3c16165866b
78dbb97f 19URL: http://golang.org/
2ecef135
PG
20BuildRequires: bison
21BuildRequires: ed
30cbf052 22BuildRequires: rpm-pythonprov
602caf80
ER
23%if %{with tests}
24BuildRequires: hostname
25%endif
2ecef135
PG
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
2502d5f0
ER
28%define _enable_debug_packages 0
29%define no_install_post_strip 1
30%define no_install_post_chrpath 1
31%define _noautoreqfiles %{_libdir}/%{name}/src
32
33%define _vimdatadir %{_datadir}/vim
34
35%ifarch %{ix86}
36%define GOARCH 386
37%endif
38%ifarch %{x8664}
39%define GOARCH amd64
40%endif
41
2ecef135 42%description
510be9c2
PG
43Go is an open source programming environment that makes it easy to
44build simple, reliable, and efficient software.
2ecef135 45
78dbb97f
JB
46%description -l pl.UTF-8
47Go to mające otwarte źródła środowisko do programowania, pozwalające
48na łatwe tworzenie prostych, pewnych i wydajnych programów.
49
2502d5f0 50%package -n vim-syntax-%{name}
78dbb97f
JB
51Summary: Go syntax files for Vim
52Summary(pl.UTF-8): Pliki składni Go dla Vima
2ecef135
PG
53Group: Applications/Editors
54Requires: %{name} = %{version}-%{release}
2502d5f0
ER
55Requires: vim-rt >= 4:7.2.170
56%if "%{_rpmversion}" >= "5"
57BuildArch: noarch
58%endif
2ecef135 59
2502d5f0 60%description -n vim-syntax-%{name}
2ecef135
PG
61Go syntax files for vim.
62
78dbb97f
JB
63%description -n vim-syntax-%{name} -l pl.UTF-8
64Pliki składni Go dla Vima.
65
2502d5f0 66%package -n emacs-%{name}
78dbb97f
JB
67Summary: Go mode for Emacs
68Summary(pl.UTF-8): Tryb Go dla Emacsa
2ecef135 69Group: Applications/Editors
2502d5f0
ER
70%if "%{_rpmversion}" >= "5"
71BuildArch: noarch
72%endif
2ecef135 73
2502d5f0 74%description -n emacs-%{name}
2ecef135
PG
75Go mode for Emacs.
76
78dbb97f
JB
77%description -n emacs-%{name} -l pl.UTF-8
78Tryb Go dla Emacsa.
79
2ecef135
PG
80%prep
81%setup -q -n go
82
30cbf052 83# broken tests
78dbb97f 84%{__rm} src/pkg/net/multicast_test.go
30cbf052 85
2ecef135 86%build
2502d5f0
ER
87GOSRC=$(pwd)
88GOROOT=$(pwd)
2ecef135
PG
89GOROOT_FINAL=%{_libdir}/%{name}
90
91GOOS=linux
2502d5f0
ER
92GOBIN=$GOROOT/bin
93GOARCH=%{GOARCH}
2ecef135 94export GOARCH GOROOT GOOS GOBIN GOROOT_FINAL
2502d5f0 95export MAKE="%{__make}"
2ecef135 96
2502d5f0 97install -d "$GOBIN"
2ecef135
PG
98cd src
99
100LC_ALL=C PATH="$PATH:$GOBIN" ./all.bash
101
102%install
103rm -rf $RPM_BUILD_ROOT
2502d5f0 104GOROOT=$RPM_BUILD_ROOT%{_libdir}/%{name}
2ecef135
PG
105
106install -d $GOROOT/{misc,lib,src}
107install -d $RPM_BUILD_ROOT%{_bindir}
108
109cp -a pkg include lib bin $GOROOT
110cp -a src/pkg src/cmd $GOROOT/src
111cp -a misc/cgo $GOROOT/misc
112
113ln -sf %{_libdir}/%{name}/bin/go $RPM_BUILD_ROOT%{_bindir}/go
114ln -sf %{_libdir}/%{name}/bin/godoc $RPM_BUILD_ROOT%{_bindir}/godoc
115ln -sf %{_libdir}/%{name}/bin/gofmt $RPM_BUILD_ROOT%{_bindir}/gofmt
116
117ln -sf %{_libdir}/%{name}/pkg/tool/linux_%{GOARCH}/cgo $RPM_BUILD_ROOT%{_bindir}/cgo
118ln -sf %{_libdir}/%{name}/pkg/tool/linux_%{GOARCH}/ebnflint $RPM_BUILD_ROOT%{_bindir}/ebnflint
119
120%ifarch %{ix86}
121tools="8a 8c 8g 8l"
122%else
123tools="6a 6c 6g 6l"
124%endif
510be9c2 125for tool in $tools; do
2502d5f0 126 ln -sf %{_libdir}/%{name}/pkg/tool/linux_%{GOARCH}/$tool $RPM_BUILD_ROOT%{_bindir}/$tool
2ecef135
PG
127done
128
129install -d $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp
2502d5f0 130cp -p misc/emacs/go*.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/
2ecef135
PG
131
132VIMFILES="syntax/go.vim ftdetect/gofiletype.vim ftplugin/go/fmt.vim ftplugin/go/import.vim indent/go.vim"
133for i in $VIMFILES; do
b87ab065 134 install -Dp misc/vim/$i $RPM_BUILD_ROOT%{_vimdatadir}/$i
2ecef135
PG
135done
136
2ecef135
PG
137%clean
138rm -rf $RPM_BUILD_ROOT
139
140%files
141%defattr(644,root,root,755)
142%doc AUTHORS CONTRIBUTORS LICENSE README doc/*
510be9c2 143%attr(755,root,root) %{_bindir}/*
2ecef135
PG
144%dir %{_libdir}/%{name}
145%dir %{_libdir}/%{name}/bin
146%attr(755,root,root) %{_libdir}/%{name}/bin/*
147
148%{_libdir}/%{name}/include
149%{_libdir}/%{name}/lib
150%{_libdir}/%{name}/misc
151%{_libdir}/%{name}/src
152%dir %{_libdir}/%{name}/pkg
153%{_libdir}/%{name}/pkg/linux_%{GOARCH}
154%{_libdir}/%{name}/pkg/obj
155%dir %{_libdir}/%{name}/pkg/tool
156%dir %{_libdir}/%{name}/pkg/tool/linux_%{GOARCH}
157%attr(755,root,root) %{_libdir}/%{name}/pkg/tool/linux_%{GOARCH}/*
158
2c8cd7b5 159%files -n vim-syntax-%{name}
2ecef135 160%defattr(644,root,root,755)
b87ab065
ER
161%{_vimdatadir}/ftdetect/gofiletype.vim
162%{_vimdatadir}/ftplugin/go
163%{_vimdatadir}/indent/go.vim
164%{_vimdatadir}/syntax/go.vim
2ecef135 165
2502d5f0 166%files -n emacs-%{name}
2ecef135
PG
167%defattr(644,root,root,755)
168%{_datadir}/emacs/site-lisp/go-mode*.el
This page took 0.086847 seconds and 4 git commands to generate.