initial packaging
[platform/upstream/gcc.git] / packaging / gcc.spec
1 Name:           gcc
2 %define separate_bi32 0
3 %define separate_bi64 0
4 %ifarch ppc
5 %define separate_bi64 1
6 %endif
7 %ifarch x86_64 s390x ppc64
8 %define separate_bi32 1
9 %endif
10 Url:            http://gcc.gnu.org/
11 %define gcc_version 47
12 %define gcc_suffix 4.7
13 Version:        4.7
14 Release:        0
15 Summary:        The system GNU C Compiler
16 License:        GPL-3.0+
17 Group:          Development/Languages/C and C++
18 Provides:       c_compiler
19 Obsoletes:      gcc-mudflap
20 Requires:       cpp
21 Requires:       gcc%{gcc_version}
22 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
23 Source:         cpp
24 Source99:       README.packaging
25
26 %description
27 The system GNU C Compiler.
28
29
30
31 %package -n gcc-32bit
32 Summary:        The system GNU C Compiler
33 License:        GPL-3.0+
34 Group:          Development/Languages/C and C++
35 Requires:       gcc = %{version}
36 Requires:       gcc%{gcc_version}-32bit
37
38 %description -n gcc-32bit
39 The system GNU C Compiler.
40
41
42
43 %package -n gcc-64bit
44 Summary:        The system GNU C Compiler
45 License:        GPL-3.0+
46 Group:          Development/Languages/C and C++
47 Requires:       gcc = %{version}
48 Requires:       gcc%{gcc_version}-64bit
49
50 %description -n gcc-64bit
51 The system GNU C Compiler.
52
53
54
55 %package -n cpp
56 Summary:        The system GNU Preprocessor
57 License:        GPL-3.0+
58 Group:          Development/Languages/C and C++
59 Requires:       cpp%{gcc_version}
60
61 %description -n cpp
62 The system GNU Preprocessor.
63
64
65
66 %package -n gcc-locale
67 Summary:        The system GNU Compiler locale files
68 License:        GPL-3.0+
69 Group:          Development/Languages/C and C++
70 Requires:       gcc%{gcc_version}-locale
71
72 %description -n gcc-locale
73 The system GNU Compiler locale files.
74
75
76
77 %package -n gcc-info
78 Summary:        The system GNU Compiler documentation
79 License:        GFDL-1.2
80 Group:          Development/Languages/C and C++
81 Requires:       gcc%{gcc_version}-info
82
83 %description -n gcc-info
84 The system GNU Compiler documentation.
85
86 # There is intentionally no postun with install_info_delete as there
87 # is no way to just remove the aliased entries.  The content owners
88 # install_info_delete will also remove the aliases though.
89 # install-info does not pick up descriptions from the content.
90
91 %package -n gcc-c++
92 Summary:        The system GNU C++ Compiler
93 License:        GPL-3.0+
94 Group:          Development/Languages/C and C++
95 Provides:       c++_compiler
96 Requires:       gcc = %{version}
97 Requires:       gcc%{gcc_version}-c++
98
99 %description -n gcc-c++
100 The system GNU C++ Compiler.
101
102
103 %package -n gcc-c++-32bit
104 Summary:        The system GNU C++ Compiler
105 License:        GPL-3.0+
106 Group:          Development/Languages/C and C++
107 Requires:       gcc-32bit = %{version}
108 Requires:       gcc-c++ = %{version}
109 Requires:       libstdc++%{gcc_version}-devel-32bit
110
111 %description -n gcc-c++-32bit
112 The system GNU C++ Compiler 32 bit support.
113
114
115 %package -n gcc-c++-64bit
116 Summary:        The system GNU C++ Compiler
117 License:        GPL-3.0+
118 Group:          Development/Languages/C and C++
119 Requires:       gcc-64bit = %{version}
120 Requires:       gcc-c++ = %{version}
121 Requires:       libstdc++%{gcc_version}-devel-64bit
122
123 %description -n gcc-c++-64bit
124 The system GNU C++ Compiler 64 bit support.
125
126
127
128 %package -n libstdc++-devel
129 Summary:        The system GNU C++ development files
130 License:        GPL-3.0-with-GCC-exception
131 Group:          System/Libraries
132 Requires:       libstdc++%{gcc_version}-devel
133
134 %description -n libstdc++-devel
135 The system GNU C++ development files.
136
137
138
139 %package -n gcc-fortran
140 Summary:        The system GNU Fortran Compiler
141 License:        GPL-3.0+
142 Group:          Development/Languages/Fortran
143 Requires:       gcc = %{version}
144 Requires:       gcc%{gcc_version}-fortran
145
146 %description -n gcc-fortran
147 The system GNU Fortran Compiler.
148
149
150 %package -n gcc-fortran-32bit
151 Summary:        The system GNU Fortran Compiler
152 License:        GPL-3.0+
153 Group:          Development/Languages/Fortran
154 Requires:       gcc%{gcc_version}-fortran-32bit
155 Requires:       gcc-fortran = %{version}
156
157 %description -n gcc-fortran-32bit
158 The system GNU Fortran Compiler 32 bit support.
159
160
161 %package -n gcc-fortran-64bit
162 Summary:        The system GNU Fortran Compiler
163 License:        GPL-3.0+
164 Group:          Development/Languages/Fortran
165 Requires:       gcc%{gcc_version}-fortran-64bit
166 Requires:       gcc-fortran = %{version}
167
168 %description -n gcc-fortran-64bit
169 The system GNU Fortran Compiler 64 bit support.
170
171
172 %package -n gcc-java
173 Summary:        The system GNU Java Compiler
174 License:        GPL-3.0+
175 Group:          Development/Languages/Java
176 Requires:       gcc%{gcc_version}-java
177 Requires:       libgcj-devel = %{version}
178 Recommends:     gcc-gij = %{version}
179 Requires:       gcc = %{version}
180
181 %description -n gcc-java
182 The system GNU Java Compiler.
183
184
185
186 %package -n libgcj-devel
187 Summary:        The system GNU Java development files.
188 License:        GPL-2.0-with-classpath-exception
189 Group:          Development/Libraries/Java
190 Requires:       libgcj%{gcc_version}-devel
191
192 %description -n libgcj-devel
193 The system GNU Java development files.
194
195
196
197 %package -n gcc-gij
198 Summary:        The system GNU Java bytecode interpreter
199 License:        GPL-2.0+
200 Group:          Development/Languages/Java
201 Requires:       gcc%{gcc_version}-gij
202
203 %description -n gcc-gij
204 The system GNU Java bytecode interpreter.
205
206
207
208 %package -n gcc-gij-32bit
209 Summary:        The system GNU Java bytecode interpreter
210 License:        GPL-2.0+
211 Group:          Development/Languages/Java
212 Requires:       gcc%{gcc_version}-gij-32bit
213
214 %description -n gcc-gij-32bit
215 The system GNU Java bytecode interpreter as 32 bit application.
216
217
218
219 %package -n gcc-gij-64bit
220 Summary:        The system GNU Java bytecode interpreter
221 License:        GPL-2.0+
222 Group:          Development/Languages/Java
223 Requires:       gcc%{gcc_version}-gij-64bit
224
225 %description -n gcc-gij-64bit
226 The system GNU Java bytecode interpreter as 64 bit application.
227
228
229
230 %package -n gcc-objc
231 Summary:        The system GNU Objective C Compiler
232 License:        GPL-3.0+
233 Group:          Development/Languages/Other
234 Requires:       gcc = %{version}
235 Requires:       gcc%{gcc_version}-objc
236 %ifarch ppc64
237 Obsoletes:      gcc-objc-64bit
238 %endif
239
240 %description -n gcc-objc
241 The system GNU Objective C Compiler.
242
243
244
245 %package -n gcc-objc-32bit
246 Summary:        The system GNU Objective C Compiler
247 License:        GPL-3.0+
248 Group:          Development/Languages/Other
249 Requires:       gcc%{gcc_version}-objc-32bit
250 Requires:       gcc-objc = %{version}
251
252 %description -n gcc-objc-32bit
253 The system GNU Objective C Compiler 32 bit support.
254
255
256
257 %package -n gcc-objc-64bit
258 Summary:        The system GNU Objective C Compiler
259 License:        GPL-3.0+
260 Group:          Development/Languages/Other
261 Requires:       gcc%{gcc_version}-objc-64bit
262 Requires:       gcc-objc = %{version}
263
264 %description -n gcc-objc-64bit
265 The system GNU Objective C Compiler 64 bit support.
266
267
268
269 %package -n gcc-obj-c++
270 Summary:        The system GNU Objective C++ Compiler
271 License:        GPL-3.0+
272 Group:          Development/Languages/Other
273 Requires:       gcc%{gcc_version}-obj-c++
274 Requires:       gcc-objc = %{version}
275
276 %description -n gcc-obj-c++
277 The system GNU Objective C++ Compiler.
278
279
280
281 %package -n gcc-ada
282 Summary:        The system GNU Ada Compiler
283 License:        GPL-3.0+
284 Group:          Development/Languages/C and C++
285 Requires:       gcc = %{version}
286 Requires:       gcc%{gcc_version}-ada
287
288 %description -n gcc-ada
289 The system GNU Ada Compiler.
290
291
292 %package -n gcc-z9
293 Summary:        The system GNU C Compiler
294 License:        GPL-3.0+
295 Group:          Development/Languages/C and C++
296 Requires:       gcc
297
298 %description -n gcc-z9
299 The system GNU C Compiler.
300
301
302 %prep 
303
304 %build
305 echo "This is a dummy package to provide a dependency on the system compiler." > README
306
307 %install
308 mkdir -p $RPM_BUILD_ROOT/lib
309 mkdir -p $RPM_BUILD_ROOT%{_prefix}/bin
310 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
311 mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/doc/packages/gcc-objc/
312 mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/doc/packages/gcc-obj-c++/
313 # Link all the binaries
314 for program in \
315         gcc gcov \
316         g++ \
317         cpp \
318         gcj gcjh gcj-dbtool jcf-dump jv-convert gc-analyze \
319         gij \
320         gappletviewer \
321         gjar gjarsigner gjavah gkeytool gnative2ascii gorbd grmic \
322         grmid grmiregistry gserialver gtnameserv \
323 %if %{separate_bi32}
324         grmiregistry32 \
325         gij32 \
326 %endif
327 %if %{separate_bi64}
328         grmiregistry64 \
329         gij64 \
330 %endif
331         gfortran \
332         gnat gnatbind gnatbl gnatchop gnatclean gnatfind gnatkr \
333         gnatlink gnatls gnatmake gnatname gnatprep gnatxref gprmake \
334     ; do
335   ln -sf $program-%{gcc_suffix} $RPM_BUILD_ROOT%{_prefix}/bin/$program
336 done
337 # Link section 1 manpages
338 for man1 in \
339         gcc gcov \
340         g++ \
341         cpp \
342         gfortran \
343         gcj gcjh gcj-dbtool jcf-dump jv-convert gc-analyze \
344         gij \
345         gappletviewer gjar gjarsigner gjavah \
346         gkeytool gnative2ascii gorbd grmic grmid grmiregistry gserialver \
347         gtnameserv \
348     ; do
349   ln -sf $man1-%{gcc_suffix}.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/$man1.1.gz
350 done
351 # Provide the traditional /lib/cpp that only handles C
352 cp $RPM_SOURCE_DIR/cpp $RPM_BUILD_ROOT/lib/
353 chmod 755 $RPM_BUILD_ROOT/lib/cpp
354 # Provide extra symlinks
355 ln -sf g++-%{gcc_suffix} $RPM_BUILD_ROOT%{_prefix}/bin/c++
356 ln -sf gcc-%{gcc_suffix} $RPM_BUILD_ROOT%{_prefix}/bin/cc
357 ln -sf g++-%{gcc_suffix}.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/c++.1.gz
358 ln -sf gcc-%{gcc_suffix}.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/cc.1.gz
359 %ifarch s390 s390x
360 dir=`gcc-%{gcc_suffix} -print-prog-name=cc1`
361 dir=${dir%/cc1}
362 mkdir -p $RPM_BUILD_ROOT/$dir
363 cat > $RPM_BUILD_ROOT/$dir/defaults.spec <<EOF
364 *default_spec:
365 %{!mtune=*:-mtune=z10} %{!march=*:-march=z9-109}
366 EOF
367 %endif
368
369 %files
370 %defattr(-,root,root)
371 %{_prefix}/bin/gcc
372 %{_prefix}/bin/cc
373 %{_prefix}/bin/gcov
374 %doc %{_mandir}/man1/gcc.1.gz
375 %doc %{_mandir}/man1/cc.1.gz
376 %doc %{_mandir}/man1/gcov.1.gz
377
378 %files -n cpp
379 %defattr(-,root,root)
380 /lib/cpp
381 %{_prefix}/bin/cpp
382 %doc %{_mandir}/man1/cpp.1.gz
383
384 %files -n gcc-c++
385 %defattr(-,root,root)
386 %{_prefix}/bin/g++
387 %{_prefix}/bin/c++
388 %doc %{_mandir}/man1/g++.1.gz
389 %doc %{_mandir}/man1/c++.1.gz
390
391 %files -n gcc-fortran
392 %defattr(-,root,root)
393 %{_prefix}/bin/gfortran
394 %doc %{_mandir}/man1/gfortran.1.gz
395
396 %files -n gcc-java
397 %defattr(-,root,root)
398 %{_prefix}/bin/gcj
399 %{_prefix}/bin/gcjh
400 %{_prefix}/bin/gcj-dbtool
401 %{_prefix}/bin/jcf-dump
402 %{_prefix}/bin/jv-convert
403 %{_prefix}/bin/gc-analyze
404 %doc %{_mandir}/man1/gcj.1.gz
405 %doc %{_mandir}/man1/gcjh.1.gz
406 %doc %{_mandir}/man1/gcj-dbtool.1.gz
407 %doc %{_mandir}/man1/jcf-dump.1.gz
408 %doc %{_mandir}/man1/jv-convert.1.gz
409 %doc %{_mandir}/man1/gc-analyze.1.gz
410
411 %files -n gcc-gij
412 %defattr(-,root,root)
413 %{_prefix}/bin/gij
414 %{_prefix}/bin/gappletviewer
415 %{_prefix}/bin/gjar
416 %{_prefix}/bin/gjarsigner
417 %{_prefix}/bin/gjavah
418 %{_prefix}/bin/gkeytool
419 %{_prefix}/bin/gnative2ascii
420 %{_prefix}/bin/gorbd
421 %{_prefix}/bin/grmic
422 %{_prefix}/bin/grmid
423 %{_prefix}/bin/grmiregistry
424 %{_prefix}/bin/gserialver
425 %{_prefix}/bin/gtnameserv
426 %doc %{_mandir}/man1/gij.1.gz
427 %doc %{_mandir}/man1/gappletviewer.1.gz
428 %doc %{_mandir}/man1/gjar.1.gz
429 %doc %{_mandir}/man1/gjarsigner.1.gz
430 %doc %{_mandir}/man1/gjavah.1.gz
431 %doc %{_mandir}/man1/gkeytool.1.gz
432 %doc %{_mandir}/man1/gnative2ascii.1.gz
433 %doc %{_mandir}/man1/gorbd.1.gz
434 %doc %{_mandir}/man1/grmic.1.gz
435 %doc %{_mandir}/man1/grmid.1.gz
436 %doc %{_mandir}/man1/grmiregistry.1.gz
437 %doc %{_mandir}/man1/gserialver.1.gz
438 %doc %{_mandir}/man1/gtnameserv.1.gz
439
440 %files -n gcc-objc
441 %defattr(-,root,root)
442 # empty - only for the dependency
443 %doc README
444
445 %files -n gcc-obj-c++
446 %defattr(-,root,root)
447 # empty - only for the dependency
448 %doc README
449
450 %files -n gcc-locale
451 %defattr(-,root,root)
452 # empty - only for the dependency
453 %doc README
454
455 %files -n gcc-info
456 %defattr(-,root,root)
457 # empty - only for the dependency
458 %doc README
459
460 %files -n gcc-ada
461 %defattr(-,root,root)
462 %{_prefix}/bin/gnat
463 %{_prefix}/bin/gnatbind
464 %{_prefix}/bin/gnatbl
465 %{_prefix}/bin/gnatchop
466 %{_prefix}/bin/gnatclean
467 %{_prefix}/bin/gnatfind
468 %{_prefix}/bin/gnatkr
469 %{_prefix}/bin/gnatlink
470 %{_prefix}/bin/gnatls
471 %{_prefix}/bin/gnatmake
472 %{_prefix}/bin/gnatname
473 %{_prefix}/bin/gnatprep
474 %{_prefix}/bin/gnatxref
475 %{_prefix}/bin/gprmake
476
477 %files -n libstdc++-devel
478 %defattr(-,root,root)
479 # empty - only for the dependency
480 %doc README
481
482 %files -n libgcj-devel
483 %defattr(-,root,root)
484 # empty - only for the dependency
485 %doc README
486
487 %if %{separate_bi32}
488
489 %files -n gcc-32bit
490 %defattr(-,root,root)
491 # empty - only for the dependency
492 %doc README
493
494 %files -n gcc-c++-32bit
495 %defattr(-,root,root)
496 # empty - only for the dependency
497 %doc README
498
499 %files -n gcc-fortran-32bit
500 %defattr(-,root,root)
501 # empty - only for the dependency
502 %doc README
503
504 %files -n gcc-objc-32bit
505 %defattr(-,root,root)
506 # empty - only for the dependency
507 %doc README
508
509 %files -n gcc-gij-32bit
510 %defattr(-,root,root)
511 %{_prefix}/bin/gij32
512 %{_prefix}/bin/grmiregistry32
513
514 %endif
515 %if %{separate_bi64}
516
517 %files -n gcc-64bit
518 %defattr(-,root,root)
519 # empty - only for the dependency
520 %doc README
521
522 %files -n gcc-c++-64bit
523 %defattr(-,root,root)
524 # empty - only for the dependency
525 %doc README
526
527 %files -n gcc-fortran-64bit
528 %defattr(-,root,root)
529 # empty - only for the dependency
530 %doc README
531
532 %files -n gcc-objc-64bit
533 %defattr(-,root,root)
534 # empty - only for the dependency
535 %doc README
536
537 %files -n gcc-gij-64bit
538 %defattr(-,root,root)
539 %{_prefix}/bin/gij64
540 %{_prefix}/bin/grmiregistry64
541
542 %endif
543 %ifarch s390 s390x
544
545 %files -n gcc-z9
546 %defattr(-,root,root)
547 /usr/lib*/gcc/*-suse-linux/*/defaults.spec
548 %endif
549
550 %changelog