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