1 | %global gcc_version 4.4.4
|
---|
2 |
|
---|
3 | Summary: Various compilers (C, C++, Objective-C, Java, ...)
|
---|
4 | Name: gcc
|
---|
5 | Version: %{gcc_version}
|
---|
6 | Release: 7%{?dist}
|
---|
7 |
|
---|
8 | # libgcc, libgfortran, libmudflap, libgomp, libstdc++ and crtstuff have
|
---|
9 | # GCC Runtime Exception.
|
---|
10 | License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions
|
---|
11 | Group: Development/Languages
|
---|
12 | URL: http://gcc.gnu.org
|
---|
13 |
|
---|
14 | Source0: gcc-%{version}-os2-20101229.zip
|
---|
15 | Source1: gpl.zip
|
---|
16 | #Source2: gcc-ssp.zip
|
---|
17 |
|
---|
18 | BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
|
---|
19 |
|
---|
20 | Obsoletes: gcc < %{gcc_version}
|
---|
21 | Requires: libgcc444 = %{gcc_version}
|
---|
22 | Requires: libc-devel >= 0.6.3
|
---|
23 |
|
---|
24 | %description
|
---|
25 | The gcc package contains the GNU Compiler Collection version 4.4.
|
---|
26 | You'll need this package in order to compile C code.
|
---|
27 |
|
---|
28 | %package -n libgcc444
|
---|
29 | Summary: GCC version 4.4 shared support library
|
---|
30 | Group: System Environment/Libraries
|
---|
31 | Autoreq: false
|
---|
32 |
|
---|
33 | %description -n libgcc444
|
---|
34 | This package contains GCC shared support library which is needed
|
---|
35 | e.g. for exception handling support.
|
---|
36 |
|
---|
37 | %package stack-protector
|
---|
38 | Summary: GCC stack protector shared library
|
---|
39 | Group: System Environment/Libraries
|
---|
40 |
|
---|
41 | %description stack-protector
|
---|
42 | This package contains GCC shared library which is needed
|
---|
43 | for stack protector.
|
---|
44 |
|
---|
45 | %package wlink
|
---|
46 | Summary: GCC configuration changes for Watcom linker support.
|
---|
47 | Group: Development/Languages
|
---|
48 | Requires: watcom-wlink-hll
|
---|
49 |
|
---|
50 | %description wlink
|
---|
51 | This package triggers the required config.sys settings to allow use of Watcom
|
---|
52 | Linker instead of ld.
|
---|
53 |
|
---|
54 | %package wrc
|
---|
55 | Summary: GCC configuration changes for Watcom resource compiler support.
|
---|
56 | Group: Development/Languages
|
---|
57 | Requires: watcom-wrc
|
---|
58 |
|
---|
59 | %description wrc
|
---|
60 | This package triggers the required config.sys settings to allow use of Watcom
|
---|
61 | resource compiler instead of IBM one.
|
---|
62 |
|
---|
63 | %prep
|
---|
64 | %setup -q -c -a 1
|
---|
65 |
|
---|
66 | %install
|
---|
67 | rm -rf $RPM_BUILD_ROOT
|
---|
68 | mkdir -p %{buildroot}%{_usr}
|
---|
69 | cp -r usr/local444/* %{buildroot}%{_usr}/
|
---|
70 |
|
---|
71 | mkdir -p %{buildroot}/%_docdir/%{name}-%{version}
|
---|
72 | cp COPYING %{buildroot}%_docdir/%{name}-%{version}/
|
---|
73 | cp COPYING.LGPL %{buildroot}%_docdir/%{name}-%{version}/
|
---|
74 |
|
---|
75 | #cp ssp* %{buildroot}%{_libdir}
|
---|
76 | #rm %{buildroot}%{_libdir}/ssp*.lib
|
---|
77 | #rm %{buildroot}%{_libdir}/ssp*.dll
|
---|
78 |
|
---|
79 | mv %{buildroot}%{_usr}/gcc444.cmd $RPM_BUILD_ROOT%_docdir/%{name}-%{version}/
|
---|
80 | mv %{buildroot}%{_usr}/readme.os2 $RPM_BUILD_ROOT%_docdir/%{name}-%{version}/
|
---|
81 | mv %{buildroot}%{_usr}/stdio.diff $RPM_BUILD_ROOT%_docdir/%{name}-%{version}/
|
---|
82 |
|
---|
83 | ln -s /@unixroot/usr/libexec/gcc/i386-pc-os2-emx/4.4.4/cc1.exe %{buildroot}/@unixroot/usr/bin/cc1.exe
|
---|
84 | ln -s /@unixroot/usr/libexec/gcc/i386-pc-os2-emx/4.4.4/cc1plus.exe %{buildroot}/@unixroot/usr/bin/cc1plus.exe
|
---|
85 |
|
---|
86 |
|
---|
87 | %clean
|
---|
88 | rm -rf %{buildroot}
|
---|
89 |
|
---|
90 | %post wrc
|
---|
91 | if [ "$1" = 1 ] ; then
|
---|
92 | #execute only on first install
|
---|
93 | %cube {DELLINE "SET EMXOMFLD_RC="} c:\config.sys > NUL
|
---|
94 | %cube {DELLINE "SET EMXOMFLD_RC_TYPE="} c:\config.sys > NUL
|
---|
95 | %cube {ADDLINE "SET EMXOMFLD_RC=wrc.exe"} c:\config.sys > NUL
|
---|
96 | %cube {ADDLINE "SET EMXOMFLD_RC_TYPE=WRC"} c:\config.sys > NUL
|
---|
97 | fi
|
---|
98 |
|
---|
99 | %postun wrc
|
---|
100 | if [ "$1" = 0 ] ; then
|
---|
101 | #execute only on last uninstall
|
---|
102 | %cube {DELLINE "SET EMXOMFLD_RC="} c:\config.sys > NUL
|
---|
103 | %cube {DELLINE "SET EMXOMFLD_RC_TYPE="} c:\config.sys > NUL
|
---|
104 | fi
|
---|
105 |
|
---|
106 | %post wlink
|
---|
107 | if [ "$1" = 1 ] ; then
|
---|
108 | #execute only on first install
|
---|
109 | %cube {DELLINE "SET EMXOMFLD_LINKER="} c:\config.sys > NUL
|
---|
110 | %cube {DELLINE "SET EMXOMFLD_TYPE="} c:\config.sys > NUL
|
---|
111 | %cube {ADDLINE "SET EMXOMFLD_LINKER=wl.exe"} c:\config.sys > NUL
|
---|
112 | %cube {ADDLINE "SET EMXOMFLD_TYPE=WLINK"} c:\config.sys > NUL
|
---|
113 | fi
|
---|
114 |
|
---|
115 | %postun wlink
|
---|
116 | if [ "$1" = 0 ] ; then
|
---|
117 | #execute only on last uninstall
|
---|
118 | %cube {DELLINE "SET EMXOMFLD_LINKER="} c:\config.sys > NUL
|
---|
119 | %cube {DELLINE "SET EMXOMFLD_TYPE="} c:\config.sys > NUL
|
---|
120 | fi
|
---|
121 |
|
---|
122 | %files
|
---|
123 | %defattr(-,root,root,-)
|
---|
124 | %{_usr}/bin
|
---|
125 | %{_usr}/include
|
---|
126 | %{_usr}/info
|
---|
127 | %{_libdir}/*.*a
|
---|
128 | %{_libdir}/*.spec
|
---|
129 | %{_libdir}/gcc/*
|
---|
130 | %{_usr}/libexec
|
---|
131 | %{_usr}/man
|
---|
132 | %{_usr}/share
|
---|
133 |
|
---|
134 | %files stack-protector
|
---|
135 | %defattr(-,root,root,-)
|
---|
136 | %{_libdir}/ssp.dll
|
---|
137 |
|
---|
138 | %files -n libgcc444
|
---|
139 | %defattr(-,root,root,-)
|
---|
140 | %{_libdir}/gcc444.dll
|
---|
141 | %doc %{_datadir}/doc/*
|
---|
142 |
|
---|
143 | %changelog
|
---|