source: projects/specs/trunk/g/golang/golang-vl.spec @ 9157

Revision 9157, 8.4 KB checked in by inagaki, 9 years ago (diff)

2014-12-16 Ryoichi INAGAKI <ryo1@…>

  • golang, python-subprocess32: added Group
  • libquvi: changed Group
  • libquvi-scripts: updated, changed Group
  • pilot-link: added patches


Line 
1# build ids are not currently generated:
2# https://code.google.com/p/go/issues/detail?id=5238
3#
4# also, debuginfo extraction currently fails with
5# "Failed to write file: invalid section alignment"
6%global debug_package %{nil}
7
8# we are shipping the full contents of src in the data subpackage, which
9# contains binary-like things (ELF data for tests, etc)
10%global _binaries_in_noarch_packages_terminate_build 0
11
12# Do not check any files in doc or src for requires
13%global __requires_exclude_from ^(%{_datadir}|%{_libdir})/%{name}/(doc|src)/.*$
14
15# Don't alter timestamps of especially the .a files (or else go will rebuild later)
16# Actually, don't strip at all since we are not even building debug packages and this corrupts the dwarf testdata
17%global __strip /bin/true
18
19# rpmbuild magic to keep from having meta dependency on libc.so.6
20%define _use_internal_dependency_generator 0
21%define __find_requires %{nil}
22%global debug_package %{nil}
23%global __spec_install_post /usr/lib/rpm/check-rpaths   /usr/lib/rpm/check-buildroot  \
24  /usr/lib/rpm/brp-compress
25
26Name:           golang
27Version:        1.2
28Release:        2%{?_dist_release}
29Summary:        The Go Programming Language
30Summary(ja):    プログラミング言語 Go
31
32License:        BSD
33Group:          Development/Languages
34URL:            http://golang.org/
35
36Source0:        https://go.googlecode.com/files/go%{version}.src.tar.gz
37Source100:      golang-gdbinit
38Source101:      golang-prelink.conf
39
40Patch0:         golang-1.2-verbose-build.patch
41# https://bugzilla.redhat.com/show_bug.cgi?id=1038683
42Patch2:         golang-1.2-remove-ECC-p224.patch
43# disable flaky test for now
44# http://code.google.com/p/go/issues/detail?id=6522
45Patch3:         ./golang-1.2-skipCpuProfileTest.patch
46
47BuildRoot:      %{_tmppath}/%{name}-%{version}-root
48# 'hostname' command
49BuildRequires:  net-tools
50
51# We strip the meta dependency, but go does require glibc.
52# This is an odd issue, still looking for a better fix.
53Requires:       glibc
54
55ExclusiveArch:  %{ix86} x86_64
56
57%description
58%{summary}.
59
60
61# Workaround old RPM bug of symlink-replaced-with-dir failure
62%pretrans -p <lua>
63for _,d in pairs({"api", "doc", "include", "lib", "src"}) do
64  path = "%{_libdir}/%{name}/" .. d
65  if posix.stat(path, "type") == "link" then
66    os.remove(path)
67    posix.mkdir(path)
68  end
69end
70
71
72%prep
73%setup -q -n go
74
75# increase verbosity of build
76%patch0 -p1
77
78# remove the P224 curve
79%patch2 -p1
80
81# skip flaky test
82%patch3 -p1
83
84# create a [dirty] gcc wrapper to allow us to build with our own flags
85# (dirty because it is spoofing 'gcc' since CC value is stored in the go tool)
86# TODO: remove this and just set CFLAGS/LDFLAGS once upstream supports it
87# https://code.google.com/p/go/issues/detail?id=6882
88mkdir -p zz
89echo -e "#!/bin/sh\n/usr/bin/gcc $RPM_OPT_FLAGS $RPM_LD_FLAGS \"\$@\"" > ./zz/gcc
90chmod +x ./zz/gcc
91
92%build
93# set up final install location
94export GOROOT_FINAL=%{_libdir}/%{name}
95
96# TODO use the system linker to get the system link flags and build-id
97# when https://code.google.com/p/go/issues/detail?id=5221 is solved
98#export GO_LDFLAGS="-linkmode external -extldflags $RPM_LD_FLAGS"
99
100# build
101cd src
102# use our gcc wrapper
103PATH="$(pwd -P)/../zz:$PATH" CC="gcc" ./make.bash
104cd ..
105
106%check
107export GOROOT=$(pwd -P)
108export PATH="$PATH":"$GOROOT"/bin
109cd src
110# not using our 'gcc' since the CFLAGS fails crash_cgo_test.go due to unused variables
111# https://code.google.com/p/go/issues/detail?id=6883
112./run.bash --no-rebuild
113cd ..
114
115
116%install
117rm -rf $RPM_BUILD_ROOT
118
119# create the top level directories
120mkdir -p $RPM_BUILD_ROOT%{_bindir}
121mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}
122
123# install everything into libdir (until symlink problems are fixed)
124# https://code.google.com/p/go/issues/detail?id=5830
125cp -av api bin doc favicon.ico include lib pkg robots.txt src \
126   $RPM_BUILD_ROOT%{_libdir}/%{name}
127
128# remove the unnecessary zoneinfo file (Go will always use the system one first)
129rm -rfv $RPM_BUILD_ROOT%{_libdir}/%{name}/lib/time
130
131# remove the doc Makefile
132rm -rfv $RPM_BUILD_ROOT%{_libdir}/%{name}/doc/Makefile
133
134# put binaries to bindir
135pushd $RPM_BUILD_ROOT%{_bindir}
136for z in $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/*
137  do mv $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/$(basename $z) .
138done
139popd
140
141# misc/bash
142mkdir -p $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions
143cp -av misc/bash/go $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions
144for z in 8l 6l 5l 8g 6g 5g gofmt gccgo
145  do ln -s go $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/$z
146done
147
148# misc/zsh
149mkdir -p $RPM_BUILD_ROOT%{_datadir}/zsh/site-functions
150cp -av misc/zsh/go $RPM_BUILD_ROOT%{_datadir}/zsh/site-functions
151
152# gdbinit
153mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gdbinit.d
154cp -av %{SOURCE100} $RPM_BUILD_ROOT%{_sysconfdir}/gdbinit.d/golang
155
156# prelink blacklist
157mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/prelink.conf.d
158cp -av %{SOURCE101} $RPM_BUILD_ROOT%{_sysconfdir}/prelink.conf.d/golang.conf
159
160
161%files
162%doc AUTHORS CONTRIBUTORS LICENSE PATENTS VERSION
163
164# go files
165%{_libdir}/%{name}
166
167# binary executables
168%{_bindir}/go
169%{_bindir}/gofmt
170
171# autocomplete
172%{_datadir}/bash-completion
173%{_datadir}/zsh
174
175# gdbinit (for gdb debugging)
176%{_sysconfdir}/gdbinit.d
177
178# prelink blacklist
179%{_sysconfdir}/prelink.conf.d
180
181%changelog
182* Mon Dec 15 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 1.2-2
183- added Group tag
184
185* Sat Feb  1 2014 IWAI, Masaharu <iwaim.sub@gmail.com> 1.2
186- initial build for Vine Linux
187- drop emacs and vim package
188
189* Thu Jan 24 2014 Vincent Batts <vbatts@redhat.com> 1.2-4
190- skip a flaky test that is sporadically failing on the build server
191
192* Thu Jan 16 2014 Vincent Batts <vbatts@redhat.com> 1.2-3
193- remove golang-godoc dependency. cyclic dependency on compiling godoc
194
195* Wed Dec 18 2013 Vincent Batts <vbatts@redhat.com> - 1.2-2
196- removing P224 ECC curve
197
198* Mon Dec 2 2013 Vincent Batts <vbatts@fedoraproject.org> - 1.2-1
199- Update to upstream 1.2 release
200- remove the pax tar patches
201
202* Tue Nov 26 2013 Vincent Batts <vbatts@redhat.com> - 1.1.2-8
203- fix the rpmspec conditional for rhel and fedora
204
205* Thu Nov 21 2013 Vincent Batts <vbatts@redhat.com> - 1.1.2-7
206- patch tests for testing on rawhide
207- let the same spec work for rhel and fedora
208
209* Wed Nov 20 2013 Vincent Batts <vbatts@redhat.com> - 1.1.2-6
210- don't symlink /usr/bin out to ../lib..., move the file
211- seperate out godoc, to accomodate the go.tools godoc
212
213* Fri Sep 20 2013 Adam Miller <maxamillion@fedoraproject.org> - 1.1.2-5
214- Pull upstream patches for BZ#1010271
215- Add glibc requirement that got dropped because of meta dep fix
216
217* Fri Aug 30 2013 Adam Miller <maxamillion@fedoraproject.org> - 1.1.2-4
218- fix the libc meta dependency (thanks to vbatts [at] redhat.com for the fix)
219
220* Tue Aug 27 2013 Adam Miller <maxamillion@fedoraproject.org> - 1.1.2-3
221- Revert incorrect merged changelog
222
223* Tue Aug 27 2013 Adam Miller <maxamillion@fedoraproject.org> - 1.1.2-2
224- This was reverted, just a placeholder changelog entry for bad merge
225
226* Tue Aug 20 2013 Adam Miller <maxamillion@fedoraproject.org> - 1.1.2-1
227- Update to latest upstream
228
229* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-7
230- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
231
232* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 1.1.1-6
233- Perl 5.18 rebuild
234
235* Wed Jul 10 2013 Adam Goode <adam@spicenitz.org> - 1.1.1-5
236- Blacklist testdata files from prelink
237- Again try to fix #973842
238
239* Fri Jul  5 2013 Adam Goode <adam@spicenitz.org> - 1.1.1-4
240- Move src to libdir for now (#973842) (upstream issue https://code.google.com/p/go/issues/detail?id=5830)
241- Eliminate noarch data package to work around RPM bug (#975909)
242- Try to add runtime-gdb.py to the gdb safe-path (#981356)
243
244* Wed Jun 19 2013 Adam Goode <adam@spicenitz.org> - 1.1.1-3
245- Use lua for pretrans (http://fedoraproject.org/wiki/Packaging:Guidelines#The_.25pretrans_scriptlet)
246
247* Mon Jun 17 2013 Adam Goode <adam@spicenitz.org> - 1.1.1-2
248- Hopefully really fix #973842
249- Fix update from pre-1.1.1 (#974840)
250
251* Thu Jun 13 2013 Adam Goode <adam@spicenitz.org> - 1.1.1-1
252- Update to 1.1.1
253- Fix basically useless package (#973842)
254
255* Sat May 25 2013 Dan Horák <dan[at]danny.cz> - 1.1-3
256- set ExclusiveArch
257
258* Fri May 24 2013 Adam Goode <adam@spicenitz.org> - 1.1-2
259- Fix noarch package discrepancies
260
261* Fri May 24 2013 Adam Goode <adam@spicenitz.org> - 1.1-1
262- Initial Fedora release.
263- Update to 1.1
264
265* Thu May  9 2013 Adam Goode <adam@spicenitz.org> - 1.1-0.3.rc3
266- Update to rc3
267
268* Thu Apr 11 2013 Adam Goode <adam@spicenitz.org> - 1.1-0.2.beta2
269- Update to beta2
270
271* Tue Apr  9 2013 Adam Goode <adam@spicenitz.org> - 1.1-0.1.beta1
272- Initial packaging.
Note: See TracBrowser for help on using the repository browser.